Gaetan Nadon wrote:
> On Sun, 2010-12-05 at 01:36 -0800, Alan Coopersmith wrote:
>> Also, calloc() takes two arguments, as the compiler points out when
>> you #include <stdlib.h> instead of faking it badly.
>>
>> -    AC_RUN_IFELSE([
>> -char *malloc();
>> -char *realloc();
>> -char *calloc();
>> -main() {
>> +    AC_RUN_IFELSE([AC_LANG_PROGRAM([
>> +#include <stdlib.h>
>> +],[
> 
> 
> I keep seeing this all the time in config.log (not because of this patch):
> 
>     conftest.c:2: warning: conflicting types for built-in function 'malloc'
>     conftest.c:3: warning: conflicting types for built-in function 'realloc'
>     conftest.c:4: warning: conflicting types for built-in function 'calloc'
>     conftest.c: In function 'main':
>     conftest.c:11: warning: incompatible implicit declaration of built-in 
> function 'exit'
> 
> Seems to come from this macro.

Yes, I think the replacement of the manual declarations with #include <stdlib.h>
will silence those - it certainly silenced the exit one for me.  (I expect it's
complaining about char * vs. void * for the return values from *alloc.)

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to