소스 검색

Add TOR_PRIdSZ to torint.h

teor 7 년 전
부모
커밋
e26794ace9
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  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