diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-14 07:00:16 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-10 18:40:27 +1000 |
commit | 4fc9774cb660ea99f90466c4253413447e23e2d0 (patch) | |
tree | 4cf60c70944e769fa01a5a1b993d82cfa5be9abe | |
parent | 63b80e79f69beec9a375f53d5cd8f20f55fb4746 (diff) | |
download | busybox-w32-4fc9774cb660ea99f90466c4253413447e23e2d0.tar.gz busybox-w32-4fc9774cb660ea99f90466c4253413447e23e2d0.tar.bz2 busybox-w32-4fc9774cb660ea99f90466c4253413447e23e2d0.zip |
win32: add realpath()
-rw-r--r-- | include/mingw.h | 2 | ||||
-rw-r--r-- | win32/mingw.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index 7fff1ad38..0eb97d516 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -132,7 +132,7 @@ int fdprintf(int fd, const char *format, ...); | |||
132 | NOIMPL(clearenv,void); | 132 | NOIMPL(clearenv,void); |
133 | IMPL(mingw_getenv,char*,NULL,const char *name UNUSED_PARAM); | 133 | IMPL(mingw_getenv,char*,NULL,const char *name UNUSED_PARAM); |
134 | int mkstemp(char *template); | 134 | int mkstemp(char *template); |
135 | IMPL(realpath,char *,NULL,const char *path UNUSED_PARAM, char *resolved_path UNUSED_PARAM); | 135 | char *realpath(const char *path, char *resolved_path); |
136 | NOIMPL(setenv,const char *name UNUSED_PARAM, const char *value UNUSED_PARAM, int replace UNUSED_PARAM); | 136 | NOIMPL(setenv,const char *name UNUSED_PARAM, const char *value UNUSED_PARAM, int replace UNUSED_PARAM); |
137 | IMPL(unsetenv,void,,const char *env UNUSED_PARAM); | 137 | IMPL(unsetenv,void,,const char *env UNUSED_PARAM); |
138 | 138 | ||
diff --git a/win32/mingw.c b/win32/mingw.c index 937e9422c..b879bfbae 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -366,3 +366,9 @@ char *strsep(char **stringp, const char *delim) | |||
366 | *stringp = NULL; | 366 | *stringp = NULL; |
367 | return old_stringp; | 367 | return old_stringp; |
368 | } | 368 | } |
369 | |||
370 | char *realpath(const char *path, char *resolved_path) | ||
371 | { | ||
372 | /* FIXME: need normalization */ | ||
373 | return strcpy(resolved_path, path); | ||
374 | } | ||