Re: Building theora 1.1.1 with mingw-w64-gcc 7.1 and msys

Ralph Giles <[email protected]> Thu, 1 Jun 2017 15:50:00 -0700
Newsgroups gmane.comp.multimedia.ogg.theora.general
Message-ID <[email protected]>
On 2017-06-01 3:40 PM, Edgar Reynaldo wrote:

> I fixed the problem by renaming the function and every instance of
> 'rint' to 'rint_az' (Round Int Away from Zero) and then
> encoder_example.c built successfully.
> 
> Don't know if this needs to be patched upstream or not.

Upstream has the same code, so I expect the fix is needed there too.

Renaming it means always using the replacement, while a libc which
provides it might have a better implementation. Is there a preprocessor
define we could use to distinguish it? e.g.

#if defined(_WIN32) && !defined(__MINGW__)

or something similar. Or you could add a configure check for HAVE_RINT.
Note that quite a few of the examples use it.

Alternatively, it looks like Visual Studio provides rint these days, so
just removing the replacement code might be a viable option.

 -r
_______________________________________________
theora mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora