Visual C has something resembling a stat function, but it doesn't provide S_ISREG
authorChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 20:03:06 +0000 (20:03 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 20:03:06 +0000 (20:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14016 91177308-0d34-0410-b5e6-96231b3b80d8

include/Config/sys/mman.h
include/Config/sys/stat.h
include/llvm/Config/sys/mman.h
include/llvm/Config/sys/stat.h

index 191161aa907e03088bc8a9e6ad5a55b380e585d6..7f51e7fbfbea2b423505bcc9c0f65621215adf0b 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "Config/config.h"
 
-#ifdef HAVE_SYS_MMAN_H
+#if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER)
 #include <sys/mman.h>
 #endif
 
index 9c10260c14c1460ccaa41ed67894ba91aa40c430..9669bcf927b4a2e52256b0b9bda8523a053c4222 100644 (file)
@@ -21,5 +21,9 @@
 #include <sys/stat.h>
 #endif
 
+#if defined(_MSC_VER)
+#define S_ISREG(X) ((X) & _S_IFREG)
+#endif
+
 #endif
 
index 191161aa907e03088bc8a9e6ad5a55b380e585d6..7f51e7fbfbea2b423505bcc9c0f65621215adf0b 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "Config/config.h"
 
-#ifdef HAVE_SYS_MMAN_H
+#if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER)
 #include <sys/mman.h>
 #endif
 
index 9c10260c14c1460ccaa41ed67894ba91aa40c430..9669bcf927b4a2e52256b0b9bda8523a053c4222 100644 (file)
@@ -21,5 +21,9 @@
 #include <sys/stat.h>
 #endif
 
+#if defined(_MSC_VER)
+#define S_ISREG(X) ((X) & _S_IFREG)
+#endif
+
 #endif