From: Karl Fleischmann Date: Fri, 3 Jun 2022 13:54:28 +0000 (+0200) Subject: lib/compat.h: Remove shim for native C99 bool datatype/keyword X-Git-Tag: 2.4.0~3830 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=761a9853efde9591febb68c3ded45fa3bb813d5d;p=thirdparty%2Fdovecot%2Fcore.git lib/compat.h: Remove shim for native C99 bool datatype/keyword The base system is now required to be compatible with C99 and thus the manual check/re-definition of bool can be dropped. --- diff --git a/configure.ac b/configure.ac index 1ab6c43bb8..84974916b5 100644 --- a/configure.ac +++ b/configure.ac @@ -348,7 +348,6 @@ AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(long long) AC_SYS_LARGEFILE -AC_CHECK_TYPES(_Bool) AC_CHECK_TYPE(uoff_t, [ have_uoff_t=yes diff --git a/src/lib/compat.h b/src/lib/compat.h index 9a6798fca0..3542a9b18a 100644 --- a/src/lib/compat.h +++ b/src/lib/compat.h @@ -60,14 +60,6 @@ int rand(void) __attribute__((deprecated("Do not use rand, use i_rand"))); int rand_r(unsigned int*) __attribute__((deprecated("Do not use rand_r, use i_rand"))); #endif -#ifndef __cplusplus -#ifdef HAVE__BOOL -typedef _Bool bool; -#else -typedef int bool; -#endif -#endif - #if defined (HAVE_UOFF_T) /* native support */ #elif defined (UOFF_T_INT) diff --git a/src/lib/lib.h b/src/lib/lib.h index 0646cb85ae..10162b887e 100644 --- a/src/lib/lib.h +++ b/src/lib/lib.h @@ -22,6 +22,9 @@ #ifdef HAVE_STDINT_H # include /* C99 int types, we mostly need uintmax_t */ #endif +#ifndef __cplusplus +# include +#endif #include "compat.h" #include "macros.h"