projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1df344f
)
Make this file independent of HsBase.h, use HsBaseConfig.h only
author
Simon Marlow
<marlowsd@gmail.com>
Mon, 22 Jun 2009 08:39:57 +0000
(08:39 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Mon, 22 Jun 2009 08:39:57 +0000
(08:39 +0000)
System/CPUTime.hsc
patch
|
blob
|
history
diff --git
a/System/CPUTime.hsc
b/System/CPUTime.hsc
index
7fe4fc2
..
9dc62db
100644
(file)
--- a/
System/CPUTime.hsc
+++ b/
System/CPUTime.hsc
@@
-34,7
+34,30
@@
import CPUTime ( getCPUTime, cpuTimePrecision )
import Foreign
import Foreign.C
import Foreign
import Foreign.C
-#include "HsBase.h"
+#include "HsBaseConfig.h"
+
+-- For _SC_CLK_TCK
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+-- For struct rusage
+#if !defined(mingw32_HOST_OS) && !defined(irix_HOST_OS)
+# if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+# endif
+#endif
+
+-- For FILETIME etc. on Windows
+#if HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+-- for CLK_TCK
+#if HAVE_TIME_H
+#include <time.h>
+#endif
+
#endif
#if !defined(mingw32_HOST_OS) && !defined(cygwin32_HOST_OS)
#endif
#if !defined(mingw32_HOST_OS) && !defined(cygwin32_HOST_OS)