diff options
Diffstat (limited to 'libbb/setup_environment.c')
-rw-r--r-- | libbb/setup_environment.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c index c583206f0..f8de44967 100644 --- a/libbb/setup_environment.c +++ b/libbb/setup_environment.c | |||
@@ -29,14 +29,6 @@ | |||
29 | */ | 29 | */ |
30 | #include "libbb.h" | 30 | #include "libbb.h" |
31 | 31 | ||
32 | #if ENABLE_PLATFORM_MINGW32 | ||
33 | static void xsetenv_if_unset(const char *key, const char *value) | ||
34 | { | ||
35 | if (!getenv(key)) | ||
36 | xsetenv(key, value); | ||
37 | } | ||
38 | #endif | ||
39 | |||
40 | void FAST_FUNC setup_environment(const char *shell, int flags, const struct passwd *pw) | 32 | void FAST_FUNC setup_environment(const char *shell, int flags, const struct passwd *pw) |
41 | { | 33 | { |
42 | if (!shell || !shell[0]) | 34 | if (!shell || !shell[0]) |
@@ -68,9 +60,6 @@ void FAST_FUNC setup_environment(const char *shell, int flags, const struct pass | |||
68 | //xsetenv("HOME", pw->pw_dir); | 60 | //xsetenv("HOME", pw->pw_dir); |
69 | //xsetenv("SHELL", shell); | 61 | //xsetenv("SHELL", shell); |
70 | } else if (flags & SETUP_ENV_CHANGEENV) { | 62 | } else if (flags & SETUP_ENV_CHANGEENV) { |
71 | #if ENABLE_PLATFORM_MINGW32 | ||
72 | #define xsetenv(k, v) xsetenv_if_unset(k, v) | ||
73 | #endif | ||
74 | /* Set HOME, SHELL, and if not becoming a super-user, | 63 | /* Set HOME, SHELL, and if not becoming a super-user, |
75 | * USER and LOGNAME. */ | 64 | * USER and LOGNAME. */ |
76 | if (pw->pw_uid) { | 65 | if (pw->pw_uid) { |