mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 02:06:18 +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>
|
#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__.
|
* 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
|
* Both Clang 11.1 on current Arch Linux and Apple's Clang 12.0 define
|
||||||
@ -922,11 +925,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
#define FALSE (0)
|
#define FALSE false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
#define TRUE (!FALSE)
|
#define TRUE true
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef MAX
|
#undef MAX
|
||||||
|
Loading…
Reference in New Issue
Block a user