// It appears that on Mac OS X the 'environ' variable is not // available to dynamically linked libraries. // ... #if defined(__APPLE__) && defined(__DYNAMIC__) // The proper include for this is crt_externs.h, however it's not // available on iOS. The right replacement is not known. See // ... extern "C" { extern char ***_NSGetEnviron(void); } #define environ (*_NSGetEnviron()) #else #if defined(__MWERKS__) #include #else #if !defined(_WIN32) || defined(__COMO_VERSION__) extern char** environ; #else // SMAL patch for MinGW // Seems as it should be #include but that does not work. #if defined(_WIN32) && defined(__MINGW32__) extern char** environ; #endif #endif #endif #endif