summaryrefslogtreecommitdiff
path: root/src/posix.h
diff options
context:
space:
mode:
authorPaul Betts <paul@paulbetts.org>2011-09-19 12:36:12 -0700
committerPaul Betts <paul@paulbetts.org>2011-09-19 13:14:04 -0700
commit7998ae5ab1d7a37860e10cdb34b3da1532b6efb0 (patch)
tree68e89633c2be37b5f54b9deba435f3993344c7cf /src/posix.h
parentc498701df7700695e287ea0e2f08062f9147b3a6 (diff)
downloadlibgit2-7998ae5ab1d7a37860e10cdb34b3da1532b6efb0.tar.gz
Rewrite p_* functions to use Unicode and marshal to UTF8 internally
Diffstat (limited to 'src/posix.h')
-rw-r--r--src/posix.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/posix.h b/src/posix.h
index 7c1ac66c5..48b0255bc 100644
--- a/src/posix.h
+++ b/src/posix.h
@@ -33,19 +33,26 @@ typedef int git_file;
* Use your manpages to check the docs on these.
* Straightforward
*/
-extern int p_open(const char *path, int flags);
-extern int p_creat(const char *path, int mode);
+
extern int p_read(git_file fd, void *buf, size_t cnt);
extern int p_write(git_file fd, const void *buf, size_t cnt);
-extern int p_getcwd(char *buffer_out, size_t size);
+#define p_fstat(f,b) fstat(f, b)
#define p_lseek(f,n,w) lseek(f, n, w)
+#define p_close(fd) close(fd)
+
+extern int p_open(const char *path, int flags);
+extern int p_creat(const char *path, int mode);
+extern int p_getcwd(char *buffer_out, size_t size);
+
+#ifndef GIT_WIN32
+
#define p_stat(p,b) stat(p, b)
-#define p_fstat(f,b) fstat(f, b)
#define p_chdir(p) chdir(p)
#define p_rmdir(p) rmdir(p)
#define p_chmod(p,m) chmod(p, m)
-#define p_close(fd) close(fd)
+
+#endif
/**
* Platform-dependent methods