From: Chris Lattner Date: Fri, 4 Jun 2004 20:03:06 +0000 (+0000) Subject: Visual C has something resembling a stat function, but it doesn't provide S_ISREG X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a833fca56c20ee856091bb8216dd1f82477a4bb4;p=oota-llvm.git Visual C has something resembling a stat function, but it doesn't provide S_ISREG git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14016 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/Config/sys/mman.h b/include/Config/sys/mman.h index 191161aa907..7f51e7fbfbe 100644 --- a/include/Config/sys/mman.h +++ b/include/Config/sys/mman.h @@ -20,7 +20,7 @@ #include "Config/config.h" -#ifdef HAVE_SYS_MMAN_H +#if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER) #include #endif diff --git a/include/Config/sys/stat.h b/include/Config/sys/stat.h index 9c10260c14c..9669bcf927b 100644 --- a/include/Config/sys/stat.h +++ b/include/Config/sys/stat.h @@ -21,5 +21,9 @@ #include #endif +#if defined(_MSC_VER) +#define S_ISREG(X) ((X) & _S_IFREG) +#endif + #endif diff --git a/include/llvm/Config/sys/mman.h b/include/llvm/Config/sys/mman.h index 191161aa907..7f51e7fbfbe 100644 --- a/include/llvm/Config/sys/mman.h +++ b/include/llvm/Config/sys/mman.h @@ -20,7 +20,7 @@ #include "Config/config.h" -#ifdef HAVE_SYS_MMAN_H +#if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER) #include #endif diff --git a/include/llvm/Config/sys/stat.h b/include/llvm/Config/sys/stat.h index 9c10260c14c..9669bcf927b 100644 --- a/include/llvm/Config/sys/stat.h +++ b/include/llvm/Config/sys/stat.h @@ -21,5 +21,9 @@ #include #endif +#if defined(_MSC_VER) +#define S_ISREG(X) ((X) & _S_IFREG) +#endif + #endif