diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-09-10 12:23:47 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2006-09-10 12:23:47 +0000 |
commit | b6882786dfee8c89f020cfa66b04f7b37628e9e9 (patch) | |
tree | ad0c12f2a38e736ae5cf14c343eda5dc5803a783 /source/lib/replace/replace.h | |
parent | 4f3de74735cc479865a1221e92ebdd9d1f466eee (diff) | |
download | samba-b6882786dfee8c89f020cfa66b04f7b37628e9e9.tar.gz samba-b6882786dfee8c89f020cfa66b04f7b37628e9e9.tar.xz samba-b6882786dfee8c89f020cfa66b04f7b37628e9e9.zip |
r18335: more portable bool tests
Diffstat (limited to 'source/lib/replace/replace.h')
-rw-r--r-- | source/lib/replace/replace.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h index 3bf884c80c1..88fec3f4d79 100644 --- a/source/lib/replace/replace.h +++ b/source/lib/replace/replace.h @@ -310,12 +310,23 @@ char *rep_mkdtemp(char *template); #ifdef HAVE_STDBOOL_H #include <stdbool.h> -#elif !defined(HAVE_BOOL) +#endif + +#if !defined(HAVE_BOOL) +#ifdef HAVE__Bool +#define bool _Bool +#else #define __bool_true_false_are_defined typedef int bool; -#define false (0) +#endif +#endif + +#ifndef true #define true (1) #endif +#ifndef false +#define false (0) +#endif #ifndef HAVE_FUNCTION_MACRO #ifdef HAVE_func_MACRO |