From c68d3ab78527fb9fd6dc845d7e5bc63d60e4ef1e Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 17 Aug 2017 21:35:46 -0400 Subject: [PATCH] Watcom supports __FUNCTION__ identifier (and surely not __PRETTY_FUNCTION__) Partially fixes Bugzilla #3758. --- include/SDL_assert.h | 2 +- src/render/opengl/SDL_render_gl.c | 2 +- src/render/opengles2/SDL_render_gles2.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/SDL_assert.h b/include/SDL_assert.h index ab6868f08..90abbe39b 100644 --- a/include/SDL_assert.h +++ b/include/SDL_assert.h @@ -65,7 +65,7 @@ assert can have unique static variables associated with it. #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */ # define SDL_FUNCTION __func__ -#elif ((__GNUC__ >= 2) || defined(_MSC_VER)) +#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__)) # define SDL_FUNCTION __FUNCTION__ #else # define SDL_FUNCTION "???" diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 5c1dd825a..305a744a0 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -260,7 +260,7 @@ GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, #if 0 #define GL_CheckError(prefix, renderer) -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) || defined(__WATCOMC__) #define GL_CheckError(prefix, renderer) GL_CheckAllErrors(prefix, renderer, __FILE__, __LINE__, __FUNCTION__) #else #define GL_CheckError(prefix, renderer) GL_CheckAllErrors(prefix, renderer, __FILE__, __LINE__, __PRETTY_FUNCTION__) diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 07bef5505..0e87f2aa2 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -258,7 +258,7 @@ GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, #if 0 #define GL_CheckError(prefix, renderer) -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) || defined(__WATCOMC__) #define GL_CheckError(prefix, renderer) GL_CheckAllErrors(prefix, renderer, __FILE__, __LINE__, __FUNCTION__) #else #define GL_CheckError(prefix, renderer) GL_CheckAllErrors(prefix, renderer, __FILE__, __LINE__, __PRETTY_FUNCTION__)