Import Data.ByteString from fps 0.5.
[haskell-directory.git] / cbits / execvpe.c
index f19f9d7..2234f09 100644 (file)
@@ -1,8 +1,11 @@
 /* -----------------------------------------------------------------------------
    (c) The University of Glasgow 1995-2004
-   
+
    Our low-level exec() variant.
    -------------------------------------------------------------------------- */
+#include "HsBase.h"
+
+#if !defined(mingw32_HOST_OS) /* to the end */
 
 /* Evidently non-Posix. */
 /* #include "PosixSource.h" */
@@ -13,7 +16,7 @@
 #include <string.h>
 #include <errno.h>
 
-/* 
+/*
  * We want the search semantics of execvp, but we want to provide our
  * own environment, like execve.  The following copyright applies to
  * this code, as it is a derivative of execvp:
@@ -51,7 +54,7 @@
  */
 
 int
-execvpe(char *name, char **argv, char **envp)
+execvpe(char *name, char *const argv[], char **envp)
 {
     register int lp, ln;
     register char *p;
@@ -168,3 +171,5 @@ void pPrPr_disableITimers (void)
    setitimer(ITIMER_PROF, &itv, NULL);
 #  endif
 }
+
+#endif