From a833fca56c20ee856091bb8216dd1f82477a4bb4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 4 Jun 2004 20:03:06 +0000 Subject: [PATCH] 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 --- include/Config/sys/mman.h | 2 +- include/Config/sys/stat.h | 4 ++++ include/llvm/Config/sys/mman.h | 2 +- include/llvm/Config/sys/stat.h | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) 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