]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - compat/types.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / types.h
index 318ae10849d8763f21ccbe6c3f6806afeb5ec2c1..59a32cbe630a43c257970e9fb9fc42da18ae4510 100644 (file)
 #include <netinet/in_systm.h>
 #endif
 
-
 /******************************************************/
 /* Typedefs for missing entries on a system           */
 /******************************************************/
 
-
 /*
  * ISO C99 Standard printf() macros for 64 bit integers
  * On some 64 bit platform, HP Tru64 is one, for printf must be used
 #endif
 #endif
 
+#ifndef PRIuSIZE
+// NP: configure checks for support of %zu and defines where possible
+#if SIZEOF_SIZE_T == 4 && _SQUID_MINGW_
+#define PRIuSIZE "I32u"
+#elif SIZEOF_SIZE_T == 4
+#define PRIuSIZE "u"
+#elif SIZEOF_SIZE_T == 8 && _SQUID_MINGW_
+#define PRIuSIZE "I64u"
+#elif SIZEOF_SIZE_T == 8
+#define PRIuSIZE "lu"
+#else
+#error size_t is not 32-bit or 64-bit
+#endif
+#endif /* PRIuSIZE */
+
 #ifndef HAVE_MODE_T
 typedef unsigned short mode_t;
 #endif