You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/04/27 16:49:37 UTC
svn commit: r769007 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp
Author: tabish
Date: Mon Apr 27 14:49:37 2009
New Revision: 769007
URL: http://svn.apache.org/viewvc?rev=769007&view=rev
Log:
fix for AMQCPP-210
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp?rev=769007&r1=769006&r2=769007&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp Mon Apr 27 14:49:37 2009
@@ -211,29 +211,14 @@
return buffer;
}
-#elif defined(_APPLE_)
-
-////////////////////////////////////////////////////////////////////////////////
-char*** _NSGetEnviron();
-
-////////////////////////////////////////////////////////////////////////////////
-std::vector<std::string> System::getEnvArray() {
-
- std::vector<std::string> buffer;
-
- char **environ = *_NSGetEnviron();
-
- for( int i = 0; *(environ + i); i++ ){
- buffer.push_back( environ[i] );
- }
-
- return buffer;
-}
-
#else
-////////////////////////////////////////////////////////////////////////////////
-extern char** environ;
+#if defined(__APPLE__)
+ #include <crt_externs.h>
+ #define environ (*_NSGetEnviron())
+#else
+ extern char** environ;
+#endif
////////////////////////////////////////////////////////////////////////////////
std::vector<std::string> System::getEnvArray() {