]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib/compat.h: Remove shim of C99 integer datatypes
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Fri, 3 Jun 2022 13:56:11 +0000 (15:56 +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 the necessary integer types can be
dropped.

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

index 84974916b5990c0b5f9c746328c7f02c022d0ae4..3ea7662009e4b0e2e78de47d00326eb28df5bd4f 100644 (file)
@@ -403,23 +403,6 @@ AC_DEFINE_UNQUOTED(SSIZE_T_MAX, $ssizet_max, [Maximum value of ssize_t])
 dnl we require inttypes.h for PRIu{8,16,32,64} macros
 AC_CHECK_HEADER(inttypes.h,,AC_MSG_ERROR([inttypes.h missing but required]))
 
-dnl some systems don't have stdint.h, but still have some of the types
-dnl defined elsewhere
-AC_CHECK_HEADER(stdint.h, [
-  stdint_include="#include <stdint.h>"
-])
-
-AC_CHECKTYPE2(uintmax_t, [$stdint_include])
-if test $i_cv_type_uintmax_t = yes; then
-  AC_DEFINE(HAVE_UINTMAX_T,, [Define if you have uintmax_t (C99 type)])
-fi
-
-dnl use separate check, eg. Solaris 8 has uintmax_t but not uint_fast32_t
-AC_CHECKTYPE2(uint_fast32_t, [$stdint_include])
-if test $i_cv_type_uint_fast32_t = yes; then
-  AC_DEFINE(HAVE_UINT_FAST32_T,, [Define if you have uint_fast32_t (C99 type)])
-fi
-
 AC_CHECKTYPE2(socklen_t, [#include <sys/socket.h>])
 if test $i_cv_type_socklen_t = yes; then
   AC_DEFINE(HAVE_SOCKLEN_T,, [Define to 'int' if you don't have socklen_t])
index 3542a9b18ab979cb62869161d9b36c91d311518b..eaa90c34e0876ae165f7c37e6121a92d0708801d 100644 (file)
@@ -72,22 +72,6 @@ typedef unsigned long long uoff_t;
 #  error uoff_t size not set
 #endif
 
-#ifndef HAVE_UINTMAX_T
-#  if SIZEOF_LONG_LONG > 0
-typedef unsigned long long uintmax_t;
-#  else
-typedef unsigned long uintmax_t;
-#  endif
-#endif
-
-#ifndef HAVE_UINT_FAST32_T
-#  if SIZEOF_INT >= 4
-typedef unsigned int uint_fast32_t;
-#  else
-typedef unsigned long uint_fast32_t;
-#  endif
-#endif
-
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t;
 #endif
index 10162b887e50e8ff89065e82a7b40c9ce803cc74..a41f0ff298fbb7cc0939bc964b54cfbc78749dcf 100644 (file)
 #include <limits.h> /* INT_MAX, etc. */
 #include <errno.h> /* error checking is good */
 #include <sys/types.h> /* many other includes want this */
+#include <stdint.h> /* C99 int types, we mostly need uintmax_t */
 #include <inttypes.h> /* PRI* macros */
-
-#ifdef HAVE_STDINT_H
-#  include <stdint.h> /* C99 int types, we mostly need uintmax_t */
-#endif
 #ifndef __cplusplus
 #  include <stdbool.h>
 #endif