Browse Source

Add TOR_PRIdSZ to torint.h

teor 5 years ago
parent
commit
e26794ace9
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/lib/cc/torint.h

+ 10 - 0
src/lib/cc/torint.h

@@ -100,6 +100,16 @@ typedef int32_t ssize_t;
 #  define TOR_PRIuSZ "zu"
 #endif
 
+#ifdef _WIN32
+#  ifdef _WIN64
+#    define TOR_PRIdSZ PRId64
+#  else
+#    define TOR_PRIdSZ PRId32
+#  endif
+#else
+#  define TOR_PRIdSZ "zd"
+#endif
+
 #ifndef SSIZE_MAX
 #if (SIZEOF_SIZE_T == 4)
 #define SSIZE_MAX INT32_MAX