summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2020-05-30 13:19:13 +0300
committerEli Zaretskii <eliz@gnu.org>2020-05-30 13:19:13 +0300
commita8ad94cd2fccfd9e931518a06cf2f7c94b3785f5 (patch)
tree73f6e927f20505ad2e8db9f763e9786eb3e65d6e
parentbd7b681dc432ce77fbe3634c919fe49ca335f8e1 (diff)
downloademacs-a8ad94cd2fccfd9e931518a06cf2f7c94b3785f5.tar.gz
Fix mingw.org's MinGW GCC 9 warning about 'execve'
* nt/inc/ms-w32.h (execve) [__GNUC__ > 9]: Provide a different prototype for mingw.org's MinGW as well, to match the GCC builtin.
-rw-r--r--nt/inc/ms-w32.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index 4693900f2dc..e5d9fd3e78e 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -309,7 +309,12 @@ extern intptr_t _execvp (const char *, char **);
the code that references it is still compiled. */
extern int execve (const char *, char * const *, char * const *);
#else
+/* mingw.org's MinGW GCC 9.x has the same built-in prototype... */
+# if __GNUC__ >= 9
+extern int execve (const char *, char * const *, char * const *);
+# else
extern intptr_t execve (const char *, char * const *, char * const *);
+# endif
#endif
#define tcdrain _commit
#define fdopen _fdopen