]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
int_types.h: remove hacks to workaround old systems
authorKefu Chai <kchai@redhat.com>
Fri, 12 May 2017 18:25:53 +0000 (02:25 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 13 May 2017 02:20:26 +0000 (10:20 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
src/include/config-h.in.cmake
src/include/int_types.h

index e33cf17744dda4538d559c5526c4b3057a58aeab..7258f9c60f32cf5d53743cecf1af6d46d480fd9b 100644 (file)
@@ -106,10 +106,8 @@ CHECK_FUNCTION_EXISTS(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
 CHECK_FUNCTION_EXISTS(pthread_getname_np HAVE_PTHREAD_GETNAME_NP)
 CHECK_FUNCTION_EXISTS(eventfd HAVE_EVENTFD)
 
-CHECK_INCLUDE_FILES("inttypes.h" HAVE_INTTYPES_H)
 CHECK_INCLUDE_FILES("linux/types.h" HAVE_LINUX_TYPES_H)
 CHECK_INCLUDE_FILES("linux/version.h" HAVE_LINUX_VERSION_H)
-CHECK_INCLUDE_FILES("stdint.h" HAVE_STDINT_H)
 CHECK_INCLUDE_FILES("arpa/nameser_compat.h" HAVE_ARPA_NAMESER_COMPAT_H)
 CHECK_INCLUDE_FILES("sys/mount.h" HAVE_SYS_MOUNT_H)
 CHECK_INCLUDE_FILES("sys/param.h" HAVE_SYS_PARAM_H)
index 8a903ef610836946098d0c8113689b5c170a69ca..4cc0c056b9cb5ca8ba439caebe9b59c6105987e3 100644 (file)
 /* Define to 1 if you have fdatasync. */
 #cmakedefine HAVE_FDATASYNC 1
 
-/* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H 1
-
 /* Defined if you have librocksdb enabled */
 #cmakedefine HAVE_LIBROCKSDB
 
 /* Define to 1 if you have the <valgrind/helgrind.h> header file. */
 #cmakedefine HAVE_VALGRIND_HELGRIND_H 1
 
-/* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H 1
-
 /* Define to 1 if you have the <sys/prctl.h> header file. */
 #cmakedefine HAVE_SYS_PRCTL_H 1
 
index 2ffb162cc24ee9f86b3639ad194c67f6ebb2a7d1..61ad79713924781f107738d6f87e584dba2f1151 100644 (file)
@@ -3,62 +3,11 @@
 
 #include "acconfig.h"
 
-/*
- * Get 64b integers either from inttypes.h or glib.h
- */
-#ifdef HAVE_INTTYPES_H
-#  include <inttypes.h>
-//#else
-//#  ifdef HAVE_GLIB
-//#    include <glib.h>
-//#  endif
-#endif
-
-/*
- * C99 says inttypes.h includes stdint.h, but that's not true on all
- * systems. If it's there, include it always - just in case.
- */
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#include <inttypes.h>
 
-/*
- * Include types.h after stdint.h to accomodate for older distributions
- *
- */
 #ifdef HAVE_LINUX_TYPES_H
 #include <linux/types.h>
-#endif
-
-/*
- * Emergency replacements for PRI*64 modifiers. Some systems have
- * an inttypes.h that doesn't define all the PRI[doxu]64 macros.
- */
-#if !defined(PRIu64)
-#  if defined(HAVE_INTTYPES_H) || defined(HAVE_GLIB)
-/* If we have inttypes or glib, assume we have 64-bit long long int */
-#    define PRIu64 "llu"
-#    define PRIi64 "lli"
-#    define PRIx64 "llx"
-#    define PRIX64 "llX"
-#    define PRIo64 "llo"
-#    define PRId64 "lld"
-#  else
-/* Assume that we don't have long long, so use long int modifiers */
-#    define PRIu64 "lu"
-#    define PRIi64 "li"
-#    define PRIx64 "lx"
-#    define PRIX64 "lX"
-#    define PRIo64 "lo"
-#    define PRId64 "ld"
-#  endif
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifndef HAVE_LINUX_TYPES_H
+#else
 #ifndef HAVE___U8
 typedef uint8_t __u8;
 #endif