mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
stdbool.h: Update for C23
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
When a compiler with C23 or higher is detected, builtin bool, true, and false are used to conform the C23 standard. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44664
This commit is contained in:
parent
1961785e35
commit
f441a225c4
1 changed files with 6 additions and 2 deletions
|
|
@ -26,15 +26,19 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __STDC_VERSION_STDBOOL_H__
|
||||
#define __STDC_VERSION_STDBOOL_H__ 202311L
|
||||
|
||||
#ifndef __bool_true_false_are_defined
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if (__STDC_VERSION__ < 202311L) && !defined(__cplusplus)
|
||||
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
||||
#define bool _Bool
|
||||
|
||||
#endif /* !__cplusplus */
|
||||
#endif /* (__STDC_VERSION__ < 202311L) && !defined(__cplusplus) */
|
||||
#endif /* __bool_true_false_are_defined */
|
||||
#endif /* __STDC_VERSION_STDBOOL_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue