mirror of
https://github.com/yshui/picom.git
synced 2025-04-21 18:03:02 -04:00
compiler: add polyfill for typeof()
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
3e0fd094ab
commit
1fd43b863e
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@
|
|||
|
||||
// clang-format off
|
||||
#if __STDC_VERSION__ <= 201710L
|
||||
#define auto __auto_type
|
||||
// Polyfill for C23's `auto` and `typeof`
|
||||
# define auto __auto_type
|
||||
# define typeof __typeof__
|
||||
#endif
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue