summaryrefslogtreecommitdiff
path: root/compat/mingw.c
diff options
context:
space:
mode:
authorLibravatar Eric Sunshine <sunshine@sunshineco.com>2010-09-27 07:02:17 -0400
committerLibravatar Pat Thoyts <patthoyts@users.sourceforge.net>2010-10-03 23:34:25 +0100
commit5debf9a5ac89e9ba49dedc960078cf22bba25c50 (patch)
tree0780e10f007f450e444f31490c8c3f59e02aa53e /compat/mingw.c
parentFix Windows-specific macro redefinition warning. (diff)
downloadtgif-5debf9a5ac89e9ba49dedc960078cf22bba25c50.tar.xz
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 <johannes.schindelin@gmx.de> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index bd1403a1d5..6590f33cc8 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -904,6 +904,11 @@ void mingw_execvp(const char *cmd, char *const *argv)
free_path_split(path);
}
+void mingw_execv(const char *cmd, char *const *argv)
+{
+ mingw_execve(cmd, argv, environ);
+}
+
static char **copy_environ(void)
{
char **env;