Skip to content
Snippets Groups Projects
Commit 59861061 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel :man_dancing:
Browse files

Tweak execvpe.h hack (see 256b1918) some more

parent 98eced86
No related branches found
No related tags found
No related merge requests found
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#include "execvpe.h" #include "HsUnixConfig.h"
#if HAVE_EXECVPE #if HAVE_EXECVPE
# define _GNU_SOURCE # define _GNU_SOURCE
#else
# undef execvpe
#endif #endif
#include <errno.h> #include <errno.h>
...@@ -28,6 +26,9 @@ ...@@ -28,6 +26,9 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#define HSUNIX_EXECVPE_H_NO_COMPAT
#include "execvpe.h"
/* /*
* We want the search semantics of execvp, but we want to provide our * We want the search semantics of execvp, but we want to provide our
* own environment, like execve. The following copyright applies to * own environment, like execve. The following copyright applies to
......
#include "execvpe.h"
#ifdef __GLASGOW_HASKELL__ #ifdef __GLASGOW_HASKELL__
// for 'void StopTimer(void)' prototype // for 'void StopTimer(void)' prototype
# include "Rts.h" # include "Rts.h"
#endif #endif
#define HSUNIX_EXECVPE_H_NO_COMPAT
#include "execvpe.h"
/* Copied verbatim from ghc/lib/std/cbits/system.c. */ /* Copied verbatim from ghc/lib/std/cbits/system.c. */
void pPrPr_disableITimers (void) void pPrPr_disableITimers (void)
{ {
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
#ifndef HSUNIX_EXECVPE_H #ifndef HSUNIX_EXECVPE_H
#define HSUNIX_EXECVPE_H #define HSUNIX_EXECVPE_H
#include "HsUnixConfig.h"
extern int extern int
__hsunix_execvpe(const char *name, char *const argv[], char *const envp[]); __hsunix_execvpe(const char *name, char *const argv[], char *const envp[]);
// this hack is needed for `process`; to be removed in unix-2.8 // this hack is needed for `process`; to be removed in unix-2.8
#ifndef HSUNIX_EXECVPE_H_NO_COMPAT
#include "HsUnixConfig.h"
#if HAVE_EXECVPE #if HAVE_EXECVPE
# define _GNU_SOURCE # define _GNU_SOURCE
# include <unistd.h> # include <unistd.h>
...@@ -21,6 +21,7 @@ execvpe(const char *name, char *const argv[], char *const envp[]); ...@@ -21,6 +21,7 @@ execvpe(const char *name, char *const argv[], char *const envp[]);
#else #else
# define execvpe(name,argv,envp) __hsunix_execvpe(name,argv,envp) # define execvpe(name,argv,envp) __hsunix_execvpe(name,argv,envp)
#endif #endif
#endif
// implemented in cbits/ghcrts.c // implemented in cbits/ghcrts.c
extern void pPrPr_disableITimers (void); extern void pPrPr_disableITimers (void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment