From: Holger Schemel Date: Mon, 19 Mar 2018 19:02:43 +0000 (+0100) Subject: fixed problem with 'boolean' typedef when compiling with MinGW environment X-Git-Tag: 4.1.0.0~235 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=49897535af06400f05c764d203a4450c06a10769 fixed problem with 'boolean' typedef when compiling with MinGW environment A typedef named "boolean" (but defined as "unsigned char", not "int") is already defined in one of the Windows header files, so it was redefined to a non-conflicting name to prevent collisions when compiling for the Windows platform. --- diff --git a/src/libgame/types.h b/src/libgame/types.h index acc2c236..1278a553 100644 --- a/src/libgame/types.h +++ b/src/libgame/types.h @@ -18,9 +18,9 @@ #include #include -typedef int boolean; #if !defined(PLATFORM_WIN32) +typedef int boolean; typedef unsigned char byte; #endif diff --git a/src/libgame/windows.h b/src/libgame/windows.h index 30273488..a3d68cc4 100644 --- a/src/libgame/windows.h +++ b/src/libgame/windows.h @@ -16,6 +16,9 @@ /* some symbols are already defined on Windows */ +typedef int boolean_internal; +#define boolean boolean_internal + #define CreateBitmap CreateBitmap_internal #define GetPixel GetPixel_internal #define CloseWindow CloseWindow_internal