diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2016-07-23 18:47:39 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2016-07-23 18:47:39 +0200 |
commit | 17080e6959589aafadb640ff907322cf6395804c (patch) | |
tree | 175e305a50cb29d41c0960a482ea493c9c1b6218 | |
parent | 4423c242a693c37fbb4edc50f17c02cdf98abd88 (diff) |
Revert "fix building with gcc 6.1.0 by making it consistent with other source files. (nw)"
This reverts commit 4423c242a693c37fbb4edc50f17c02cdf98abd88.
-rw-r--r-- | src/tools/chdman.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index 3bc363a628c..86b406a4393 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -36,8 +36,11 @@ //************************************************************************** // CONSTANTS & DEFINES //************************************************************************** -#if defined(_MSC_VER) +/* MINGW has adopted the MSVC formatting for 64-bit ints as of gcc 4.4 */ +#if defined(WIN32) #define I64FMT "I64" +#elif !defined(__APPLE__) && defined(__LP64__) +#define I64FMT "l" #else #define I64FMT "ll" #endif @@ -1735,7 +1738,7 @@ static void do_create_hd(parameters_t ¶ms) auto size_str = params.find(OPTION_SIZE); if (size_str != params.end()) { - if (sscanf(size_str->second->c_str(), "%" I64FMT "d", &filesize) != 1) + if (sscanf(size_str->second->c_str(), "%" I64FMT"d", &filesize) != 1) report_error(1, "Invalid size string"); } } |