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