[commit: packages/unix] master: Provide execvpe prototype if missing (2796361)

git at git.haskell.org git at git.haskell.org
Tue Apr 19 21:38:15 UTC 2016


Repository : ssh://git@git.haskell.org/unix

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2796361516ebf60825189018cea24d2c5c24ea34/unix

>---------------------------------------------------------------

commit 2796361516ebf60825189018cea24d2c5c24ea34
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Jan 31 10:03:46 2016 +0100

    Provide execvpe prototype if missing


>---------------------------------------------------------------

2796361516ebf60825189018cea24d2c5c24ea34
 cbits/execvpe.c | 5 +++++
 configure.ac    | 1 +
 2 files changed, 6 insertions(+)

diff --git a/cbits/execvpe.c b/cbits/execvpe.c
index 82e1bdc..708b8b2 100644
--- a/cbits/execvpe.c
+++ b/cbits/execvpe.c
@@ -25,6 +25,11 @@
 #define HSUNIX_EXECVPE_H_NO_COMPAT
 #include "execvpe.h"
 
+#if !defined(execvpe) && !HAVE_DECL_EXECVPE
+// On some archs such as AIX, the prototype may be missing
+int execvpe(const char *file, char *const argv[], char *const envp[]);
+#endif
+
 /*
  * We want the search semantics of execvp, but we want to provide our
  * own environment, like execve.  The following copyright applies to
diff --git a/configure.ac b/configure.ac
index f883624..5b6eb7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,7 @@ dnl not available on android so check for it
 AC_CHECK_FUNCS([telldir seekdir])
 
 dnl This is e.g. available as a GNU extension in glibc 2.11+
+AC_CHECK_DECLS([execvpe])
 AC_CHECK_FUNCS([execvpe])
 
 AC_CHECK_MEMBERS([struct stat.st_atim])



More information about the ghc-commits mailing list