diff options
| author | Charles Davis <cdavis@mines.edu> | 2010-04-29 23:44:00 +0000 |
|---|---|---|
| committer | Charles Davis <cdavis@mines.edu> | 2010-04-29 23:44:00 +0000 |
| commit | b2403ee27392ec854ee4f88f45d4aaa20deb91f2 (patch) | |
| tree | 0569ea25acbfb586458e2d480211d516ac6d336c /compiler-rt | |
| parent | 83e3060f081f0309f36e2f551b5074656876ba1f (diff) | |
| download | bcm5719-llvm-b2403ee27392ec854ee4f88f45d4aaa20deb91f2.tar.gz bcm5719-llvm-b2403ee27392ec854ee4f88f45d4aaa20deb91f2.zip | |
Fix build with MSVC.
llvm-svn: 102671
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/BlocksRuntime/Block_private.h | 7 | ||||
| -rw-r--r-- | compiler-rt/BlocksRuntime/runtime.c | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/compiler-rt/BlocksRuntime/Block_private.h b/compiler-rt/BlocksRuntime/Block_private.h index 7b069d8997a..8ae821815eb 100644 --- a/compiler-rt/BlocksRuntime/Block_private.h +++ b/compiler-rt/BlocksRuntime/Block_private.h @@ -33,7 +33,14 @@ # endif #endif +#ifndef _MSC_VER #include <stdbool.h> +#else +/* MSVC doesn't have <stdbool.h>. Compensate. */ +typedef char bool; +#define true (bool)1 +#define false (bool)0 +#endif #if defined(__cplusplus) extern "C" { diff --git a/compiler-rt/BlocksRuntime/runtime.c b/compiler-rt/BlocksRuntime/runtime.c index dae06321f6e..a059c2234df 100644 --- a/compiler-rt/BlocksRuntime/runtime.c +++ b/compiler-rt/BlocksRuntime/runtime.c @@ -27,7 +27,6 @@ #include <stdlib.h> #include <string.h> #include <stdint.h> -#include <stdbool.h> #include "config.h" @@ -45,7 +44,7 @@ #include <libkern/OSAtomic.h> #endif /* HAVE_LIBKERN_OSATOMIC_H */ -#elif defined(__WIN32__) +#elif defined(__WIN32__) || defined(_WIN32) #define _CRT_SECURE_NO_WARNINGS 1 #include <windows.h> |

