X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=compat%2Fmingw.h;h=f465566b7a5b8c852cad9b41e853aa97ba673b61;hb=cf4403a01070f03e5c5cc65b52c1351d20ff4e91;hp=7c2ab64cb4eb7532c2495383ab0e7eefb329bcf9;hpb=e8a12280530f16bf2089999ceefe35794d115d07;p=git.git diff --git a/compat/mingw.h b/compat/mingw.h index 7c2ab64cb..3b2477be5 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -80,7 +80,7 @@ static inline int fork(void) static inline unsigned int alarm(unsigned int seconds) { return 0; } static inline int fsync(int fd) -{ return 0; } +{ return _commit(fd); } static inline int getppid(void) { return 1; } static inline void sync(void) @@ -89,7 +89,7 @@ static inline int getuid() { return 1; } static inline struct passwd *getpwnam(const char *name) { return NULL; } -static inline int fcntl(int fd, int cmd, long arg) +static inline int fcntl(int fd, int cmd, ...) { if (cmd == F_GETFD || cmd == F_SETFD) return 0; @@ -170,6 +170,9 @@ int link(const char *oldpath, const char *newpath); int mingw_open (const char *filename, int oflags, ...); #define open mingw_open +ssize_t mingw_write(int fd, const void *buf, size_t count); +#define write mingw_write + FILE *mingw_fopen (const char *filename, const char *otype); #define fopen mingw_fopen