[FFmpeg-devel] [PATCH] configure: Allow log2 with msvc12 onwards

Matt Oliver protogonoi at gmail.com
Mon May 12 09:45:32 CEST 2014

On 12 May 2014 17:17, Matt Oliver <protogonoi at gmail.com> wrote:

> I missed this, you say only 2010 is a problem, but the comment in
>>> configure only says 2013 works fine, so what about 2012??
>> The 2012 version is msvc11 (released 2012 but version 11).
> Sorry to be clear the log2 is only an error as it is incorrectly detected
> as available under msvc10 (2010). However no version prior to msvc12 (2013)
> has log2 so to ensure no error has occurred these versions should always be
> disabled. msvc12 (2013) has a functioning log2 and is detected as such and
> should be left as enabled. So the code only disables for versions prior to
> msvc12 that may incorrectly detect log2.

Based on Reimars question and just to make sure its clear in the patch
itself heres the new one. Hopefully this should make it clearer as it took
me a little while to find the reason why log2 had been blanket disabled in
the first place.

For future reference no version of the msvcrt has log2 prior to msvc12. So
these should always be disabled and for the most part should detect as
disabled. However there is at least 1 known instance where log2 will detect
as enabled on older versions when it shouldnt. The known instance is msvc10
(2010) in x64 which has a stray log2 in the binaries that the linker picks
up as a supported math.h log2 function despite msvc10 not having a C99 math
library. This causes a problem so to ensure log2 is not incorrectly
detected all versions prior to msvc12 should be log2 disabled (msvc10 is
known error but just to be safe and to keep code simple the patch just bulk
disables all prior versions - previously every version was disabled).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure-Ensure-log2-is-disable-based-on-msvcrt-ver.patch
Type: application/octet-stream
Size: 1148 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140512/17f0e8cc/attachment.obj>

More information about the ffmpeg-devel mailing list