aboutsummaryrefslogtreecommitdiff
path: root/include/mingw.h
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-11-23 17:35:35 +0000
committerRon Yorston <rmy@pobox.com>2014-11-23 17:35:35 +0000
commitfa147bd7ecb086f4fb9a4afea16b946693a822ce (patch)
tree47dbbde0118eea176dce159069f4b2fe9a3d79ca /include/mingw.h
parent0e0b5e9ff840b6a26a0ad798ad68c07209c527b4 (diff)
downloadbusybox-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.h4
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
181int clearenv(void); 181int clearenv(void);
182char *mingw_getenv(const char *name); 182char *mingw_getenv(const char *name);
183int mingw_putenv(const char *env);
183char *mingw_mktemp(char *template); 184char *mingw_mktemp(char *template);
184int mkstemp(char *template); 185int mkstemp(char *template);
185char *realpath(const char *path, char *resolved_path); 186char *realpath(const char *path, char *resolved_path);
186int setenv(const char *name, const char *value, int replace); 187int setenv(const char *name, const char *value, int replace);
187void unsetenv(const char *env); 188int 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/*