]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib/compat.h: Remove shim for native C99 bool datatype/keyword
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Fri, 3 Jun 2022 13:54:28 +0000 (15:54 +0200)
committerKarl Fleischmann <karl.fleischmann@open-xchange.com>
Mon, 4 Jul 2022 09:43:26 +0000 (11:43 +0200)
The base system is now required to be compatible with C99 and thus the
manual check/re-definition of bool can be dropped.

configure.ac
src/lib/compat.h
src/lib/lib.h

index 1ab6c43bb8d750a3a8691bcbbf12cf786fb541ef..84974916b5990c0b5f9c746328c7f02c022d0ae4 100644 (file)
@@ -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
index 9a6798fca0470ad055094434696fbd6ac7691f44..3542a9b18ab979cb62869161d9b36c91d311518b 100644 (file)
@@ -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)
index 0646cb85aec669d8415c1e4eed063fa07389dcf0..10162b887e50e8ff89065e82a7b40c9ce803cc74 100644 (file)
@@ -22,6 +22,9 @@
 #ifdef HAVE_STDINT_H
 #  include <stdint.h> /* C99 int types, we mostly need uintmax_t */
 #endif
+#ifndef __cplusplus
+#  include <stdbool.h>
+#endif
 
 #include "compat.h"
 #include "macros.h"