stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r534993 - /incubator/stdcxx/trunk/tests/src/environ.cpp
Date Thu, 03 May 2007 21:52:03 GMT
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  <sebor@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



Mime
View raw message