VirtualBox

Changeset 16502 in vbox for trunk/src/VBox/Runtime/r3/posix


Ignore:
Timestamp:
Feb 4, 2009 10:26:18 AM (16 years ago)
Author:
vboxsync
Message:

RTEnvUnset(): Use unsetenv() if available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/env-posix.cpp

    r8245 r16502  
    100100
    101101    /* Ok, try remove it. */
     102#ifdef RT_OS_WINDOWS
     103    /* Windows does not have unsetenv() */
    102104    if (!putenv((char *)pszVar))
    103105        return VINF_SUCCESS;
     106#else
     107    /* This is the preferred function as putenv() like used
     108     * above does neither work on Solaris nor on Darwin. */
     109    if (!unsetenv((char*)pszVar))
     110        return VINF_SUCCESS;
     111#endif
     112
    104113    return RTErrConvertFromErrno(errno);
    105114}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette