>>/ Date: Mon, 28 Nov 2011 16:36:25 +0100/ >>/ From: Mario Lassnig/ >>/ / >>/ The remedy (to include at the appropriate time and place):/ >>/ / >>/ #include/ >>/ #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. Mario@shodan:/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 mario.lassnig@cern.ch +41 22 76 71268