mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
Make wayland-util.h -Wundef safe when compiled by a C++ compiler
Fixes #522 Signed-off-by: David Redondo <kde@david-redondo.de>
This commit is contained in:
parent
02ad102e2d
commit
7c2ffb0d71
1 changed files with 2 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/** Deprecated attribute */
|
||||
#if __STDC_VERSION__ >= 202311L
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
||||
#define WL_DEPRECATED [[deprecated]]
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define WL_DEPRECATED __attribute__ ((deprecated))
|
||||
|
|
@ -70,7 +70,7 @@ extern "C" {
|
|||
#define WL_PRINTF(x, y)
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 202311L
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
||||
#define WL_TYPEOF(expr) typeof(expr)
|
||||
#else
|
||||
#define WL_TYPEOF(expr) __typeof__(expr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue