X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=compat%2Fmingw.h;h=3b2477be5f658be665f19a12b48cc47fa07d1c6b;hb=0a4139b5f283ef5e817afaafd9e7e2a149220cc4;hp=e254fb4e068c3248a1aac33d70e40b620cd91088;hpb=28bf4ba014c9b41679f41580fa9e1cc294b240d9;p=git.git diff --git a/compat/mingw.h b/compat/mingw.h index e254fb4e0..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,15 @@ 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 + +FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream); +#define freopen mingw_freopen + char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd @@ -223,6 +232,7 @@ int mingw_utime(const char *file_name, const struct utimbuf *times); #define utime mingw_utime pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env, + const char *dir, int fhin, int fhout, int fherr); void mingw_execvp(const char *cmd, char *const *argv); #define execvp mingw_execvp