diff --git a/third-party/execvpe/execvpe.c b/third-party/execvpe/execvpe.c index b268b1c20..8265ae2a6 100644 --- a/third-party/execvpe/execvpe.c +++ b/third-party/execvpe/execvpe.c @@ -9,7 +9,7 @@ #include "Rts.h" #endif -#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)) /* to the end */ +#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) || defined(HAVE_EXECVPE)) /* to the end */ #ifndef __QNXNTO__ /* Evidently non-Posix. */ diff --git a/third-party/execvpe/execvpe.h b/third-party/execvpe/execvpe.h index 00887a383..cb72a4766 100644 --- a/third-party/execvpe/execvpe.h +++ b/third-party/execvpe/execvpe.h @@ -4,6 +4,8 @@ Interface for code in execvpe.c ------------------------------------------------------------------------- */ +#include "config.h" + #include #include #include @@ -11,19 +13,17 @@ #include #endif -#ifndef HAVE_EXECVPE -# ifdef __cplusplus +#ifdef __cplusplus extern "C" { -# endif /* __cplusplus */ +#endif /* __cplusplus */ -# if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) -# ifndef __QNXNTO__ +#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) && !defined(HAVE_EXECVPE) +# ifndef __QNXNTO__ extern int execvpe(char *name, char *const argv[], char **envp); # endif extern void pPrPr_disableITimers (void); -# endif +#endif -# ifdef __cplusplus +#ifdef __cplusplus } -# endif /* __cplusplus */ -#endif /* HAVE_EXECVPE */ +#endif /* __cplusplus */