From 65f080f2b4262d8c7f0fcef985d6f2a0de59f6f5 Mon Sep 17 00:00:00 2001 From: Olaf van der Spek Date: Mon, 30 Jan 2017 11:26:45 +0100 Subject: [PATCH] Use --- configure.ac | 9 --------- src/base/arena.cc | 1 - src/base/arena.h | 2 +- src/base/macros.h | 12 +----------- src/ctemplate/template_string.h.in | 2 +- 5 files changed, 3 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index fa63ec6..6ca0882 100644 --- a/configure.ac +++ b/configure.ac @@ -58,15 +58,6 @@ AC_CHECK_FUNCS([getopt_long getopt]) AC_CHECK_HEADERS([getopt.h]) AC_CHECK_HEADERS([utime.h]) # used by unittests to mock file-times -# These are the types I need. We look for them in either stdint.h, -# sys/types.h, or inttypes.h, all of which are part of the default-includes. -AC_CHECK_TYPES([uint32_t]) -AC_CHECK_TYPES([u_int32_t]) -AC_CHECK_TYPES([__int32]) -AC_CHECK_TYPES([uint64_t]) -AC_CHECK_TYPES([u_int64_t]) -AC_CHECK_TYPES([__int64]) - AC_HEADER_DIRENT # for template_unittest.cc, template_regtest.cc # We need to do byte-swapping efficiently to hash efficiently in diff --git a/src/base/arena.cc b/src/base/arena.cc index 5893e72..04b8766 100644 --- a/src/base/arena.cc +++ b/src/base/arena.cc @@ -55,7 +55,6 @@ #ifdef HAVE_UNISTD_H # include #endif // last place uintptr_t might be -#include "base/macros.h" // for uint64 #include "base/mutex.h" #include "base/util.h" // for DCHECK_* diff --git a/src/base/arena.h b/src/base/arena.h index c48c784..0b95afa 100644 --- a/src/base/arena.h +++ b/src/base/arena.h @@ -273,10 +273,10 @@ #include #include "base/mutex.h" // must go first to get _XOPEN_SOURCE #include +#include #include #include #include "base/thread_annotations.h" -#include "base/macros.h" #include "base/util.h" // for CHECK, etc namespace ctemplate { diff --git a/src/base/macros.h b/src/base/macros.h index 0d1e3ec..7b7d227 100644 --- a/src/base/macros.h +++ b/src/base/macros.h @@ -9,17 +9,7 @@ #define CTEMPLATE_MACROS_H_ #include -#ifdef HAVE_STDINT_H -#include // the normal place uint32_t is defined -#endif -#ifdef HAVE_SYS_TYPES_H -#include // the normal place u_int32_t is defined -#endif -#ifdef HAVE_INTTYPES_H -#ifdef HAVE_INTTYPES_H -# include -#endif // a third place for uint32_t or u_int32_t -#endif +#include // This is all to figure out endian-ness and byte-swapping on various systems #if defined(HAVE_ENDIAN_H) diff --git a/src/ctemplate/template_string.h.in b/src/ctemplate/template_string.h.in index 130606b..c67ec6f 100644 --- a/src/ctemplate/template_string.h.in +++ b/src/ctemplate/template_string.h.in @@ -110,7 +110,7 @@ struct @ac_windows_dllexport@ StringHash { // ----------------------- THE CLASSES ------------------------------- -typedef @ac_cv_uint64@ TemplateId; +typedef uint64_t TemplateId; const TemplateId kIllegalTemplateId = 0;