From 6d451b23a689aa423a885b5fd876cd2316d84e3b Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Thu, 23 Apr 2009 03:02:09 +1000 Subject: mingw.c: general cleanup and new missing functions --- libbb/mingw.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'libbb') 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) } } -void mingw_execvp(const char *cmd, char *const *argv) +int mingw_execvp(const char *cmd, char *const *argv) { char **path = get_path_split(); char *prog = path_lookup(cmd, path, 0); @@ -898,6 +898,7 @@ void mingw_execvp(const char *cmd, char *const *argv) errno = ENOENT; free_path_split(path); + return -1; } char **copy_environ() @@ -1216,3 +1217,33 @@ int link(const char *oldpath, const char *newpath) } return 0; } + +char *strsep(char **stringp, const char *delim) +{ + char *s, *old_stringp; + if (!*stringp) + return NULL; + old_stringp = s = *stringp; + while (*s) { + if (strchr(delim, *s)) { + *s = '\0'; + *stringp = s+1; + return old_stringp; + } + s++; + } + *stringp = NULL; + return old_stringp; +} +char *realpath(const char *path, char *resolved_path) +{ + return strcpy(resolved_path, path); +} +char *strptime(const char *s, const char *format, struct tm *tm) +{ + return NULL; +} +void gitunsetenv(const char *env) +{ +} + -- cgit v1.2.3-55-g6feb