aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mingw.h2
-rw-r--r--win32/env.c21
2 files changed, 0 insertions, 23 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 65cccab21..05e0b20fc 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -476,8 +476,6 @@ const char * next_path_sep(const char *path);
476 * helpers 476 * helpers
477 */ 477 */
478 478
479char **copy_environ(const char *const *env);
480void free_environ(char **env);
481char **env_setenv(char **env, const char *name); 479char **env_setenv(char **env, const char *name);
482 480
483const char *get_busybox_exec_path(void); 481const char *get_busybox_exec_path(void);
diff --git a/win32/env.c b/win32/env.c
index 48b86c555..eab3c1708 100644
--- a/win32/env.c
+++ b/win32/env.c
@@ -1,26 +1,5 @@
1#include "libbb.h" 1#include "libbb.h"
2 2
3char **copy_environ(const char *const *envp)
4{
5 char **env;
6 int i = 0;
7 while (envp[i])
8 i++;
9 env = xmalloc((i+1)*sizeof(*env));
10 for (i = 0; envp[i]; i++)
11 env[i] = xstrdup(envp[i]);
12 env[i] = NULL;
13 return env;
14}
15
16void free_environ(char **env)
17{
18 int i;
19 for (i = 0; env[i]; i++)
20 free(env[i]);
21 free(env);
22}
23
24static int lookup_env(char **env, const char *name, size_t nmln) 3static int lookup_env(char **env, const char *name, size_t nmln)
25{ 4{
26 int i; 5 int i;