diff options
author | Russ Allbery <rra@stanford.edu> | 2008-04-24 02:02:49 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2008-04-24 02:02:49 +0000 |
commit | 92ff7f21ad0b167f8d742a9d7b5f93704a57619c (patch) | |
tree | 7adae5f227b6463e07d5cd0f1dab82b7f1c6be47 /portable/stdbool.h | |
parent | 34c58f9471b3df4fa8b719b3c3534940ba5cfe1b (diff) |
Major coding style cleanup. Updated all shared code from my other
projects.
The configure option requesting AFS kaserver support (and thus
building kasetkey) is now --with-kaserver instead of --with-afs.
If KRB5_CONFIG was explicitly set in the environment, don't use a
different krb5-config based on --with-krb4 or --with-krb5. If
krb5-config isn't executable, don't use it. This allows one to
force library probing by setting KRB5_CONFIG to point to a
nonexistent file.
Sanity-check the results of krb5-config before proceeding and error
out in configure if they don't work.
Stop setting Stanford-specific compile-time defaults for the wallet
server and port.
Diffstat (limited to 'portable/stdbool.h')
-rw-r--r-- | portable/stdbool.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/portable/stdbool.h b/portable/stdbool.h new file mode 100644 index 0000000..61dd8a1 --- /dev/null +++ b/portable/stdbool.h @@ -0,0 +1,43 @@ +/* $Id$ + * + * Portability wrapper around <stdbool.h>. + * + * Provides the bool and _Bool types and the true and false constants, + * following the C99 specification, on hosts that don't have stdbool.h. This + * logic is based heavily on the example in the Autoconf manual. + * + * Written by Russ Allbery <rra@stanford.edu> + * This work is hereby placed in the public domain by its author. + */ + +#ifndef PORTABLE_STDBOOL_H +#define PORTABLE_STDBOOL_H 1 + +#if HAVE_STDBOOL_H +# include <stdbool.h> +#else +# if !HAVE__BOOL +# ifdef __cplusplus +typedef bool _Bool; +# elif _WIN32 +# include <windef.h> +# define bool BOOL +# else +typedef unsigned char _Bool; +# define bool _Bool +# endif +# endif +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 +#endif + +/* + * If we define bool and don't tell Perl, it will try to define its own and + * fail. Only of interest for programs that also include Perl headers. + */ +#ifndef HAS_BOOL +# define HAS_BOOL 1 +#endif + +#endif /* !PORTABLE_STDBOOL_H */ |