Fix forced %llx issue with MinGW, remove unnecessary condition
authorMASM fan <masmfan@gmail.com>
Thu, 1 Jan 2015 21:07:14 +0000 (13:07 -0800)
committerMASM fan <masmfan@gmail.com>
Thu, 1 Jan 2015 21:07:14 +0000 (13:07 -0800)
* MinGW replaces %I64 with %llx which could cause compilation warnings;
* We already using src/ as includes directory so no need for additional conditions.

src/serialize.h
src/util.h

index 1a9eaf7..31a2883 100644 (file)
 #include <boost/tuple/tuple_io.hpp>
 #endif
 
+#if defined __USE_MINGW_ANSI_STDIO
+#undef __USE_MINGW_ANSI_STDIO // This constant forces MinGW to conduct stupid behavior
+#endif
+#include <inttypes.h>
+
 #include "allocators.h"
 #include "version.h"
 
 
-#if !defined(_MSC_VER) || _MSC_VER > 1700
-#include <inttypes.h>
-#else
-#include "inttypes.h"
-#endif
-
 class CScript;
 class CDataStream;
 class CAutoFile;
index 410debe..77b439e 100644 (file)
@@ -5,11 +5,6 @@
 #ifndef BITCOIN_UTIL_H
 #define BITCOIN_UTIL_H
 
-#if !defined(_MSC_VER) || _MSC_VER > 1700
-#include <inttypes.h>
-#else
-#include "inttypes.h"
-#endif
 
 #include "uint256.h"
 
 
 #include <stdarg.h>
 
+#if defined(__USE_MINGW_ANSI_STDIO)
+#undef __USE_MINGW_ANSI_STDIO // This constant forces MinGW to conduct stupid behavior
+#endif
+#include <inttypes.h>
+
 #include "netbase.h" // for AddTimeData