Explorar o código

Add TOR_PRIdSZ to torint.h

teor %!s(int64=7) %!d(string=hai) anos
pai
achega
e26794ace9
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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