Don't #include <unistd.h> directly, go through the config files
authorChris Lattner <sabre@nondot.org>
Sat, 5 Jun 2004 00:27:38 +0000 (00:27 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 5 Jun 2004 00:27:38 +0000 (00:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14038 91177308-0d34-0410-b5e6-96231b3b80d8

include/Config/sys/resource.h
include/Config/sys/time.h
include/llvm/Config/sys/resource.h
include/llvm/Config/sys/time.h

index 0b51941424a59582b86b5cf8e81492ad04361946..1f4cc694b2912a57f76f6011d625655d64e03771 100644 (file)
 
 #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
 
index 2764994717c006186451b89d6de2dff9caf6bc92..3e0ea1e81099571c91f52863c6d235346329a6f2 100644 (file)
@@ -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
 
index 0b51941424a59582b86b5cf8e81492ad04361946..1f4cc694b2912a57f76f6011d625655d64e03771 100644 (file)
 
 #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
 
index 2764994717c006186451b89d6de2dff9caf6bc92..3e0ea1e81099571c91f52863c6d235346329a6f2 100644 (file)
@@ -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