aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/libprofile/CommonProfiling.c
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-04-29 08:56:07 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-04-29 08:56:07 +0000
commitb89e699b7456b943a0f2a0ba24e1dff8b46bec9f (patch)
treedc026a9f4ad1c383cf6797fa007915ddfd49f79f /runtime/libprofile/CommonProfiling.c
parent322480610939bca07506750571cb60f1497ec9a4 (diff)
downloadexternal_llvm-b89e699b7456b943a0f2a0ba24e1dff8b46bec9f.zip
external_llvm-b89e699b7456b943a0f2a0ba24e1dff8b46bec9f.tar.gz
external_llvm-b89e699b7456b943a0f2a0ba24e1dff8b46bec9f.tar.bz2
Unbreak the MSVC build:
- unistd.h doesn't exist with MSVC - inline must be __inline in Microsoft C - atexit cannot take a function declared as void f(), must be void f(void). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/libprofile/CommonProfiling.c')
-rw-r--r--runtime/libprofile/CommonProfiling.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/libprofile/CommonProfiling.c b/runtime/libprofile/CommonProfiling.c
index 1c1771c..210a5e5 100644
--- a/runtime/libprofile/CommonProfiling.c
+++ b/runtime/libprofile/CommonProfiling.c
@@ -19,7 +19,11 @@
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
+#else
+#include <io.h>
+#endif
#include <stdlib.h>
static char *SavedArgs = 0;