aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-23 03:02:09 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-23 04:44:32 +1000
commit6d451b23a689aa423a885b5fd876cd2316d84e3b (patch)
tree44e2df44a463cd2b6636fc3cceb538e0ecb87cdf /libbb
parent4287ed1ecbe21e7e90b9420b267edf8fe1482b71 (diff)
downloadbusybox-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.c33
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
889void mingw_execvp(const char *cmd, char *const *argv) 889int 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
903char **copy_environ() 904char **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
1221char *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}
1238char *realpath(const char *path, char *resolved_path)
1239{
1240 return strcpy(resolved_path, path);
1241}
1242char *strptime(const char *s, const char *format, struct tm *tm)
1243{
1244 return NULL;
1245}
1246void gitunsetenv(const char *env)
1247{
1248}
1249