You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/05/03 23:52:03 UTC
svn commit: r534993 - /incubator/stdcxx/trunk/tests/src/environ.cpp
Author: sebor
Date: Thu May 3 14:52:01 2007
New Revision: 534993
URL: http://svn.apache.org/viewvc?view=rev&rev=534993
Log:
2007-05-03 Martin Sebor <se...@roguewave.com>
* environ.cpp [FreeBSD] (rw_putenv): Ignored unsetenv() return
value since the function is declared to return void on FreeBSD.
Modified:
incubator/stdcxx/trunk/tests/src/environ.cpp
Modified: incubator/stdcxx/trunk/tests/src/environ.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/environ.cpp?view=diff&rev=534993&r1=534992&r2=534993
==============================================================================
--- incubator/stdcxx/trunk/tests/src/environ.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/environ.cpp Thu May 3 14:52:01 2007
@@ -134,10 +134,17 @@
// try to remove variable from the environment
#ifndef _RWSTD_NO_UNSETENV
+# ifdef _RWSTD_OS_FREEBSD
+ // FreeBSD declares void unsetenv(const char*)
+ // http://www.freebsd.org/cgi/man.cgi?query=unsetenv&sektion=3
+ unsetenv (envvar);
+ ret = 0;
+# else // !FreeBSD
ret = unsetenv (envvar);
-#else
+# endif // FreeBSD
+#else // ifdef _RWSTD_NO_UNSETENV
ret = putenv (envvar);
-#endif
+#endif // _RWSTD_NO_UNSETENV
if (0 == ret) {
// see if the variable has been removed