[MPlayer-dev-eng] about log2 replacement

Chang Chen Chang_Chen at sonic.com
Mon Aug 10 08:33:22 CEST 2009


I am not familiar with cygwin headers. But it looks like only one log2
macro definition.

-----Original Message-----
From: mplayer-dev-eng-bounces at mplayerhq.hu
[mailto:mplayer-dev-eng-bounces at mplayerhq.hu] On Behalf Of Uoti Urpala
Sent: Monday, August 10, 2009 2:26 PM
To: mplayer-dev-eng at mplayerhq.hu
Subject: Re: [MPlayer-dev-eng] about log2 replacement

On Mon, 2009-08-10 at 14:01 +0800, Chang Chen wrote:
> I use cygwin, here are log2 checking algorithm from configure
> 
>   #include<math.h>
> 
>   int  main (void)
>   { 
>     long(*foo)(float);
>     foo = log2;
>     Void(*foo)(0.0);
>     return 0.0;
>   }
> 
> Since log2 is defined as a macro, HAVE_LOG2 is 0.

How does this fail? Is log2 ONLY defined as a macro? Having a
function-like macro definition _in addition_ to a function prototype
shouldn't make it fail, since function-like macro substitution would not
trigger without a left parenthesis after the name, and so the function
would be used. If there's only a macro definition without a function
prototype then the cygwin headers are buggy (the standard requires there
to be an actual function, having an additional macro definition is
optional).


_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list