From 9b7318710025ae85af714bb0b5f390db84ae2cd0 Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 30 Jun 2017 19:43:51 +1000 Subject: Add compatibility with Visual Studio and make compile warning capabilities more cross platform --- demos/modules/gos/threads/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'demos/modules') diff --git a/demos/modules/gos/threads/main.c b/demos/modules/gos/threads/main.c index b15c656d..97b1c7e4 100644 --- a/demos/modules/gos/threads/main.c +++ b/demos/modules/gos/threads/main.c @@ -10,9 +10,15 @@ // Instead we use the Win32 API directly as that always works. #define DEBUGWRITE(str) WriteFile(GetStdHandle(STD_ERROR_HANDLE), str, strlen(str), &nres, 0) #else - #warning "You must alter this demo to define a DEBUGWRITE macro for your platform." - #warning "Be careful of using C library functions as they sometimes crash if they are not expecting stack changes (if possible use a multi-thread aware C library)" - #warning "You might flash LED's instead if that is better for your platform." + #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT + #warning "You must alter this demo to define a DEBUGWRITE macro for your platform." + #warning "Be careful of using C library functions as they sometimes crash if they are not expecting stack changes (if possible use a multi-thread aware C library)" + #warning "You might flash LED's instead if that is better for your platform." + #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO + COMPILER_WARNING("You must alter this demo to define a DEBUGWRITE macro for your platform.") + COMPILER_WARNING("Be careful of using C library functions as they sometimes crash if they are not expecting stack changes (if possible use a multi-thread aware C library)") + COMPILER_WARNING("You might flash LED's instead if that is better for your platform.") + #endif #error "--" #endif -- cgit v1.2.3