Update cinttype for older CentOS/RHEL versions.
authorBrian Aker <brian@tangent.org>
Thu, 3 May 2012 21:16:50 +0000 (14:16 -0700)
committerBrian Aker <brian@tangent.org>
Thu, 3 May 2012 21:16:50 +0000 (14:16 -0700)
libmemcached-1.0/memcached.h
m4/bottom.m4

index da8ac7e35de85f7aa683a9ac0a4df10e722d639e..fa9661528002e9f3712ace1f0679065d678c9213 100644 (file)
 
 #pragma once
 
-#include <inttypes.h>
+/* This seems to be required for older compilers @note http://stackoverflow.com/questions/8132399/how-to-printf-uint64-t  */
+#define __STDC_FORMAT_MACROS
 
 #ifdef __cplusplus
-#include <cstddef>
-#include <cstdlib>
+#  include <tr1/cinttypes>
+#  include <cstddef>
+#  include <cstdlib>
 #else
-#include <stddef.h>
-#include <stdlib.h>
+#  include <inttypes.h>
+#  include <stddef.h>
+#  include <stdlib.h>
+#  include <stdbool.h>
 #endif
 
 #include <sys/types.h>
 
-
-#if !defined(__cplusplus)
-# include <stdbool.h>
-#endif
-
 #include <libmemcached-1.0/visibility.h>
 #include <libmemcached-1.0/configure.h>
 #include <libmemcached-1.0/platform.h>
index 9f99d428b6a68c787e484a37cad192f978439b75..303aaf7a6cc7d614c0088362f4a85ddbeb5333fc 100644 (file)
@@ -12,12 +12,12 @@ AH_TOP([
 
 AH_BOTTOM([
 
+#define __STDC_FORMAT_MACROS
 #if defined(__cplusplus) 
-#include CSTDINT_H 
-#include CINTTYPES_H 
+#  include CINTTYPES_H 
 #else 
-#include <stdint.h> 
-#include <inttypes.h> 
+#  include <inttypes.h> 
 #endif
 
 #if !defined(HAVE_ULONG) && !defined(__USE_MISC)