move SUPPRESS_WARNING macros to public header

This commit is contained in:
Sebastian Krzyszkowiak 2019-04-21 15:46:03 +02:00
parent d93e1a1aca
commit 26089d86e6
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF
2 changed files with 12 additions and 12 deletions

View file

@ -41,18 +41,6 @@
#define SYMBOL_IMPORT extern
#endif
#define STRINGIFY(a) #a
#if defined(__clang__) || defined(__codemodel__)
#define SUPPRESS_WARNING(x) _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wpragmas\"") _Pragma(STRINGIFY(clang diagnostic ignored x))
#define SUPPRESS_END _Pragma("clang diagnostic pop")
#elif defined(__GNUC__) && !defined(MAEMO5)
#define SUPPRESS_WARNING(x) _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wpragmas\"") _Pragma(STRINGIFY(GCC diagnostic ignored x))
#define SUPPRESS_END _Pragma("GCC diagnostic pop")
#else
#define SUPPRESS_WARNING(x)
#define SUPPRESS_END
#endif
#ifdef __EMSCRIPTEN__
#define IS_EMSCRIPTEN true
#else

View file

@ -93,6 +93,18 @@ struct GamestateResources;
#define LIBSUPERDERPY_DEPRECATED_PRIV
#endif
#define STRINGIFY(a) #a
#if defined(__clang__) || defined(__codemodel__)
#define SUPPRESS_WARNING(x) _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wpragmas\"") _Pragma(STRINGIFY(clang diagnostic ignored x))
#define SUPPRESS_END _Pragma("clang diagnostic pop")
#elif defined(__GNUC__) && !defined(MAEMO5)
#define SUPPRESS_WARNING(x) _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wpragmas\"") _Pragma(STRINGIFY(GCC diagnostic ignored x))
#define SUPPRESS_END _Pragma("GCC diagnostic pop")
#else
#define SUPPRESS_WARNING(x)
#define SUPPRESS_END
#endif
#if defined(ALLEGRO_WINDOWS) && !defined(LIBSUPERDERPY_NO_MAIN_MANGLING)
int _libsuperderpy_main(int argc, char** argv);
#define main(a, b) \