]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix mingw.org's MinGW GCC 9 warning about 'execve'
authorEli Zaretskii <eliz@gnu.org>
Sat, 30 May 2020 10:19:13 +0000 (13:19 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 30 May 2020 10:19:13 +0000 (13:19 +0300)
* nt/inc/ms-w32.h (execve) [__GNUC__ > 9]: Provide a different
prototype for mingw.org's MinGW as well, to match the GCC builtin.

nt/inc/ms-w32.h

index 4693900f2dc06027cbb04b13ff58d59133ad9ea9..e5d9fd3e78eae568478f213cc444f67a1ee7b679 100644 (file)
@@ -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