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:
Emmanuele Bassi 2024-04-11 14:45:02 +01:00
parent 9e320e1c43
commit 67d89a5a87

View File

@ -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