aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-07-03 14:12:47 +0100
committerRon Yorston <rmy@pobox.com>2015-07-03 14:12:47 +0100
commit9fc98788e4fb1ea1f330d44c8b2019b3fe6444f7 (patch)
tree7620816f022d765923bbd678dcc9aa968cc7f009 /include
parent171bc72f6a8f996376ca02e44edd56409b27a927 (diff)
downloadbusybox-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.h8
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
193int clearenv(void); 193int clearenv(void);
194char *mingw_getenv(const char *name); 194char *mingw_getenv(const char *name);
195int mingw_putenv(const char *env);
195char *mingw_mktemp(char *template); 196char *mingw_mktemp(char *template);
196int mkstemp(char *template); 197int mkstemp(char *template);
197char *realpath(const char *path, char *resolved_path); 198char *realpath(const char *path, char *resolved_path);
198int setenv(const char *name, const char *value, int replace); 199int setenv(const char *name, const char *value, int replace);
200#if ENABLE_SAFE_ENV
201int unsetenv(const char *env);
202#else
199void unsetenv(const char *env); 203void 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/*