Re: [PATCH] Fix compilation on OS X.

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

 



Torsten Bögershausen <tboegi@xxxxxx> writes:

> On 2013-07-20 09.49, Benoit Sigoure wrote:
>> +#ifdef __APPLE__
>> +// On OS X libc headers don't define this symbol.
>> +extern char **environ;
>> +#endif
>> +
> A more generic approach could be:
>
> In the file "config.mak.uname": Define a variable in the Darwin section like this
> NO_EXT_ENVIRON = UnfortunatelyYes

Actually, it is _wrong_ for us to rely on system header files to
define this symbol for us.  Declaring "extern char **environ" is
responsibility of the user programs (like us).

When _GNU_SOURCE is defined glibc header (I think it is unistd.h)
seem to define it for us.

Perhaps the correct fix is to revert ec535cc2 for everybody, and if
MinGW needs such a workaround, do it inside #ifndef MINGW?
--
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]