path: root/compat/mingw.h
diff options
authorEric Sunshine <>2010-09-27 11:02:17 (GMT)
committerPat Thoyts <>2010-10-03 22:34:25 (GMT)
commit5debf9a5ac89e9ba49dedc960078cf22bba25c50 (patch)
tree0780e10f007f450e444f31490c8c3f59e02aa53e /compat/mingw.h
parent77df1f1edfab61bf605f707aeb3b5f5bd54ffb76 (diff)
Add MinGW-specific execv() override.
As of 2dbc887e, shell.c employs execv(), so provide a MinGW-specific mingw_execv() override, complementing existing mingw_execvp() and cousins. As a bonus, this also resolves a compilation warning due to an execv() prototype mismatch between Linux and MinGW. Linux expects the second argument to be (char *const *), whereas MinGW expects (const char *const *). Acked-by: Johannes Schindelin <> Acked-by: Johannes Sixt <> Signed-off-by: Eric Sunshine <> Signed-off-by: Pat Thoyts <>
Diffstat (limited to 'compat/mingw.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index a2213b3..83e35e8 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -256,6 +256,8 @@ pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env,
int fhin, int fhout, int fherr);
void mingw_execvp(const char *cmd, char *const *argv);
#define execvp mingw_execvp
+void mingw_execv(const char *cmd, char *const *argv);
+#define execv mingw_execv
static inline unsigned int git_ntohl(unsigned int x)
{ return (unsigned int)ntohl(x); }