Windows: A pipe() replacement whose ends are not inherited to children.
[gitweb.git] / compat / mingw.h
index 95a08b4128d6d5a2017aca18b9b6de59dcbc12ea..0ce9c96f93a57d18588c4e0ba48957fa70ba1d71 100644 (file)
@@ -122,14 +122,11 @@ static inline int waitpid(pid_t pid, unsigned *status, unsigned options)
        return -1;
 }
 
-
-static inline int pipe(int filedes[2])
-{ return _pipe(filedes, 8192, 0); }
-
 /*
  * implementations of missing functions
  */
 
+int pipe(int filedes[2]);
 unsigned int sleep (unsigned int seconds);
 int mkstemp(char *template);
 int gettimeofday(struct timeval *tv, void *tz);
@@ -151,6 +148,15 @@ int mingw_open (const char *filename, int oflags, ...);
 char *mingw_getcwd(char *pointer, int len);
 #define getcwd mingw_getcwd
 
+int mingw_rename(const char*, const char*);
+#define rename mingw_rename
+
+void mingw_execvp(const char *cmd, char *const *argv);
+#define execvp mingw_execvp
+
+sig_handler_t mingw_signal(int sig, sig_handler_t handler);
+#define signal mingw_signal
+
 /*
  * git specific compatibility
  */
@@ -158,3 +164,4 @@ char *mingw_getcwd(char *pointer, int len);
 #define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
 #define is_dir_sep(c) ((c) == '/' || (c) == '\\')
 #define PATH_SEP ';'
+#define PRIuMAX "I64u"