]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Forward port from 2.6 of definition of ISO C99 Standard printf() macros for 64 bit...
authorserassio <>
Tue, 14 Aug 2007 23:05:47 +0000 (23:05 +0000)
committerserassio <>
Tue, 14 Aug 2007 23:05:47 +0000 (23:05 +0000)
include/squid_mswin.h
src/squid.h

index bd8991c24517e0202688456f93ccf988b94dce5c..9d2c8e7dcdfc51bc2e9587d83e08087f7186002d 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * $Id: squid_mswin.h,v 1.4 2007/08/14 16:12:40 serassio Exp $
+ * $Id: squid_mswin.h,v 1.5 2007/08/14 17:05:47 serassio Exp $
  *
  * AUTHOR: Andrey Shorin <tolsty@tushino.com>
  * AUTHOR: Guido Serassio <serassio@squid-cache.org>
@@ -65,7 +65,6 @@ typedef unsigned long ino_t;
 
 #define INT64_MAX _I64_MAX
 #define INT64_MIN _I64_MIN
-#define PRId64 "I64d"
 
 #include "default_config_file.h"
 /* Some tricks for MS Compilers */
index 59f661ecbeeb01920c8ff969b48dacb417e5210c..518332998f8a49c169544fff8848ecc4e02c4fd7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.263 2007/08/14 16:12:41 serassio Exp $
+ * $Id: squid.h,v 1.264 2007/08/14 17:05:47 serassio Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -493,14 +493,29 @@ void free(V x) { fatal("Do not use ::free()"); }
 #define IPPROTO_TCP 0
 #endif
 
-#ifndef PRIu64 /* ISO C99 Standard printf() macro for 64 bit unsigned int */
-#ifdef _SQUID_MSWIN_ /* Windows native port using MSVCRT */
+/* 
+ * ISO C99 Standard printf() macros for 64 bit integers
+ * On some 64 bit platform, HP Tru64 is one, for printf must be used
+ * "%lx" instead of "%llx" 
+ */
+#ifndef PRId64
+#ifdef _SQUID_MSWIN_           /* Windows native port using MSVCRT */
+#define PRId64 "I64d"
+#elif SIZEOF_INT64_T > SIZEOF_LONG
+#define PRId64 "lld"
+#else
+#define PRId64 "ld"
+#endif
+#endif
+
+#ifndef PRIu64
+#ifdef _SQUID_MSWIN_           /* Windows native port using MSVCRT */
 #define PRIu64 "I64u"
 #elif SIZEOF_INT64_T > SIZEOF_LONG
 #define PRIu64 "llu"
 #else
 #define PRIu64 "lu"
-#endif /* _SQUID_MSWIN_ */
-#endif /* PRIu64 */
+#endif
+#endif
 
 #endif /* SQUID_H */