mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-22 03:11:00 +00:00
include: Fix symbols in public headers that start with an underscore.
Fixes #7352.
This commit is contained in:
parent
7b06007266
commit
e6e654e25c
|
@ -28,10 +28,10 @@
|
|||
*/
|
||||
|
||||
/* This shouldn't be nested -- included it around code only. */
|
||||
#ifdef _begin_code_h
|
||||
#ifdef SDL_begin_code_h
|
||||
#error Nested inclusion of begin_code.h
|
||||
#endif
|
||||
#define _begin_code_h
|
||||
#define SDL_begin_code_h
|
||||
|
||||
#ifndef SDL_DEPRECATED
|
||||
# if defined(__GNUC__) && (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */
|
||||
|
@ -171,17 +171,17 @@
|
|||
#define SDL_FALLTHROUGH [[fallthrough]]
|
||||
#else
|
||||
#if defined(__has_attribute)
|
||||
#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__)
|
||||
#define SDL_HAS_FALLTHROUGH __has_attribute(__fallthrough__)
|
||||
#else
|
||||
#define _HAS_FALLTHROUGH 0
|
||||
#define SDL_HAS_FALLTHROUGH 0
|
||||
#endif /* __has_attribute */
|
||||
#if _HAS_FALLTHROUGH && \
|
||||
#if SDL_HAS_FALLTHROUGH && \
|
||||
((defined(__GNUC__) && __GNUC__ >= 7) || \
|
||||
(defined(__clang_major__) && __clang_major__ >= 10))
|
||||
#define SDL_FALLTHROUGH __attribute__((__fallthrough__))
|
||||
#else
|
||||
#define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
|
||||
#endif /* _HAS_FALLTHROUGH */
|
||||
#undef _HAS_FALLTHROUGH
|
||||
#endif /* SDL_HAS_FALLTHROUGH */
|
||||
#undef SDL_HAS_FALLTHROUGH
|
||||
#endif /* C++17 or C2x */
|
||||
#endif /* SDL_FALLTHROUGH not defined */
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
* after you finish any function and structure declarations in your headers
|
||||
*/
|
||||
|
||||
#ifndef _begin_code_h
|
||||
#ifndef SDL_begin_code_h
|
||||
#error close_code.h included without matching begin_code.h
|
||||
#endif
|
||||
#undef _begin_code_h
|
||||
#undef SDL_begin_code_h
|
||||
|
||||
/* Reset structure packing at previous byte alignment */
|
||||
#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
|
||||
|
|
Loading…
Reference in a new issue