aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Herbert Valerio Riedel <hvr@gnu.org>2014-12-06 15:39:12 +0100
committerGravatar Herbert Valerio Riedel <hvr@gnu.org>2014-12-06 15:47:36 +0100
commitf24ba78f68b2cbc4f4afadc8dd60fc2935357255 (patch)
treef0f82b0a48222905cf12da233c5b5b3eb2392cac /include
parent123fcba7125c3b94ad35c3d7dfe31c715a79a470 (diff)
Refactor local `execvpe(3)` implementation
The previous code was prone to conflicts with when the platform happens to expose a `execvpe(3)` implementation in its libc. This commit renames the internal implementation to `__hsunix_execvpe` as well as adding an autoconf-detection for the presence of `execvpe(3)`, in which case `__hsunix_execvpe()` forwards the call to `execvpe(3)`. Moreover, the code has been cleaned up to remove likely bitrotted CPP conditionals. This should fix #22 (This also partially addresses #11 on platforms which have a libc-provided `execvpe(3)`)
Diffstat (limited to 'include')
-rw-r--r--include/execvpe.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/include/execvpe.h b/include/execvpe.h
index c3b2dd3..1d49e35 100644
--- a/include/execvpe.h
+++ b/include/execvpe.h
@@ -1,27 +1,11 @@
/* ----------------------------------------------------------------------------
(c) The University of Glasgow 2004
- Interface for code in execvpe.c
+ Interface for code in cbits/execvpe.c
------------------------------------------------------------------------- */
-#include "HsUnixConfig.h"
-// Otherwise these clash with similar definitions from other packages:
-#undef PACKAGE_BUGREPORT
-#undef PACKAGE_NAME
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-#undef PACKAGE_VERSION
+extern int
+__hsunix_execvpe(const char *name, char *const argv[], char *const envp[]);
-#include <errno.h>
-#include <sys/types.h>
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32)
-#ifndef __QNXNTO__
-extern int execvpe(char *name, char *const argv[], char **envp);
-#endif
+// implemented in cbits/ghcrts.c
extern void pPrPr_disableITimers (void);
-#endif
-