Changeset 20821 in vbox for trunk/src/VBox/Runtime/r3/posix
- Timestamp:
- Jun 23, 2009 12:42:19 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48960
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/env-posix.cpp
r16526 r20821 41 41 #include <iprt/alloca.h> 42 42 #include <iprt/assert.h> 43 #if defined(DEBUG) && defined(RT_OS_LINUX) 44 # include <iprt/asm.h> 45 #endif 43 46 44 47 #include <stdlib.h> 45 48 #include <errno.h> 46 49 50 #include "internal/alignmentchecks.h" 51 47 52 48 53 RTDECL(bool) RTEnvExist(const char *pszVar) 49 54 { 50 return getenv(pszVar) != NULL;55 return RTEnvGet(pszVar) != NULL; 51 56 } 52 57 … … 54 59 RTDECL(const char *) RTEnvGet(const char *pszVar) 55 60 { 56 return getenv(pszVar); 61 IPRT_ALIGNMENT_CHECKS_DISABLE(); /* glibc causes trouble */ 62 const char *pszValue = getenv(pszVar); 63 IPRT_ALIGNMENT_CHECKS_ENABLE(); 64 return pszValue; 57 65 } 58 66 … … 86 94 return 0; 87 95 return RTErrConvertFromErrno(errno); 88 96 89 97 #else 90 98 if (!setenv(pszVar, pszValue, 1)) 91 99 return VINF_SUCCESS; 92 100 return RTErrConvertFromErrno(errno); 93 #endif 101 #endif 94 102 } 95 103
Note:
See TracChangeset
for help on using the changeset viewer.