From: Guenter Knauf Date: Wed, 1 Sep 2010 22:07:05 +0000 (+0200) Subject: Added S_ISREG define for Win32. X-Git-Tag: curl-7_21_2~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3238ef5b69bf49455e0f6ff5ad35b6d0a30e9c58;p=thirdparty%2Fcurl.git Added S_ISREG define for Win32. --- diff --git a/lib/config-win32.h b/lib/config-win32.h index 5ee76065d8..24cb6e0ddb 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -391,6 +391,11 @@ /* 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/config-win32.h b/src/config-win32.h index 10a5eaf175..0104edb808 100644 --- a/src/config-win32.h +++ b/src/config-win32.h @@ -272,6 +272,11 @@ /* 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