diff options
author | Ron Yorston <rmy@pobox.com> | 2014-11-23 17:35:35 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2014-11-23 17:35:35 +0000 |
commit | fa147bd7ecb086f4fb9a4afea16b946693a822ce (patch) | |
tree | 47dbbde0118eea176dce159069f4b2fe9a3d79ca /include/mingw.h | |
parent | 0e0b5e9ff840b6a26a0ad798ad68c07209c527b4 (diff) | |
download | busybox-w32-fa147bd7ecb086f4fb9a4afea16b946693a822ce.tar.gz busybox-w32-fa147bd7ecb086f4fb9a4afea16b946693a822ce.tar.bz2 busybox-w32-fa147bd7ecb086f4fb9a4afea16b946693a822ce.zip |
Use putenv to implement unsetenv/clearenv
noexec applets failed on ReactOS 0.3.17. This was because the
environment was being manipulated directly using the environ pointer.
Implementing unsetenv and clearenv using putenv fixes the problem.
WIN32 putenv doesn't allow environment variables to have empty
values. This was the case before and it's still the case after
this change. Shell variables are fine.
Diffstat (limited to 'include/mingw.h')
-rw-r--r-- | include/mingw.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index 7caedd063..654ca3ee6 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -180,13 +180,15 @@ int mingw_system(const char *cmd); | |||
180 | 180 | ||
181 | int clearenv(void); | 181 | int clearenv(void); |
182 | char *mingw_getenv(const char *name); | 182 | char *mingw_getenv(const char *name); |
183 | int mingw_putenv(const char *env); | ||
183 | char *mingw_mktemp(char *template); | 184 | char *mingw_mktemp(char *template); |
184 | int mkstemp(char *template); | 185 | int mkstemp(char *template); |
185 | char *realpath(const char *path, char *resolved_path); | 186 | char *realpath(const char *path, char *resolved_path); |
186 | int setenv(const char *name, const char *value, int replace); | 187 | int setenv(const char *name, const char *value, int replace); |
187 | void unsetenv(const char *env); | 188 | int unsetenv(const char *env); |
188 | 189 | ||
189 | #define getenv mingw_getenv | 190 | #define getenv mingw_getenv |
191 | #define putenv mingw_putenv | ||
190 | #define mktemp mingw_mktemp | 192 | #define mktemp mingw_mktemp |
191 | 193 | ||
192 | /* | 194 | /* |