From 714d6ffa2ba990e61e6751e3080d4002fd91936f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 2 Aug 2002 12:17:54 +0000 Subject: Mingw compile adjustments. Mostly from Bill Napier. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1521 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/win32/stdbool.h | 25 ++++++++++++++++++++++++- uisimulator/win32/string-win32.c | 6 +++++- uisimulator/win32/uisw32.c | 6 +++++- uisimulator/win32/uisw32.rc | 4 ++++ 4 files changed, 38 insertions(+), 3 deletions(-) (limited to 'uisimulator') diff --git a/uisimulator/win32/stdbool.h b/uisimulator/win32/stdbool.h index 769d7ac709..d91ef374b9 100644 --- a/uisimulator/win32/stdbool.h +++ b/uisimulator/win32/stdbool.h @@ -17,7 +17,30 @@ * ****************************************************************************/ +#ifndef __STDBOOL_H__ +#define __STDBOOL_H__ 1 + +#ifndef __MINGW32__ typedef unsigned int bool; +#define __attribute__(s) + #define true 1 #define false 0 -#define __attribute__(s) \ No newline at end of file +#else + +typedef enum +{ + false = 0, + true = 1 +} bool; + +#define false false +#define true true + +/* Signal that all the definitions are present. */ +#define __bool_true_false_are_defined 1 + +#endif + +#endif /* __STDBOOL_H__ */ + diff --git a/uisimulator/win32/string-win32.c b/uisimulator/win32/string-win32.c index 9e10f0ed66..bf81fd1839 100644 --- a/uisimulator/win32/string-win32.c +++ b/uisimulator/win32/string-win32.c @@ -17,6 +17,8 @@ * ****************************************************************************/ +#ifndef __MINGW32__ + #include int strcasecmp (const char *a, const char *b) @@ -27,4 +29,6 @@ int strcasecmp (const char *a, const char *b) int strncasecmp (const char *a, const char *b) { return strcmpi (a, b); -} \ No newline at end of file +} + +#endif diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c index 2661d74cb0..a491dec7db 100644 --- a/uisimulator/win32/uisw32.c +++ b/uisimulator/win32/uisw32.c @@ -26,6 +26,10 @@ #include "thread-win32.h" #include "kernel.h" +#ifndef LR_VGACOLOR /* Should be under MINGW32 builds? */ +#define LR_VGACOLOR LR_COLOR +#endif + // extern functions extern void app_main (void *); // mod entry point extern void new_key(int key); @@ -298,4 +302,4 @@ int WINAPI WinMain ( GUIMessageLoop (); return GUIDown (); -} \ No newline at end of file +} diff --git a/uisimulator/win32/uisw32.rc b/uisimulator/win32/uisw32.rc index 42f5e6f0a7..6787c26b7e 100644 --- a/uisimulator/win32/uisw32.rc +++ b/uisimulator/win32/uisw32.rc @@ -7,7 +7,9 @@ // // Generated from the TEXTINCLUDE 2 resource. // +#ifndef __MINGW32__ #include "afxres.h" +#endif ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -17,7 +19,9 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 +#ifndef __MINGW32__ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#endif #pragma code_page(1252) #endif //_WIN32 -- cgit v1.2.3