1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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
This commit is contained in:
Andreas Schneider 2022-10-27 08:32:20 +02:00 committed by Jeremy Allison
parent ae86c620aa
commit 6f1a9ef207
2 changed files with 2 additions and 7 deletions

View File

@ -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 ;

View File

@ -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')