Re: [PATCH 6/6] compat/nedmalloc: Fix compiler warnings on linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder wrote:
> Hi,
> 
> Ramsay Jones wrote:
> 
>> --- a/compat/nedmalloc/malloc.c.h
>> +++ b/compat/nedmalloc/malloc.c.h
>> @@ -484,6 +484,10 @@ MAX_RELEASE_CHECK_RATE   default: 4095 unless not HAVE_MMAP
>>  #define DLMALLOC_VERSION 20804
>>  #endif /* DLMALLOC_VERSION */
>>
>> +#if defined(linux)
>> +#define _GNU_SOURCE 1
>> +#endif
> 
> If we want to do this, I'd suggest defining _GNU_SOURCE
> unconditionally.  Other platforms using glibc would benefit from it,
> too, and other platforms not using glibc shouldn't care.

My original version was unconditional, then I came over all
conservative ... :-D

Actually, in order to reduce the chance of future breakage, it
should really be placed at the beginning of the translation unit
(i.e. at the start of nedmalloc.c, before *any* #includes).

ATB,
Ramsay Jones



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]