diff options
50 files changed, 164 insertions, 101 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 236ea51e375..cf08504a76d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1976,7 +1976,7 @@ noinst_HEADERS = \ include/hash.h\ include/intarith.h\ include/interval_set.h\ - include/inttypes.h\ + include/int_types.h\ include/ipaddr.h\ include/linux_fiemap.h\ include/lru.h\ diff --git a/src/auth/AuthMethodList.h b/src/auth/AuthMethodList.h index 7b21b325aeb..b5aae0bba49 100644 --- a/src/auth/AuthMethodList.h +++ b/src/auth/AuthMethodList.h @@ -15,7 +15,8 @@ #ifndef CEPH_AUTHMETHODLIST_H #define CEPH_AUTHMETHODLIST_H -#include "include/inttypes.h" +#include "include/int_types.h" + #include <list> #include <set> #include <string> diff --git a/src/client/ioctl.h b/src/client/ioctl.h index c15d3340a76..35b4ce4ac0f 100644 --- a/src/client/ioctl.h +++ b/src/client/ioctl.h @@ -1,13 +1,14 @@ #ifndef FS_CEPH_IOCTL_H #define FS_CEPH_IOCTL_H +#include "include/int_types.h" + #if defined(__linux__) #include <linux/ioctl.h> #include <linux/types.h> #elif defined(__FreeBSD__) #include <sys/ioctl.h> #include <sys/types.h> -#include "include/inttypes.h" #endif #define CEPH_IOCTL_MAGIC 0x97 diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index 420de514ee6..12947a08540 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -25,6 +25,8 @@ * parameters as the client sees them - it would be silly to mention * in each one that they take an input and an output bufferlist. */ +#include "include/int_types.h" +#include "include/types.h" #include <algorithm> #include <cstring> @@ -35,10 +37,8 @@ #include <sstream> #include <vector> -#include "include/types.h" #include "objclass/objclass.h" #include "include/rbd_types.h" -#include <inttypes.h> #include "cls/rbd/cls_rbd.h" diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 6cda4cba5c3..2f5711ecb32 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -1,14 +1,14 @@ // -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab -#include <iostream> +#include "include/int_types.h" +#include "include/types.h" +#include <iostream> #include <string.h> #include <stdlib.h> #include <errno.h> -#include <inttypes.h> -#include "include/types.h" #include "include/utime.h" #include "objclass/objclass.h" #include "cls/rgw/cls_rgw_ops.h" diff --git a/src/common/Formatter.cc b/src/common/Formatter.cc index c08ea5b9a20..4ef833a45f8 100644 --- a/src/common/Formatter.cc +++ b/src/common/Formatter.cc @@ -14,11 +14,12 @@ #define LARGE_SIZE 1024 +#include "include/int_types.h" + #include "assert.h" #include "Formatter.h" #include "common/escape.h" -#include <inttypes.h> #include <iostream> #include <sstream> #include <stdarg.h> diff --git a/src/common/Formatter.h b/src/common/Formatter.h index da730103f41..27089ce04f2 100644 --- a/src/common/Formatter.h +++ b/src/common/Formatter.h @@ -1,8 +1,9 @@ #ifndef CEPH_FORMATTER_H #define CEPH_FORMATTER_H +#include "include/int_types.h" + #include <deque> -#include <inttypes.h> #include <iostream> #include <list> #include <ostream> diff --git a/src/common/OutputDataSocket.cc b/src/common/OutputDataSocket.cc index e4d21fe13ee..3051ca02dbe 100644 --- a/src/common/OutputDataSocket.cc +++ b/src/common/OutputDataSocket.cc @@ -12,6 +12,8 @@ * */ +#include "include/int_types.h" + #include "common/Thread.h" #include "common/OutputDataSocket.h" #include "common/config.h" @@ -25,7 +27,6 @@ #include <errno.h> #include <fcntl.h> -#include <inttypes.h> #include <map> #include <poll.h> #include <set> diff --git a/src/common/admin_socket.cc b/src/common/admin_socket.cc index 1a507e606bf..12e5868b409 100644 --- a/src/common/admin_socket.cc +++ b/src/common/admin_socket.cc @@ -12,6 +12,8 @@ * */ +#include "include/int_types.h" + #include "common/Thread.h" #include "common/admin_socket.h" #include "common/config.h" @@ -26,7 +28,6 @@ #include <errno.h> #include <fcntl.h> -#include <inttypes.h> #include <map> #include <poll.h> #include <set> diff --git a/src/common/admin_socket_client.cc b/src/common/admin_socket_client.cc index 782e808ad86..335695f9b4b 100644 --- a/src/common/admin_socket_client.cc +++ b/src/common/admin_socket_client.cc @@ -12,6 +12,8 @@ * */ +#include "include/int_types.h" + #include "common/admin_socket.h" #include "common/ceph_context.h" #include "common/errno.h" @@ -21,7 +23,6 @@ #include <arpa/inet.h> #include <errno.h> #include <fcntl.h> -#include <inttypes.h> #include <map> #include <poll.h> #include <sstream> diff --git a/src/common/blkdev.cc b/src/common/blkdev.cc index 22b0aa67b3e..b0dc0a54e9e 100644 --- a/src/common/blkdev.cc +++ b/src/common/blkdev.cc @@ -1,8 +1,8 @@ -#include <inttypes.h> +#include "include/int_types.h" + #include <fcntl.h> #include <sys/ioctl.h> #include <errno.h> - #include <sys/types.h> #include <sys/stat.h> #include <sys/mount.h> diff --git a/src/common/crc32c_intel_baseline.c b/src/common/crc32c_intel_baseline.c index cfcfec624ae..3a92c77b63c 100644 --- a/src/common/crc32c_intel_baseline.c +++ b/src/common/crc32c_intel_baseline.c @@ -34,7 +34,8 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <inttypes.h> +#include "include/int_types.h" + #include <stdlib.h> #define MAX_ITER 8 diff --git a/src/common/crc32c_intel_baseline.h b/src/common/crc32c_intel_baseline.h index 5b14ddfc07e..e463575e28c 100644 --- a/src/common/crc32c_intel_baseline.h +++ b/src/common/crc32c_intel_baseline.h @@ -1,6 +1,8 @@ #ifndef CEPH_COMMON_CRC32C_INTEL_BASELINE_H #define CEPH_COMMON_CRC32C_INTEL_BASELINE_H +#include "include/int_types.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/src/common/crc32c_intel_fast.c b/src/common/crc32c_intel_fast.c index 49305088aff..0532dd261cf 100644 --- a/src/common/crc32c_intel_fast.c +++ b/src/common/crc32c_intel_fast.c @@ -1,5 +1,6 @@ -#include <inttypes.h> #include "acconfig.h" +#include "include/int_types.h" + #include "common/crc32c_intel_baseline.h" extern unsigned int crc32_iscsi_00(unsigned char const *buffer, int len, unsigned int crc); diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc index 339ff6a372b..4fe1354fa63 100644 --- a/src/common/perf_counters.cc +++ b/src/common/perf_counters.cc @@ -12,13 +12,14 @@ * */ +#include "include/int_types.h" + #include "common/perf_counters.h" #include "common/dout.h" #include "common/errno.h" #include "common/Formatter.h" #include <errno.h> -#include <inttypes.h> #include <map> #include <sstream> #include <stdint.h> diff --git a/src/crush/crush.h b/src/crush/crush.h index 82d032879d9..4adabcbf331 100644 --- a/src/crush/crush.h +++ b/src/crush/crush.h @@ -1,11 +1,12 @@ #ifndef CEPH_CRUSH_CRUSH_H #define CEPH_CRUSH_CRUSH_H +#include "include/int_types.h" + #if defined(__linux__) #include <linux/types.h> #elif defined(__FreeBSD__) #include <sys/types.h> -#include "include/inttypes.h" #endif /* diff --git a/src/crush/hash.c b/src/crush/hash.c index 9f7f3257ebd..9b15321d783 100644 --- a/src/crush/hash.c +++ b/src/crush/hash.c @@ -1,10 +1,11 @@ +#include "include/int_types.h" #if defined(__linux__) #include <linux/types.h> #elif defined(__FreeBSD__) #include <sys/types.h> -#include "include/inttypes.h" #endif + #include "hash.h" /* diff --git a/src/include/buffer.h b/src/include/buffer.h index 8e637d658c5..077cf0d9b0b 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -11,16 +11,16 @@ * Foundation. See file COPYING. * */ - #ifndef CEPH_BUFFER_H #define CEPH_BUFFER_H +#include "include/int_types.h" + #if defined(__linux__) #include <stdlib.h> #include <linux/types.h> #elif defined(__FreeBSD__) #include <sys/types.h> -#include "include/inttypes.h" #include <stdlib.h> #endif diff --git a/src/include/crc32c.h b/src/include/crc32c.h index d5f7388be56..8e22c624636 100644 --- a/src/include/crc32c.h +++ b/src/include/crc32c.h @@ -1,7 +1,8 @@ #ifndef CEPH_CRC32C_H #define CEPH_CRC32C_H -#include "include/inttypes.h" +#include "include/int_types.h" + #include <string.h> typedef uint32_t (*ceph_crc32c_func_t)(uint32_t crc, unsigned char const *data, unsigned length); diff --git a/src/include/encoding.h b/src/include/encoding.h index a091f7f69e9..fedc8b31299 100644 --- a/src/include/encoding.h +++ b/src/include/encoding.h @@ -11,13 +11,13 @@ * Foundation. See file COPYING. * */ - #ifndef CEPH_ENCODING_H #define CEPH_ENCODING_H +#include "include/int_types.h" + #include <tr1/memory> -#include "inttypes.h" #include "byteorder.h" #include "buffer.h" #include "assert.h" diff --git a/src/include/int_types.h b/src/include/int_types.h new file mode 100644 index 00000000000..f290f9d8d23 --- /dev/null +++ b/src/include/int_types.h @@ -0,0 +1,75 @@ +#ifndef CEPH_INTTYPES_H +#define CEPH_INTTYPES_H + +#include "acconfig.h" + +#if defined(__linux__) +#include <linux/types.h> +#endif + +/* + * 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 + +/* + * 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 + +#if defined(__FreeBSD__) +#include <sys/types.h> + +typedef int8_t __s8; +typedef uint8_t __u8; +typedef int16_t __s16; +typedef uint16_t __u16; +typedef int32_t __s32; +typedef uint32_t __u32; +typedef int64_t __s64; +typedef uint64_t __u64; + +#define __bitwise__ + +typedef __u16 __bitwise__ __le16; +typedef __u16 __bitwise__ __be16; +typedef __u32 __bitwise__ __le32; +typedef __u32 __bitwise__ __be32; +typedef __u64 __bitwise__ __le64; +typedef __u64 __bitwise__ __be64; + +#endif +#endif diff --git a/src/include/inttypes.h b/src/include/inttypes.h deleted file mode 100644 index 656e2bb0a0f..00000000000 --- a/src/include/inttypes.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef CEPH_INTTYPES_H -#define CEPH_INTTYPES_H - -#include <stdint.h> -#if defined(__linux__) -#include <linux/types.h> -#elif defined(__FreeBSD__) -#include <sys/types.h> -typedef int8_t __s8; -typedef uint8_t __u8; -typedef int16_t __s16; -typedef uint16_t __u16; -typedef int32_t __s32; -typedef uint32_t __u32; -typedef int64_t __s64; -typedef uint64_t __u64; - -#define __bitwise__ - -typedef __u16 __bitwise__ __le16; -typedef __u16 __bitwise__ __be16; -typedef __u32 __bitwise__ __le32; -typedef __u32 __bitwise__ __be32; -typedef __u64 __bitwise__ __le64; -typedef __u64 __bitwise__ __be64; - -#endif -#endif diff --git a/src/include/linux_fiemap.h b/src/include/linux_fiemap.h index ba5cb6657fa..352208b2207 100644 --- a/src/include/linux_fiemap.h +++ b/src/include/linux_fiemap.h @@ -7,15 +7,15 @@ * Kalpak Shah <kalpak.shah@sun.com> * Andreas Dilger <adilger@sun.com> */ - #ifndef _LINUX_FIEMAP_H #define _LINUX_FIEMAP_H +#include "include/int_types.h" + #if defined(__linux__) #include <linux/types.h> #elif defined(__FreeBSD_) #include <sys/types.h> -#include "include/inttypes.h" #endif struct fiemap_extent { diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h index 6f5e454c8e8..a85ef3057bc 100644 --- a/src/include/rados/librados.h +++ b/src/include/rados/librados.h @@ -1,6 +1,8 @@ #ifndef CEPH_LIBRADOS_H #define CEPH_LIBRADOS_H +#include "include/int_types.h" + #ifdef __cplusplus extern "C" { #endif @@ -10,7 +12,6 @@ extern "C" { #include <linux/types.h> #elif defined(__FreeBSD__) #include <sys/types.h> -#include "include/inttypes.h" #endif #include <string.h> #include "rados_types.h" diff --git a/src/include/types.h b/src/include/types.h index 7e6ddb7117e..1f9756b22c7 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -11,12 +11,11 @@ * Foundation. See file COPYING. * */ - #ifndef CEPH_TYPES_H #define CEPH_TYPES_H // this is needed for ceph_fs to compile in userland -#include "inttypes.h" +#include "int_types.h" #include "byteorder.h" #include "uuid.h" diff --git a/src/librbd/AioRequest.h b/src/librbd/AioRequest.h index 7625bdd7ff3..cf50ee2c049 100644 --- a/src/librbd/AioRequest.h +++ b/src/librbd/AioRequest.h @@ -3,9 +3,9 @@ #ifndef CEPH_LIBRBD_AIOREQUEST_H #define CEPH_LIBRBD_AIOREQUEST_H -#include <map> +#include "include/int_types.h" -#include "inttypes.h" +#include <map> #include "common/snap_types.h" #include "include/buffer.h" diff --git a/src/librbd/ImageCtx.h b/src/librbd/ImageCtx.h index 29ca2f197ea..c9e74393e13 100644 --- a/src/librbd/ImageCtx.h +++ b/src/librbd/ImageCtx.h @@ -3,7 +3,7 @@ #ifndef CEPH_LIBRBD_IMAGECTX_H #define CEPH_LIBRBD_IMAGECTX_H -#include <inttypes.h> +#include "include/int_types.h" #include <map> #include <set> diff --git a/src/librbd/SnapInfo.h b/src/librbd/SnapInfo.h index 5a7852c3c66..44dd4cf208e 100644 --- a/src/librbd/SnapInfo.h +++ b/src/librbd/SnapInfo.h @@ -3,7 +3,7 @@ #ifndef CEPH_LIBRBD_SNAPINFO_H #define CEPH_LIBRBD_SNAPINFO_H -#include <inttypes.h> +#include "include/int_types.h" #include "include/rados/librados.hpp" diff --git a/src/librbd/WatchCtx.h b/src/librbd/WatchCtx.h index 0c0802a4035..9872c84307b 100644 --- a/src/librbd/WatchCtx.h +++ b/src/librbd/WatchCtx.h @@ -3,7 +3,7 @@ #ifndef CEPH_LIBRBD_WATCHCTX_H #define CEPH_LIBRBD_WATCHCTX_H -#include <inttypes.h> +#include "include/int_types.h" #include "common/Mutex.h" #include "include/buffer.h" diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index abc6ff92a28..b8a757ab333 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -1,5 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab +#include "include/int_types.h" + #include <errno.h> #include <limits.h> @@ -8,7 +10,6 @@ #include "common/errno.h" #include "common/Throttle.h" #include "cls/lock/cls_lock_client.h" -#include "include/inttypes.h" #include "include/stringify.h" #include "cls/rbd/cls_rbd.h" diff --git a/src/librbd/internal.h b/src/librbd/internal.h index 33f5191706d..43458886b43 100644 --- a/src/librbd/internal.h +++ b/src/librbd/internal.h @@ -3,7 +3,7 @@ #ifndef CEPH_LIBRBD_INTERNAL_H #define CEPH_LIBRBD_INTERNAL_H -#include <inttypes.h> +#include "include/int_types.h" #include <map> #include <set> diff --git a/src/librbd/librbd.cc b/src/librbd/librbd.cc index af413dda04f..cad0c5eb172 100644 --- a/src/librbd/librbd.cc +++ b/src/librbd/librbd.cc @@ -11,9 +11,9 @@ * Foundation. See file COPYING. * */ +#include "include/int_types.h" #include <errno.h> -#include <inttypes.h> #include "common/Cond.h" #include "common/dout.h" diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index dd483263b6d..46f8d33cfd8 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -12,7 +12,8 @@ * */ -#include <inttypes.h> +#include "include/int_types.h" + #include <string> #include <stdio.h> diff --git a/src/mds/locks.c b/src/mds/locks.c index 37e3f5ea764..f367eda29d2 100644 --- a/src/mds/locks.c +++ b/src/mds/locks.c @@ -1,15 +1,15 @@ - // there must be a better way? typedef char bool; #define false 0 #define true 1 +#include "include/int_types.h" + #include <netinet/in.h> #if defined(__linux__) #include <linux/types.h> #elif defined(__FreeBSD__) #include <sys/types.h> -#include "include/inttypes.h" #endif #include <string.h> #include <fcntl.h> diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index 4fcf584fb8c..902e3104aa8 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -3,7 +3,8 @@ #ifndef CEPH_MDSTYPES_H #define CEPH_MDSTYPES_H -#include <inttypes.h> +#include "include/int_types.h" + #include <math.h> #include <ostream> #include <set> diff --git a/src/os/BtrfsFileStoreBackend.cc b/src/os/BtrfsFileStoreBackend.cc index ac7d1014ac7..bb11a45e10b 100644 --- a/src/os/BtrfsFileStoreBackend.cc +++ b/src/os/BtrfsFileStoreBackend.cc @@ -12,7 +12,9 @@ * */ -#include <inttypes.h> +#include "include/int_types.h" +#include "include/types.h" + #include <unistd.h> #include <fcntl.h> #include <errno.h> @@ -22,7 +24,6 @@ #include <sys/ioctl.h> #include "include/compat.h" #include "include/linux_fiemap.h" -#include "include/types.h" #include "include/color.h" #include "include/buffer.h" #include "include/assert.h" diff --git a/src/os/DBObjectMap.cc b/src/os/DBObjectMap.cc index 5142f4d7420..90c840bbe9c 100644 --- a/src/os/DBObjectMap.cc +++ b/src/os/DBObjectMap.cc @@ -1,13 +1,13 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -#include <iostream> -#include <inttypes.h> +#include "include/int_types.h" #include "include/buffer.h" + +#include <iostream> #include <set> #include <map> #include <string> #include <tr1/memory> - #include <vector> #include "ObjectMap.h" diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index d4d540df876..7ef415213b0 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -11,8 +11,8 @@ * Foundation. See file COPYING. * */ +#include "include/int_types.h" -#include <inttypes.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> @@ -30,10 +30,6 @@ #include <iostream> #include <map> -#if defined(__FreeBSD__) -#include "include/inttypes.h" -#endif - #include "include/compat.h" #include "include/linux_fiemap.h" diff --git a/src/os/GenericFileStoreBackend.cc b/src/os/GenericFileStoreBackend.cc index d0b3df5f6f2..461158fdfab 100644 --- a/src/os/GenericFileStoreBackend.cc +++ b/src/os/GenericFileStoreBackend.cc @@ -12,7 +12,9 @@ * */ -#include <inttypes.h> +#include "include/int_types.h" +#include "include/types.h" + #include <unistd.h> #include <fcntl.h> #include <errno.h> @@ -27,7 +29,6 @@ #include "include/compat.h" #include "include/linux_fiemap.h" -#include "include/types.h" #include <iostream> #include <fstream> diff --git a/src/os/ZFSFileStoreBackend.cc b/src/os/ZFSFileStoreBackend.cc index 0f01bd20ee7..aa52b8d2933 100644 --- a/src/os/ZFSFileStoreBackend.cc +++ b/src/os/ZFSFileStoreBackend.cc @@ -1,7 +1,9 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab -#include <inttypes.h> +#include "include/int_types.h" +#include "include/types.h" + #include <unistd.h> #include <fcntl.h> #include <errno.h> @@ -12,7 +14,6 @@ #include "include/compat.h" #include "include/linux_fiemap.h" -#include "include/types.h" #include "include/color.h" #include "include/buffer.h" #include "include/assert.h" diff --git a/src/os/chain_xattr.cc b/src/os/chain_xattr.cc index 96f334f8d00..62733e390d3 100644 --- a/src/os/chain_xattr.cc +++ b/src/os/chain_xattr.cc @@ -3,7 +3,8 @@ #include "chain_xattr.h" -#include <inttypes.h> +#include "include/int_types.h" + #include <unistd.h> #include <stdlib.h> #include <sys/types.h> @@ -21,10 +22,6 @@ #include <linux/fs.h> #endif -#if defined(__FreeBSD__) -#include "include/inttypes.h" -#endif - #include "common/xattr.h" /* diff --git a/src/rados_export.cc b/src/rados_export.cc index 5b8a899d3b8..bf6654114c5 100644 --- a/src/rados_export.cc +++ b/src/rados_export.cc @@ -11,6 +11,7 @@ * Foundation. See file COPYING. * */ +#include "include/int_types.h" #include "rados_sync.h" #include "common/errno.h" @@ -20,7 +21,6 @@ #include <dirent.h> #include <errno.h> #include <fstream> -#include <inttypes.h> #include <iostream> #include <sstream> #include <stdlib.h> diff --git a/src/rados_import.cc b/src/rados_import.cc index da968a7cc50..a6a398d767b 100644 --- a/src/rados_import.cc +++ b/src/rados_import.cc @@ -11,11 +11,11 @@ * Foundation. See file COPYING. * */ +#include "include/int_types.h" #include <dirent.h> #include <errno.h> #include <fstream> -#include <inttypes.h> #include <iostream> #include <sstream> #include <stdlib.h> diff --git a/src/rados_sync.cc b/src/rados_sync.cc index d16894c6ea9..03293d3402a 100644 --- a/src/rados_sync.cc +++ b/src/rados_sync.cc @@ -11,6 +11,7 @@ * Foundation. See file COPYING. * */ +#include "include/int_types.h" #include "common/ceph_argparse.h" #include "common/config.h" @@ -27,7 +28,6 @@ #include <dirent.h> #include <errno.h> #include <fstream> -#include <inttypes.h> #include <iostream> #include <memory> #include <sstream> diff --git a/src/rbd.cc b/src/rbd.cc index eba91958d8c..eea9733c4b9 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -8,6 +8,7 @@ * LGPL2. See file COPYING. * */ +#include "include/int_types.h" #include "mon/MonClient.h" #include "mon/MonMap.h" @@ -33,7 +34,6 @@ #include <boost/scoped_ptr.hpp> #include <dirent.h> #include <errno.h> -#include <inttypes.h> #include <iostream> #include <memory> #include <sstream> diff --git a/src/rbd_fuse/rbd-fuse.c b/src/rbd_fuse/rbd-fuse.c index 5a4bfe2702c..eea6edb9eb8 100644 --- a/src/rbd_fuse/rbd-fuse.c +++ b/src/rbd_fuse/rbd-fuse.c @@ -3,6 +3,8 @@ */ #define FUSE_USE_VERSION 26 +#include "include/int_types.h" + #include <stdio.h> #include <stdlib.h> #include <stddef.h> @@ -15,7 +17,6 @@ #include <sys/types.h> #include <unistd.h> #include <getopt.h> -#include <inttypes.h> #include "include/rbd/librbd.h" diff --git a/src/test/libcephfs/caps.cc b/src/test/libcephfs/caps.cc index 96f1a90024d..9fa92cf29dc 100644 --- a/src/test/libcephfs/caps.cc +++ b/src/test/libcephfs/caps.cc @@ -11,11 +11,11 @@ * Foundation. See file COPYING. * */ +#include "include/int_types.h" #include "gtest/gtest.h" #include "include/cephfs/libcephfs.h" #include <linux/types.h> -#include <inttypes.h> #include "include/ceph_fs.h" #include <errno.h> #include <sys/fcntl.h> diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 562be6a6bcf..84bf3477aff 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -12,6 +12,7 @@ * */ +#include "include/int_types.h" #include "include/rados/librados.h" #include "include/rbd_types.h" #include "include/rbd/librbd.h" @@ -20,7 +21,6 @@ #include "gtest/gtest.h" #include <errno.h> -#include <inttypes.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> diff --git a/src/test/osd/RadosModel.h b/src/test/osd/RadosModel.h index b9967d7af50..4f1aa4c3582 100644 --- a/src/test/osd/RadosModel.h +++ b/src/test/osd/RadosModel.h @@ -1,4 +1,6 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +#include "include/int_types.h" + #include "common/Mutex.h" #include "common/Cond.h" #include "include/rados/librados.hpp" @@ -15,7 +17,6 @@ #include <time.h> #include "Object.h" #include "TestOpStat.h" -#include "inttypes.h" #include "test/librados/test.h" #ifndef RADOSMODEL_H diff --git a/src/test/perf_counters.cc b/src/test/perf_counters.cc index d0b05f9f049..c44a15ef856 100644 --- a/src/test/perf_counters.cc +++ b/src/test/perf_counters.cc @@ -11,6 +11,10 @@ * Foundation. See file COPYING. * */ +#include "include/int_types.h" +#include "include/types.h" // FIXME: ordering shouldn't be important, but right + // now, this include has to come before the others. + #include "common/perf_counters.h" #include "common/admin_socket_client.h" @@ -19,9 +23,6 @@ #include "common/errno.h" #include "common/safe_io.h" -#include "include/types.h" // FIXME: ordering shouldn't be important, but right - // now, this include has to come before the others. - #include "common/code_environment.h" #include "global/global_context.h" #include "global/global_init.h" @@ -30,7 +31,6 @@ #include <errno.h> #include <fcntl.h> -#include <inttypes.h> #include <map> #include <poll.h> #include <sstream> |