stdbool.h: bool is now typedef'd to _Bool compiler intrinsic instead of char. This and the t/f enum is now guarded behind a stdc check.

This commit is contained in:
Imbus 2026-01-03 13:19:51 +01:00
parent c975a86805
commit 4760e1f742

View file

@ -1,8 +1,10 @@
#ifndef _STDBOOL_H
#define _STDBOOL_H
/*TODO*/
typedef char bool;
enum { false = 0, true = 1 };
/* Otherwise, bool, true and false are keywords. */
#if !(defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)
typedef _Bool bool;
enum : bool { false = 0, true = 1 };
#endif
#endif // _STDBOOL_H