diff options
author | Paul Betts <paul@paulbetts.org> | 2011-09-19 12:36:12 -0700 |
---|---|---|
committer | Paul Betts <paul@paulbetts.org> | 2011-09-19 13:14:04 -0700 |
commit | 7998ae5ab1d7a37860e10cdb34b3da1532b6efb0 (patch) | |
tree | 68e89633c2be37b5f54b9deba435f3993344c7cf /src/win32/posix.h | |
parent | c498701df7700695e287ea0e2f08062f9147b3a6 (diff) | |
download | libgit2-7998ae5ab1d7a37860e10cdb34b3da1532b6efb0.tar.gz |
Rewrite p_* functions to use Unicode and marshal to UTF8 internally
Diffstat (limited to 'src/win32/posix.h')
-rw-r--r-- | src/win32/posix.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/win32/posix.h b/src/win32/posix.h index 58fd05007..4c45fd3e4 100644 --- a/src/win32/posix.h +++ b/src/win32/posix.h @@ -9,6 +9,7 @@ #include "common.h" #include "fnmatch.h" +#include "utf8-conv.h" GIT_INLINE(int) p_link(const char *GIT_UNUSED(old), const char *GIT_UNUSED(new)) { @@ -20,8 +21,13 @@ GIT_INLINE(int) p_link(const char *GIT_UNUSED(old), const char *GIT_UNUSED(new)) GIT_INLINE(int) p_mkdir(const char *path, int GIT_UNUSED(mode)) { + wchar_t* buf = conv_utf8_to_utf16(path); + int ret = _wmkdir(buf); + GIT_UNUSED_ARG(mode) - return mkdir(path); + + free(buf); + return ret; } extern int p_unlink(const char *path); @@ -33,5 +39,10 @@ extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list a extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4); extern int p_mkstemp(char *tmp_path); extern int p_setenv(const char* name, const char* value, int overwrite); +extern int p_stat(const char* path, struct stat* buf); +extern int p_chdir(const char* path); +extern int p_chmod(const char* path, int mode); +extern int p_rmdir(const char* path); + #endif |