From 404456ee8eee5ac993581185c2258e9ec94909db Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Wed, 17 Nov 2010 03:02:04 +0000 Subject: [PATCH] Fix int8_t redefinition errors in VC2010 This was SVN commit r8635. --- source/lib/sysdep/os/win/wposix/wposix_types.h | 2 +- source/scriptinterface/ScriptTypes.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/lib/sysdep/os/win/wposix/wposix_types.h b/source/lib/sysdep/os/win/wposix/wposix_types.h index 58afcd6c0e..3b52051dd9 100644 --- a/source/lib/sysdep/os/win/wposix/wposix_types.h +++ b/source/lib/sysdep/os/win/wposix/wposix_types.h @@ -34,7 +34,7 @@ // // -typedef __int8 int8_t; +typedef signed char int8_t; typedef short int16_t; // already defined by MinGW diff --git a/source/scriptinterface/ScriptTypes.h b/source/scriptinterface/ScriptTypes.h index c73f8a9119..c7a68a086e 100644 --- a/source/scriptinterface/ScriptTypes.h +++ b/source/scriptinterface/ScriptTypes.h @@ -27,6 +27,10 @@ // non-struct type instead # define JS_NO_JSVAL_JSID_STRUCT_TYPES +// Make JS think the int8_t etc types are defined, since wposix_types.h emulates +// the ones that are needed and this avoids conflicting definitions +# define JS_SYS_TYPES_H_DEFINES_EXACT_SIZE_TYPES + #else # define XP_UNIX #endif