mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
api: introduce WLR_DEPRECATED
This commit is contained in:
parent
385c9ade5f
commit
6074cbe2eb
2 changed files with 21 additions and 0 deletions
20
include/wlr/api.h
Normal file
20
include/wlr/api.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef WLR_API_H
|
||||
#define WLR_API_H
|
||||
|
||||
#ifndef WLR_IMPLEMENTATION
|
||||
|
||||
#if __STDC_VERSION__ >= 202311L
|
||||
#define WLR_DEPRECATED(msg) [[deprecated(msg)]]
|
||||
#elif defined(__GNUC__)
|
||||
#define WLR_DEPRECATED(msg) __attribute__((deprecated(msg)))
|
||||
#else
|
||||
#define WLR_DEPRECATED(msg)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define WLR_DEPRECATED(msg)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -21,6 +21,7 @@ big_endian = target_machine.endian() == 'big'
|
|||
|
||||
add_project_arguments([
|
||||
'-D_POSIX_C_SOURCE=200809L',
|
||||
'-DWLR_IMPLEMENTATION',
|
||||
'-DWLR_USE_UNSTABLE',
|
||||
'-DWLR_LITTLE_ENDIAN=@0@'.format(little_endian.to_int()),
|
||||
'-DWLR_BIG_ENDIAN=@0@'.format(big_endian.to_int()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue