[llvm-commits] CVS: llvm/include/Config/sys/resource.h time.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 4 19:32:00 PDT 2004
Changes in directory llvm/include/Config/sys:
resource.h updated: 1.4 -> 1.5
time.h updated: 1.4 -> 1.5
---
Log message:
Don't #include <unistd.h> directly, go through the config files
---
Diffs of the changes: (+4 -10)
Index: llvm/include/Config/sys/resource.h
diff -u llvm/include/Config/sys/resource.h:1.4 llvm/include/Config/sys/resource.h:1.5
--- llvm/include/Config/sys/resource.h:1.4 Thu Feb 26 02:01:30 2004
+++ llvm/include/Config/sys/resource.h Fri Jun 4 19:27:38 2004
@@ -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
Index: llvm/include/Config/sys/time.h
diff -u llvm/include/Config/sys/time.h:1.4 llvm/include/Config/sys/time.h:1.5
--- llvm/include/Config/sys/time.h:1.4 Thu Feb 26 02:01:30 2004
+++ llvm/include/Config/sys/time.h Fri Jun 4 19:27:38 2004
@@ -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
More information about the llvm-commits
mailing list