]> source.dussan.org Git - tigervnc.git/commitdiff
Use mingw's stdio routines where needed
authorPierre Ossman <ossman@cendio.se>
Sat, 30 May 2020 19:40:39 +0000 (21:40 +0200)
committerPierre Ossman <ossman@cendio.se>
Sun, 31 May 2020 09:09:14 +0000 (11:09 +0200)
It allows us to use the more standard format specifiers.

tests/perf/encperf.cxx

index 1b14151b17966138e8c35588a143433f9c6c4f48..990cc44019366e38673688e3a2c44dc6fc133d4b 100644 (file)
@@ -26,6 +26,8 @@
  * are not encoded in the file and must be specified by the user.
  */
 
+#define __USE_MINGW_ANSI_STDIO 1
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
@@ -499,13 +501,8 @@ int main(int argc, char **argv)
 
   printf("Core usage (total): %g (+/- %g %%)\n", median, meddev);
 
-#ifdef WIN32
-  printf("Encoded bytes: %I64d\n", runs[0].bytes);
-  printf("Raw equivalent bytes: %I64d\n", runs[0].rawEquivalent);
-#else
-  printf("Encoded bytes: %lld\n", runs[0].bytes);
-  printf("Raw equivalent bytes: %lld\n", runs[0].rawEquivalent);
-#endif
+  printf("Encoded bytes: %llu\n", runs[0].bytes);
+  printf("Raw equivalent bytes: %llu\n", runs[0].rawEquivalent);
   printf("Ratio: %g\n", runs[0].ratio);
 
   return 0;