2 * Portability wrapper around <stdbool.h>.
4 * Provides the bool and _Bool types and the true and false constants,
5 * following the C99 specification, on hosts that don't have stdbool.h. This
6 * logic is based heavily on the example in the Autoconf manual.
8 * The canonical version of this file is maintained in the rra-c-util package,
9 * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
11 * Written by Russ Allbery <eagle@eyrie.org>
12 * Copyright 2008, 2011
13 * The Board of Trustees of the Leland Stanford Junior University
15 * Copying and distribution of this file, with or without modification, are
16 * permitted in any medium without royalty provided the copyright notice and
17 * this notice are preserved. This file is offered as-is, without any
20 * SPDX-License-Identifier: FSFAP
23 #ifndef PORTABLE_STDBOOL_H
24 #define PORTABLE_STDBOOL_H 1
27 * Allow inclusion of config.h to be skipped, since sometimes we have to use a
28 * stripped-down version of config.h with a different name.
30 #ifndef CONFIG_H_INCLUDED
46 typedef unsigned char _Bool;
52 # define __bool_true_false_are_defined 1
56 * If we define bool and don't tell Perl, it will try to define its own and
57 * fail. Only of interest for programs that also include Perl headers.
63 #endif /* !PORTABLE_STDBOOL_H */