From e0c9a54e11e1acf965b43c6abfac7a883a8565ed Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 12 Nov 2007 13:00:06 +0100 Subject: [PATCH] Clean up some dummy compatibility implementations. In particular, sync() was never declared and caused a warning. --- compat/mingw.c | 4 ---- git-compat-util.h | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/compat/mingw.c b/compat/mingw.c index f464fdb63d..befdb147ca 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -315,10 +315,6 @@ char *mingw_getcwd(char *pointer, int len) return ret; } -void sync(void) -{ -} - void openlog(const char *ident, int option, int facility) { } diff --git a/git-compat-util.h b/git-compat-util.h index 71887ee6ae..d0c0884fc9 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -505,9 +505,9 @@ int mingw_socket(int domain, int type, int protocol); int mingw_rename(const char*, const char*); #define rename mingw_rename -#define setlinebuf(x) -#define fsync(x) 0 -#define getppid() 1 +static inline int fsync(int fd) { return 0; } +static inline int getppid(void) { return 1; } +static inline void sync(void) {} extern void quote_argv(const char **dst, const char **src); extern const char *parse_interpreter(const char *cmd);