]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Remove always enabled USE_64_BIT_COUNTERS define
authorArne Schwabe <arne@rfc2549.org>
Wed, 21 Apr 2021 13:43:44 +0000 (15:43 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 22 Apr 2021 08:22:06 +0000 (10:22 +0200)
Also change the types to use C99 uint64_t and its printf u64 define.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20210421134348.1950392-3-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22171.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/common.h
src/openvpn/syshead.h

index 623b3e0d7d1f567e25ca3a998e395700063b8a1a..544fa238ecd0f3507d0833e715f1366b3b933132 100644 (file)
 #define COMMON_H
 
 /*
- * Statistics counters and associated printf formats.
+ * Statistics counters and associated printf format.
  */
-#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  /* ifdef USE_64_BIT_COUNTERS */
-typedef unsigned int counter_type;
-#define counter_format   "%u"
-#endif
+typedef uint64_t counter_type;
+#define counter_format  "%" PRIu64
 
 /*
  * Time intervals
index bac07d1026e62288abe96b9e9c7b18e53ac32c16..e7657b880c011a581cc6838896a0bd0f5369b69e 100644 (file)
@@ -462,11 +462,6 @@ socket_defined(const socket_descriptor_t sd)
     return sd != SOCKET_UNDEFINED;
 }
 
-/*
- * Should statistics counters be 64 bits?
- */
-#define USE_64_BIT_COUNTERS
-
 /*
  * Should we enable the use of execve() for calling subprocesses,
  * instead of system()?