diff options
author | Ron Yorston <rmy@pobox.com> | 2015-07-03 14:12:47 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-07-03 14:12:47 +0100 |
commit | 9fc98788e4fb1ea1f330d44c8b2019b3fe6444f7 (patch) | |
tree | 7620816f022d765923bbd678dcc9aa968cc7f009 /include | |
parent | 171bc72f6a8f996376ca02e44edd56409b27a927 (diff) | |
download | busybox-w32-9fc98788e4fb1ea1f330d44c8b2019b3fe6444f7.tar.gz busybox-w32-9fc98788e4fb1ea1f330d44c8b2019b3fe6444f7.tar.bz2 busybox-w32-9fc98788e4fb1ea1f330d44c8b2019b3fe6444f7.zip |
Allow different ways to manipulate environment for XP vs 64-bit
Commit fa147bd 'Use putenv to implement unsetenv/clearenv' allowed
BusyBox to run on ReactOS but broke it on Windows XP so it was
reverted.
It turns out that the same change is required on 64-bit Windows.
Reinstate the 'safe' environment manipulation code but make it a
configuration option. Add a config file for 64-bit Windows that
does the right thing.
Diffstat (limited to 'include')
-rw-r--r-- | include/mingw.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h index a32d78ad0..fa760342b 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -192,13 +192,21 @@ int mingw_system(const char *cmd); | |||
192 | 192 | ||
193 | int clearenv(void); | 193 | int clearenv(void); |
194 | char *mingw_getenv(const char *name); | 194 | char *mingw_getenv(const char *name); |
195 | int mingw_putenv(const char *env); | ||
195 | char *mingw_mktemp(char *template); | 196 | char *mingw_mktemp(char *template); |
196 | int mkstemp(char *template); | 197 | int mkstemp(char *template); |
197 | char *realpath(const char *path, char *resolved_path); | 198 | char *realpath(const char *path, char *resolved_path); |
198 | int setenv(const char *name, const char *value, int replace); | 199 | int setenv(const char *name, const char *value, int replace); |
200 | #if ENABLE_SAFE_ENV | ||
201 | int unsetenv(const char *env); | ||
202 | #else | ||
199 | void unsetenv(const char *env); | 203 | void unsetenv(const char *env); |
204 | #endif | ||
200 | 205 | ||
201 | #define getenv mingw_getenv | 206 | #define getenv mingw_getenv |
207 | #if ENABLE_SAFE_ENV | ||
208 | #define putenv mingw_putenv | ||
209 | #endif | ||
202 | #define mktemp mingw_mktemp | 210 | #define mktemp mingw_mktemp |
203 | 211 | ||
204 | /* | 212 | /* |