]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix build errors on HP Tru64 Unix and may be others
authorserassio <>
Wed, 15 Aug 2007 01:17:43 +0000 (01:17 +0000)
committerserassio <>
Wed, 15 Aug 2007 01:17:43 +0000 (01:17 +0000)
- xusleep.c: on Tru64 timeval is defined in sys/time.h
- move the definition of ISO C99 Standard printf() macros for 64 bit
  integers from squid.h to squid_types.h

include/squid_types.h
lib/util.c
lib/xusleep.c
src/squid.h

index 927e3f2199c29c1261fb86446329c6c9ce377c99..720d370b643cc41d5e66b1e12dd8a5aeb86dcc1a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: squid_types.h,v 1.8 2003/06/01 09:01:41 hno Exp $
+ * $Id: squid_types.h,v 1.9 2007/08/14 19:17:43 serassio Exp $
  *
  * * * * * * * * Legal stuff * * * * * * *
  *
 #include <sys/select.h>
 #endif
 
+/* 
+ * 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
+#endif
+
 #endif /* SQUID_TYPES_H */
index 953cf9db3345a31a202ce29249ee8e7ee282fbfa..ad698708bc063ac9c25199abbb1a7081cace6526 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: util.c,v 1.96 2007/08/13 17:20:50 hno Exp $
+ * $Id: util.c,v 1.97 2007/08/14 19:17:43 serassio Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -924,7 +924,7 @@ const char *
 xint64toa(int64_t num)
 {
     static char buf[24];       /* 2^64 = 18446744073709551616 */
-    snprintf(buf, sizeof(buf), "%"PRId64, num);
+    snprintf(buf, sizeof(buf), "%" PRId64, num);
     return buf;
 }
 
index e51afd37d116cd4b2d04ffdf4e798e7a98d40d27..f32e2c8db73340f4ac08473b75d328b258d4cf03 100644 (file)
@@ -8,6 +8,9 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
 #if HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
index 518332998f8a49c169544fff8848ecc4e02c4fd7..518ce6554befbc3964dadd862ba107a6702b318d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.264 2007/08/14 17:05:47 serassio Exp $
+ * $Id: squid.h,v 1.265 2007/08/14 19:17:45 serassio Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -493,29 +493,4 @@ void free(V x) { fatal("Do not use ::free()"); }
 #define IPPROTO_TCP 0
 #endif
 
-/* 
- * 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
-#endif
-
 #endif /* SQUID_H */