[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OSX breakage
From: |
Mario Lassnig |
Subject: |
Re: OSX breakage |
Date: |
Mon, 28 Nov 2011 19:35:09 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
/ Date: Mon, 28 Nov 2011 16:36:25 +0100/
/ From: Mario Lassnig<address@hidden>/
/ /
/ The remedy (to include at the appropriate time and place):/
/ /
/ #include<crt_externs.h>/
/ #define environ (*_NSGetEnviron())/
Is there really no system header on OS X that declares `environ'? I'm
surprised.
That's correct. And even system headers do it like this, probably
there's some magic in the background to work with ns-dragndrop and the likes.
address@hidden:/usr/include$ grep -r " environ " *
X11/Xw32defs.h:# define environ _environ
apache2/modperl_perl_includes.h:# define environ (*_NSGetEnviron())
architecture/i386/fpu.h: * #define environ (*_NSGetEnviron())
If there really isn't, and we need to use #ifdef, I'm inclined to use
"extern char **environ;". What would be a MAC OS X specific symbol to
use with such an ifdef?
That would be
#ifdef __APPLE__
Thanks,
Mario
--
Mario Lassnig
CERN PH-ADP-DDM 1-R-022
CH-1211 Geneve 23
address@hidden
+41 22 76 71268
smime.p7s
Description: S/MIME Cryptographic Signature
- Re: OSX breakage,
Mario Lassnig <=