#define COMMON_H
/*
- * Statistics counters.
+ * Statistics counters and associated printf formats.
*/
-typedef unsigned long long int counter_type;
+#ifdef USE_64_BIT_COUNTERS
+ typedef unsigned long long int counter_type;
+# ifdef WIN32
+# define counter_format "%I64u"
+# else
+# define counter_format "%llu"
+# endif
+#else
+ typedef unsigned int counter_type;
+# define counter_format "%u"
+#endif
/*
* Time intervals
/*
* Printf formats for special types
*/
-#define counter_format "%llu"
#define ptr_format "0x%08lx"
#define time_format "%lu"
#define fragment_header_format "0x%08x"
return sd != SOCKET_UNDEFINED;
}
+/*
+ * Should statistics counters be 64 bits?
+ */
+#define USE_64_BIT_COUNTERS
+
/*
* Do we have point-to-multipoint capability?
*/