mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
Alias TRUE and FALSE to C99's true and false
GLib depends on a C99 toolchain. While we cannot change `gboolean`, we can at least use the same boolean constants. Fixes: #3326
This commit is contained in:
parent
9e320e1c43
commit
67d89a5a87
@ -39,6 +39,9 @@
|
||||
*/
|
||||
#include <stddef.h>
|
||||
|
||||
/* We include stdbool.h to get the system's definition of true and false */
|
||||
#include <stdbool.h>
|
||||
|
||||
/*
|
||||
* Note: Clang (but not clang-cl) defines __GNUC__ and __GNUC_MINOR__.
|
||||
* Both Clang 11.1 on current Arch Linux and Apple's Clang 12.0 define
|
||||
@ -922,11 +925,11 @@
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
#define FALSE false
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE (!FALSE)
|
||||
#define TRUE true
|
||||
#endif
|
||||
|
||||
#undef MAX
|
||||
|
Loading…
Reference in New Issue
Block a user