aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules
diff options
context:
space:
mode:
authorinmarket <inmarket@ugfx.io>2017-06-30 19:43:51 +1000
committerinmarket <inmarket@ugfx.io>2017-06-30 19:43:51 +1000
commit9b7318710025ae85af714bb0b5f390db84ae2cd0 (patch)
treef7b1849a40c0019d048761f9493f6d15695703cd /demos/modules
parente5497f2ac058acb427b6fcdd15db6adeddd7bc55 (diff)
downloaduGFX-9b7318710025ae85af714bb0b5f390db84ae2cd0.tar.gz
uGFX-9b7318710025ae85af714bb0b5f390db84ae2cd0.tar.bz2
uGFX-9b7318710025ae85af714bb0b5f390db84ae2cd0.zip
Add compatibility with Visual Studio and make compile warning capabilities more cross platform
Diffstat (limited to 'demos/modules')
-rw-r--r--demos/modules/gos/threads/main.c12
1 files changed, 9 insertions, 3 deletions
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