From 6c1f5a822a9ee7335ae9888f5bc81d9586fac2a7 Mon Sep 17 00:00:00 2001 From: MASM fan Date: Thu, 1 Jan 2015 13:07:14 -0800 Subject: [PATCH] Fix forced %llx issue with MinGW, remove unnecessary condition * 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 | 11 +++++------ src/util.h | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/serialize.h b/src/serialize.h index 1a9eaf7..31a2883 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -21,16 +21,15 @@ #include #endif +#if defined __USE_MINGW_ANSI_STDIO +#undef __USE_MINGW_ANSI_STDIO // This constant forces MinGW to conduct stupid behavior +#endif +#include + #include "allocators.h" #include "version.h" -#if !defined(_MSC_VER) || _MSC_VER > 1700 -#include -#else -#include "inttypes.h" -#endif - class CScript; class CDataStream; class CAutoFile; diff --git a/src/util.h b/src/util.h index 410debe..77b439e 100644 --- a/src/util.h +++ b/src/util.h @@ -5,11 +5,6 @@ #ifndef BITCOIN_UTIL_H #define BITCOIN_UTIL_H -#if !defined(_MSC_VER) || _MSC_VER > 1700 -#include -#else -#include "inttypes.h" -#endif #include "uint256.h" @@ -33,6 +28,11 @@ #include +#if defined(__USE_MINGW_ANSI_STDIO) +#undef __USE_MINGW_ANSI_STDIO // This constant forces MinGW to conduct stupid behavior +#endif +#include + #include "netbase.h" // for AddTimeData -- 1.7.1