[project @ 2004-09-29 22:48:06 by krasimir]
authorkrasimir <unknown>
Wed, 29 Sep 2004 22:48:07 +0000 (22:48 +0000)
committerkrasimir <unknown>
Wed, 29 Sep 2004 22:48:07 +0000 (22:48 +0000)
compile execvpe only under Unix. The mingw's process.h header also contains
definition for execvpe which conflicts with our definition.

cbits/execvpe.c
include/HsBase.h

index f19f9d7..aac5d55 100644 (file)
@@ -1,8 +1,11 @@
 /* -----------------------------------------------------------------------------
    (c) The University of Glasgow 1995-2004
-   
+
    Our low-level exec() variant.
    -------------------------------------------------------------------------- */
+#include "HsBase.h"
+
+#if !defined(mingw32_TARGET_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:
@@ -168,3 +171,5 @@ void pPrPr_disableITimers (void)
    setitimer(ITIMER_PROF, &itv, NULL);
 #  endif
 }
+
+#endif
\ No newline at end of file
index c4f0116..5e7a767 100644 (file)
@@ -127,9 +127,11 @@ void writeErrString__(HsAddr msg, HsInt len);
 /* in Signals.c */
 extern HsInt nocldstop;
 
+#if !defined(mingw32_TARGET_OS)
 /* in execvpe.c */
 extern int execvpe(char *name, char *const argv[], char **envp);
 extern void pPrPr_disableITimers (void);
+#endif
 
 /* -----------------------------------------------------------------------------
    64-bit operations, defined in longlong.c