From c9e65986037fb6fca8a10c2dbdcafbd2fd1557ad Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 11 Feb 2014 07:52:10 +0100 Subject: [PATCH] Expand boolean.h --- boolean.h | 9 +++++++++ libretro.h | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/boolean.h b/boolean.h index c3569d3b43..b0a20bd8d6 100644 --- a/boolean.h +++ b/boolean.h @@ -17,8 +17,17 @@ #define __RARCH_BOOLEAN_H #ifndef __cplusplus + +#if defined(_MSC_VER) && !defined(SN_TARGET_PS3) +/* Hack applied for MSVC when compiling in C89 mode as it isn't C99 compliant. */ +#define bool unsigned char +#define true 1 +#define false 0 +#else #include #endif #endif +#endif + diff --git a/libretro.h b/libretro.h index 43464ec1d3..8aab29a334 100755 --- a/libretro.h +++ b/libretro.h @@ -27,11 +27,14 @@ #include #include -// Hack applied for MSVC when compiling in C89 mode as it isn't C99 compliant. #ifdef __cplusplus extern "C" { -#else +#endif + +#ifndef __cplusplus + #if defined(_MSC_VER) && !defined(SN_TARGET_PS3) && !defined(__cplusplus) +/* Hack applied for MSVC when compiling in C89 mode as it isn't C99 compliant. */ #define bool unsigned char #define true 1 #define false 0