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 <http://www.eyrie.org/~eagle/software/rra-c-util/>.
11 * Written by Russ Allbery <eagle@eyrie.org>
13 * The authors hereby relinquish any claim to any copyright that they may have
14 * in this work, whether granted under contract or by operation of law or
15 * international treaty, and hereby commit to the public, at large, that they
16 * shall not, at any time in the future, seek to enforce any copyright in this
17 * work against any person or entity, or prevent any person or entity from
18 * copying, publishing, distributing or creating derivative works of this
22 #ifndef PORTABLE_STDBOOL_H
23 #define PORTABLE_STDBOOL_H 1
26 * Allow inclusion of config.h to be skipped, since sometimes we have to use a
27 * stripped-down version of config.h with a different name.
29 #ifndef CONFIG_H_INCLUDED
45 typedef unsigned char _Bool;
51 # define __bool_true_false_are_defined 1
55 * If we define bool and don't tell Perl, it will try to define its own and
56 * fail. Only of interest for programs that also include Perl headers.
62 #endif /* !PORTABLE_STDBOOL_H */