diff options
author | Andreas Schneider <asn@samba.org> | 2022-10-27 08:32:20 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-10-27 19:11:30 +0000 |
commit | 6f1a9ef2072621a22cd0f38c89afc5c7598682e3 (patch) | |
tree | af360e1924743bb9e19b678069187654cc455691 /lib/replace | |
parent | ae86c620aadea19e47e3f7967b4770d496d4bc02 (diff) | |
download | samba-6f1a9ef2072621a22cd0f38c89afc5c7598682e3.tar.gz |
lib:replace: Require bool from C99
https://fedoraproject.org/wiki/Changes/PortingToModernC
We define True to true from stdbool.h and the same for false. So we
don't have to do a cleanup now.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 27 19:11:30 UTC 2022 on sn-devel-184
Diffstat (limited to 'lib/replace')
-rw-r--r-- | lib/replace/replace.h | 6 | ||||
-rw-r--r-- | lib/replace/wscript | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h index bd7f6e53e81..de50761d000 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -699,13 +699,9 @@ int rep_strerror_r(int errnum, char *buf, size_t buflen); #include <stdbool.h> #endif -#if !defined(HAVE_BOOL) -#ifdef HAVE__Bool -#define bool _Bool -#else +#ifndef HAVE_BOOL #error Need a real boolean type #endif -#endif #if !defined(HAVE_INTPTR_T) typedef long long intptr_t ; diff --git a/lib/replace/wscript b/lib/replace/wscript index b675069c7de..b1ca95515a0 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -160,8 +160,7 @@ def configure(conf): msg='Checking for O_DIRECT flag to open(2)') conf.CHECK_TYPES('"long long" intptr_t uintptr_t ptrdiff_t comparison_fn_t') - if not conf.CHECK_TYPE('bool', define='HAVE_BOOL'): - if not conf.CHECK_TYPE('_Bool', define='HAVE__Bool'): + if not conf.CHECK_TYPE('bool', define='HAVE_BOOL', headers='stdbool.h'): raise Errors.WafError('Samba requires a genuine boolean type') conf.CHECK_TYPE('int8_t', 'char') |