Win32 fixes:
authorChristian Taedcke <hacking@taedcke.com>
Mon, 21 May 2012 16:17:13 +0200
changeset 724 1445f32c4b2d
parent 723 c33da109a4c8
child 725 54b0c6de4e15
Win32 fixes:
- fixed MSG-macro for VS2010
include/win32/applicfg.h
--- a/include/win32/applicfg.h	Mon May 21 16:15:56 2012 +0200
+++ b/include/win32/applicfg.h	Mon May 21 16:17:13 2012 +0200
@@ -101,9 +101,9 @@
 //Visual Studio 2005 and above
 #ifdef UNICODE
 #define MSG(...) \
-  do{wchar_t msg[300];\
-   swprintf(msg,sizeof(msg)/sizeof(msg[0]), L##__VA_ARGS__); \
-   OutputDebugString(msg);}while(0)
+  do{char msg[300];\
+  sprintf(msg, __VA_ARGS__); \
+   OutputDebugStringA(msg);}while(0)
 #else
 #define MSG(...) \
 do{char msg[300];\
@@ -126,7 +126,7 @@
 
 #define CANFESTIVAL_DEBUG_MSG(num, str, val)\
   {unsigned long value = val;\
-   MSG(("%s(%d) : 0x%X %s 0x%lX\n",__FILE__, __LINE__,num, str, value)); \
+   MSG("%s(%d) : 0x%X %s 0x%lX\n",__FILE__, __LINE__,num, str, value); \
    }
 
 #define CANFESTIVAL_DEBUG_DRV_MSG(...)\