todo: replace by an autoconf macro to check existence of setenv
{
const char* value;
(*it).second >>= value;
+ // --- todo: replace __GNUC__ test by an autoconf macro AC_CHECK_FUNC...
+#if defined __GNUC__
+ int ret = setenv(cle.c_str(), value, overwrite);
+#else
//CCRT porting : setenv not defined in stdlib.h
std::string s(cle);
s+='=';
//char* cast because 1st arg of linux putenv function is not a const char* !!!
int ret=putenv((char *)s.c_str());
//End of CCRT porting
- //int ret = setenv(cle.c_str(), value, overwrite);
+#endif
MESSAGE("--- setenv: "<<cle<<" = "<< value);
}
}