aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-05 00:27:38 +0000
committerChris Lattner <sabre@nondot.org>2004-06-05 00:27:38 +0000
commit49b007b01bb57c01eb21a77ff7a72e5407816a8f (patch)
tree9de8fbe2a6eef559e6d89dab126a6e2cafcca58f /include
parent8e72749fc0b44ac8b7a5ffbb275f2ad60f2fa41e (diff)
downloadexternal_llvm-49b007b01bb57c01eb21a77ff7a72e5407816a8f.zip
external_llvm-49b007b01bb57c01eb21a77ff7a72e5407816a8f.tar.gz
external_llvm-49b007b01bb57c01eb21a77ff7a72e5407816a8f.tar.bz2
Don't #include <unistd.h> directly, go through the config files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14038 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/Config/sys/resource.h12
-rw-r--r--include/Config/sys/time.h2
-rw-r--r--include/llvm/Config/sys/resource.h12
-rw-r--r--include/llvm/Config/sys/time.h2
4 files changed, 8 insertions, 20 deletions
diff --git a/include/Config/sys/resource.h b/include/Config/sys/resource.h
index 0b51941..1f4cc69 100644
--- a/include/Config/sys/resource.h
+++ b/include/Config/sys/resource.h
@@ -18,22 +18,16 @@
#include "Config/config.h"
-#ifdef HAVE_SYS_RESOURCE_H
+#if defined(HAVE_SYS_RESOURCE_H) && !defined(_MSC_VER)
/*
* In LLVM, we use sys/resource.h to use getrusage() and maybe some other
* stuff. Some man pages say that you also need sys/time.h and unistd.h.
* So, to be paranoid, we will try to include all three if possible.
*/
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
+#include "Config/sys/time.h"
#include <sys/resource.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "Config/unistd.h"
#endif
diff --git a/include/Config/sys/time.h b/include/Config/sys/time.h
index 2764994..3e0ea1e 100644
--- a/include/Config/sys/time.h
+++ b/include/Config/sys/time.h
@@ -17,7 +17,7 @@
#include "Config/config.h"
-#ifdef HAVE_SYS_TIME_H
+#if defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER)
#include <sys/time.h>
#endif
diff --git a/include/llvm/Config/sys/resource.h b/include/llvm/Config/sys/resource.h
index 0b51941..1f4cc69 100644
--- a/include/llvm/Config/sys/resource.h
+++ b/include/llvm/Config/sys/resource.h
@@ -18,22 +18,16 @@
#include "Config/config.h"
-#ifdef HAVE_SYS_RESOURCE_H
+#if defined(HAVE_SYS_RESOURCE_H) && !defined(_MSC_VER)
/*
* In LLVM, we use sys/resource.h to use getrusage() and maybe some other
* stuff. Some man pages say that you also need sys/time.h and unistd.h.
* So, to be paranoid, we will try to include all three if possible.
*/
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
+#include "Config/sys/time.h"
#include <sys/resource.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "Config/unistd.h"
#endif
diff --git a/include/llvm/Config/sys/time.h b/include/llvm/Config/sys/time.h
index 2764994..3e0ea1e 100644
--- a/include/llvm/Config/sys/time.h
+++ b/include/llvm/Config/sys/time.h
@@ -17,7 +17,7 @@
#include "Config/config.h"
-#ifdef HAVE_SYS_TIME_H
+#if defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER)
#include <sys/time.h>
#endif