diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-04-23 03:02:09 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-04-23 04:44:32 +1000 |
commit | 6d451b23a689aa423a885b5fd876cd2316d84e3b (patch) | |
tree | 44e2df44a463cd2b6636fc3cceb538e0ecb87cdf /libbb | |
parent | 4287ed1ecbe21e7e90b9420b267edf8fe1482b71 (diff) | |
download | busybox-w32-6d451b23a689aa423a885b5fd876cd2316d84e3b.tar.gz busybox-w32-6d451b23a689aa423a885b5fd876cd2316d84e3b.tar.bz2 busybox-w32-6d451b23a689aa423a885b5fd876cd2316d84e3b.zip |
mingw.c: general cleanup and new missing functions
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/mingw.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/libbb/mingw.c b/libbb/mingw.c index 62aad5d7e..181999f3f 100644 --- a/libbb/mingw.c +++ b/libbb/mingw.c | |||
@@ -886,7 +886,7 @@ static void mingw_execve(const char *cmd, char *const *argv, char *const *env) | |||
886 | } | 886 | } |
887 | } | 887 | } |
888 | 888 | ||
889 | void mingw_execvp(const char *cmd, char *const *argv) | 889 | int mingw_execvp(const char *cmd, char *const *argv) |
890 | { | 890 | { |
891 | char **path = get_path_split(); | 891 | char **path = get_path_split(); |
892 | char *prog = path_lookup(cmd, path, 0); | 892 | char *prog = path_lookup(cmd, path, 0); |
@@ -898,6 +898,7 @@ void mingw_execvp(const char *cmd, char *const *argv) | |||
898 | errno = ENOENT; | 898 | errno = ENOENT; |
899 | 899 | ||
900 | free_path_split(path); | 900 | free_path_split(path); |
901 | return -1; | ||
901 | } | 902 | } |
902 | 903 | ||
903 | char **copy_environ() | 904 | char **copy_environ() |
@@ -1216,3 +1217,33 @@ int link(const char *oldpath, const char *newpath) | |||
1216 | } | 1217 | } |
1217 | return 0; | 1218 | return 0; |
1218 | } | 1219 | } |
1220 | |||
1221 | char *strsep(char **stringp, const char *delim) | ||
1222 | { | ||
1223 | char *s, *old_stringp; | ||
1224 | if (!*stringp) | ||
1225 | return NULL; | ||
1226 | old_stringp = s = *stringp; | ||
1227 | while (*s) { | ||
1228 | if (strchr(delim, *s)) { | ||
1229 | *s = '\0'; | ||
1230 | *stringp = s+1; | ||
1231 | return old_stringp; | ||
1232 | } | ||
1233 | s++; | ||
1234 | } | ||
1235 | *stringp = NULL; | ||
1236 | return old_stringp; | ||
1237 | } | ||
1238 | char *realpath(const char *path, char *resolved_path) | ||
1239 | { | ||
1240 | return strcpy(resolved_path, path); | ||
1241 | } | ||
1242 | char *strptime(const char *s, const char *format, struct tm *tm) | ||
1243 | { | ||
1244 | return NULL; | ||
1245 | } | ||
1246 | void gitunsetenv(const char *env) | ||
1247 | { | ||
1248 | } | ||
1249 | |||