diff options
Diffstat (limited to 'compat/mingw.c')
-rw-r--r-- | compat/mingw.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 075448d245..4e559bdc93 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -40,6 +40,19 @@ struct tm *localtime_r(const time_t *timep, struct tm *result) return result; } +#undef getcwd +char *mingw_getcwd(char *pointer, int len) +{ + int i; + char *ret = getcwd(pointer, len); + if (!ret) + return ret; + for (i = 0; pointer[i]; i++) + if (pointer[i] == '\\') + pointer[i] = '/'; + return ret; +} + struct passwd *getpwuid(int uid) { static struct passwd p; |