mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
ALL: Don't use 'defined' in macro definitions
This is undefined behavior and clang warns about it. See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
This commit is contained in:
@@ -48,9 +48,15 @@
|
||||
// 0 - Force OpenGL context
|
||||
// 1 - Force OpenGL ES context
|
||||
// 2 - Force OpenGL ES 2.0 context
|
||||
#define USE_FORCED_GL (defined(USE_GLES_MODE) && USE_GLES_MODE == 0)
|
||||
#define USE_FORCED_GLES (defined(USE_GLES_MODE) && USE_GLES_MODE == 1)
|
||||
#define USE_FORCED_GLES2 (defined(USE_GLES_MODE) && USE_GLES_MODE == 2)
|
||||
#ifdef USE_GLES_MODE
|
||||
#define USE_FORCED_GL (USE_GLES_MODE == 0)
|
||||
#define USE_FORCED_GLES (USE_GLES_MODE == 1)
|
||||
#define USE_FORCED_GLES2 (USE_GLES_MODE == 2)
|
||||
#else
|
||||
#define USE_FORCED_GL 0
|
||||
#define USE_FORCED_GLES 0
|
||||
#define USE_FORCED_GLES2 0
|
||||
#endif
|
||||
|
||||
// On Tizen we include the toolchain's OpenGL file. This is something we
|
||||
// actually want to avoid. However, since Tizen uses eglGetProcAddress which
|
||||
|
||||
+6
-2
@@ -79,8 +79,12 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX];
|
||||
#define PLUGIN_ENABLED_STATIC(ID) \
|
||||
(ENABLE_##ID && !PLUGIN_ENABLED_DYNAMIC(ID))
|
||||
|
||||
#define PLUGIN_ENABLED_DYNAMIC(ID) \
|
||||
(ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES))
|
||||
#ifdef DYNAMIC_MODULES
|
||||
#define PLUGIN_ENABLED_DYNAMIC(ID) \
|
||||
(ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN))
|
||||
#else
|
||||
#define PLUGIN_ENABLED_DYNAMIC(ID) 0
|
||||
#endif
|
||||
|
||||
// see comments in backends/plugins/elf/elf-provider.cpp
|
||||
#if defined(USE_ELF_LOADER) && defined(ELF_LOADER_CXA_ATEXIT)
|
||||
|
||||
+5
-1
@@ -29,7 +29,11 @@
|
||||
|
||||
// This is a convenience macro to test whether the compiler used is a GCC
|
||||
// version, which is at least major.minor.
|
||||
#define GCC_ATLEAST(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
|
||||
#ifdef __GNUC__
|
||||
#define GCC_ATLEAST(major, minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
|
||||
#else
|
||||
#define GCC_ATLEAST(major, minor) 0
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32_WCE) && _WIN32_WCE < 300
|
||||
#define NONSTANDARD_PORT
|
||||
|
||||
Reference in New Issue
Block a user