Commits

Caol?n McNamara  committed d2b38bb

cmcfixes76: #i112656# osl_clearEnvironment, MacOSX 10.4 has old-school void ret unsetenv

  • Participants
  • Parent commits 7ae9755

Comments (0)

Files changed (1)

File sal/osl/unx/process_impl.cxx

 
 		if (putenv(rtl_string_getStr(pBuffer)) == 0)
 			result = osl_Process_E_None;
+#elif (defined(MACOSX) || defined(NETBSD) || defined(FREEBSD))
+		//MacOSX baseline is 10.4, which has an old-school void return
+		//for unsetenv.
+                //See: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/10.4/man3/unsetenv.3.html?useVersion=10.4
+		unsetenv(rtl_string_getStr(pstr_env_var));
+		result = osl_Process_E_None;
 #else
 		if (unsetenv(rtl_string_getStr(pstr_env_var)) == 0)
 			result = osl_Process_E_None;