From a00297158e881447deed870e4a8b9989893f15b2 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 2 Sep 2010 04:37:13 +0200 Subject: [PATCH] Moved S_ISREG define to setup as suggested by Dan. --- lib/config-win32.h | 5 ----- lib/setup.h | 5 +++++ src/config-win32.h | 5 ----- src/setup.h | 5 +++++ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/config-win32.h b/lib/config-win32.h index 24cb6e0dd..5ee76065d 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -391,11 +391,6 @@ /* Windows should not have HAVE_GMTIME_R defined */ /* #undef HAVE_GMTIME_R */ -/* Define S_ISREG if not defined by system headers */ -#ifndef S_ISREG -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - /* Define if the compiler supports C99 variadic macro style. */ #if defined(_MSC_VER) && (_MSC_VER >= 1400) #define HAVE_VARIADIC_MACROS_C99 1 diff --git a/lib/setup.h b/lib/setup.h index e7dcba1dc..cc016c9cd 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -552,6 +552,11 @@ int netware_init(void); #define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE") #endif +/* Define S_ISREG if not defined by system headers, f.e. MSVC */ +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + /* * Include macros and defines that should only be processed once. */ diff --git a/src/config-win32.h b/src/config-win32.h index 0104edb80..10a5eaf17 100644 --- a/src/config-win32.h +++ b/src/config-win32.h @@ -272,11 +272,6 @@ /* Windows should not have HAVE_GMTIME_R defined */ /* #undef HAVE_GMTIME_R */ -/* Define S_ISREG if not defined by system headers */ -#ifndef S_ISREG -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - /* Define if the compiler supports C99 variadic macro style. */ #if defined(_MSC_VER) && (_MSC_VER >= 1400) #define HAVE_VARIADIC_MACROS_C99 1 diff --git a/src/setup.h b/src/setup.h index 69da71024..0d2a99fb4 100644 --- a/src/setup.h +++ b/src/setup.h @@ -207,6 +207,11 @@ int fileno( FILE *stream); #define strdup(ptr) curlx_strdup(ptr) #endif +/* Define S_ISREG if not defined by system headers, f.e. MSVC */ +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + /* * Include macros and defines that should only be processed once. */