diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-03-05 19:45:51 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-03-05 19:45:51 +0000 |
commit | 172e6378f86962ea07e6cf9e6877c1791c3aa2f1 (patch) | |
tree | 244d175653654d860cd3e12badebac7d5c074f06 | |
parent | 26eaa8383001219e7cd14a153dff95ea9274be6e (diff) |
curl_setup.h: Added S_IRDIR() macro for compilers that don't support it
Commit 26eaa8383001 introduces the use of S_ISDIR() yet some compilers,
such as MSVC don't support it, so we must define a substitute using
file flags and mask.
-rw-r--r-- | lib/curl_setup.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h index ad83fec5f..e4d8721a0 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -694,4 +694,9 @@ int netware_init(void); #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif +/* Define S_ISDIR if not defined by system headers, f.e. MSVC */ +#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + #endif /* HEADER_CURL_SETUP_H */ |