mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-10-02 16:23:57 +08:00
os2: add gcc-compatible debug_os2 macros
This commit is contained in:
@@ -2818,6 +2818,7 @@ elseif(PS2)
|
||||
|
||||
elseif(OS2)
|
||||
list(APPEND EXTRA_CFLAGS "-DOS2EMX_PLAIN_CHAR")
|
||||
#list(APPEND EXTRA_CFLAGS "-DOS2DEBUG=2")
|
||||
|
||||
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/os2/*.c)
|
||||
list(APPEND SOURCE_FILES ${CORE_SOURCES})
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#ifdef OS2DEBUG
|
||||
#if defined(OS2DEBUG) && defined(__WATCOMC__)
|
||||
#if (OS2DEBUG-0 >= 2)
|
||||
# define debug_os2(s,...) SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, \
|
||||
__func__ "(): " ##s, ##__VA_ARGS__)
|
||||
@@ -32,6 +32,14 @@
|
||||
# define debug_os2(s,...) printf(__func__ "(): " ##s "\n", ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#elif defined(OS2DEBUG) && defined(__GNUC__)
|
||||
#if (OS2DEBUG-0 >= 2)
|
||||
# define debug_os2(s,...) SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, \
|
||||
"%s(): " s, __func__, ##__VA_ARGS__)
|
||||
#else
|
||||
# define debug_os2(s,...) printf("%s(): " s "\n", __func__,##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#else /* no debug */
|
||||
|
||||
# define debug_os2(s,...) do {} while (0)
|
||||
|
||||
Reference in New Issue
Block a user