From bfc5b4e3b154ed92a8afefa1a330e51b0f8f2aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Wed, 15 Apr 2015 15:07:04 +0100 Subject: [PATCH] disable wordexp --- C/sysbits.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C/sysbits.c b/C/sysbits.c index 7a92ed1f1..d5b3eed2e 100644 --- a/C/sysbits.c +++ b/C/sysbits.c @@ -97,7 +97,7 @@ static char SccsId[] = "%W% %G%"; #if HAVE_FENV_H && !defined(__CYGWIN__) #include #endif -#if HAVE_WORDEXP_H +#if defined(ENABLE_SYSTEM_EXPANSION) && HAVE_WORDEXP_H #include #endif #if HAVE_LIBGEN_H @@ -419,7 +419,7 @@ yapExpandVars (const char *source, char *result) strncat (result, src, YAP_FILENAME_MAX); return result; } -#if !HAVE_WORDEXP +#if !HAVE_WORDEXP || !defined(ENABLE_SYSTEM_EXPANSION) // do VARIABLE expansion else if (source[0] == '$') { /* follow SICStus expansion rules */ @@ -464,7 +464,7 @@ expandVars(const char *pattern, char *expanded, int maxlen) if ((pattern = yapExpandVars(pattern, tmp)) == NULL) { return NULL; } -#if __WIN32 || __MINGW32__ +#if ( __WIN32 || __MINGW32__ ) && defined(ENABLE_SYSTEM_EXPANSION) DWORD retval=0; // notice that the file does not need to exist1 if (ini == NULL) { @@ -480,7 +480,7 @@ expandVars(const char *pattern, char *expanded, int maxlen) return NULL; } return expanded; -#elif HAVE_WORDEXP +#elif HAVE_WORDEXP && defined(ENABLE_SYSTEM_EXPANSION) wordexp_t result; /* Expand the string for the program to run. */