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

Michael Niedermayer michaelni at gmx.at
Mon May 12 10:12:25 CEST 2014

On Mon, May 12, 2014 at 05:45:32PM +1000, Matt Oliver wrote:
> 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).

>  configure |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> b5f83623c1317ca74090db1a7549db7bea9b83d9  configure-Ensure-log2-is-disable-based-on-msvcrt-ver.patch
> From aa16b9a35043c8c84dbf4c60c4a8935aca4f3b9d Mon Sep 17 00:00:00 2001
> From: Matt Oliver <protogonoi at gmail.com>
> Date: Mon, 12 May 2014 17:35:52 +1000
> Subject: [PATCH] configure: Ensure log2 is disable based on msvcrt version.

patch applied



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140512/cc51c6bd/attachment.asc>

More information about the ffmpeg-devel mailing list