[MPlayer-dev-eng] about log2 replacement

Ivan Kalvachev ikalvachev at gmail.com
Mon Aug 10 14:46:36 CEST 2009


On 8/10/09, Chang Chen <Chang_Chen at sonic.com> wrote:
> 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).

Please, don't top post (place your replies bellow the quotes you refer to).

Also, please provide the full message of the error,
The relevant portion of configure.log should be enough.
You can also provide any quotes from the header files you find relevant.



More information about the MPlayer-dev-eng mailing list