From f24ba78f68b2cbc4f4afadc8dd60fc2935357255 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sat, 6 Dec 2014 15:39:12 +0100 Subject: 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)`) --- System/Posix/Process/Internals.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'System') diff --git a/System/Posix/Process/Internals.hs b/System/Posix/Process/Internals.hs index bd3dd31..b320dc7 100644 --- a/System/Posix/Process/Internals.hs +++ b/System/Posix/Process/Internals.hs @@ -30,7 +30,7 @@ data ProcessStatus foreign import ccall unsafe "pPrPr_disableITimers" pPrPr_disableITimers :: IO () -foreign import ccall unsafe "execvpe" +foreign import ccall unsafe "__hsunix_execvpe" c_execvpe :: CString -> Ptr CString -> Ptr CString -> IO CInt decipherWaitStatus :: CInt -> IO ProcessStatus -- cgit v1.2.3