summaryrefslogtreecommitdiff
path: root/include/SDL_stdinc.h
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2016-10-01 10:28:00 -0700
committerSam Lantinga <slouken@libsdl.org>2016-10-01 10:28:00 -0700
commit112168540073dcac9027c50ea87f06f5eae9362e (patch)
treefc86f0f2d1675d504b1e733be40eeb791af4e3ad /include/SDL_stdinc.h
parent995ba24ecd5aa36cc4dc1c045dd3e699186b0389 (diff)
downloadsdl-112168540073dcac9027c50ea87f06f5eae9362e.tar.gz
Fixed bug 3336 - Failure to build with MinGW-w64
Kai Sterker There are already patches available from mingw64 that fix the issue https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-SDL2 With those applied, I could compile SDL2 without problems. But of course, it would be preferable if SDL built cleanly from source.
Diffstat (limited to 'include/SDL_stdinc.h')
-rw-r--r--include/SDL_stdinc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index 887bcd2d4..02c9e1399 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -94,6 +94,13 @@
#define SDL_TABLESIZE(table) SDL_arraysize(table)
/**
+ * Macro useful for building other macros with strings in them
+ *
+ * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg) #arg
+
+/**
* \name Cast operators
*
* Use proper C++ casts when compiled as C++ to be compatible with the option