diff --git a/fmt.spec b/fmt.spec index a25c1f8..6d803e3 100644 --- a/fmt.spec +++ b/fmt.spec @@ -1,6 +1,6 @@ Name: fmt Version: 3.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Small, safe and fast formatting library for C++ License: BSD @@ -10,6 +10,8 @@ Source0: https://github.com/fmtlib/fmt/releases/download/%{version}/%{nam Patch0: fmt_gmock_crash.patch # See https://github.com/fmtlib/fmt/issues/329 Patch1: fmt_mock_locale.patch +# See https://github.com/fmtlib/fmt/issues/398 +Patch2: fmt_char_width.patch %if 0%{?rhel} BuildRequires: cmake3 @@ -107,5 +109,8 @@ make -C build test %postun -p /sbin/ldconfig %changelog +* Tue Nov 15 2016 Dave Johansen - 3.0.0-2 +- Fix expected unqualified-id before numeric constant error + * Wed Aug 24 2016 Dave Johansen - 3.0.0-1 - Initial RPM release diff --git a/fmt_char_width.patch b/fmt_char_width.patch new file mode 100644 index 0000000..1d7a3bf --- /dev/null +++ b/fmt_char_width.patch @@ -0,0 +1,32 @@ +--- a/fmt/format.h ++++ b/fmt/format.h +@@ -1822,21 +1822,21 @@ + typedef typename BasicWriter::CharPtr CharPtr; + Char fill = internal::CharTraits::cast(spec_.fill()); + CharPtr out = CharPtr(); +- const unsigned CHAR_WIDTH = 1; +- if (spec_.width_ > CHAR_WIDTH) { ++ const unsigned CHAR_SIZE = 1; ++ if (spec_.width_ > CHAR_SIZE) { + out = writer_.grow_buffer(spec_.width_); + if (spec_.align_ == ALIGN_RIGHT) { +- std::uninitialized_fill_n(out, spec_.width_ - CHAR_WIDTH, fill); +- out += spec_.width_ - CHAR_WIDTH; ++ std::uninitialized_fill_n(out, spec_.width_ - CHAR_SIZE, fill); ++ out += spec_.width_ - CHAR_SIZE; + } else if (spec_.align_ == ALIGN_CENTER) { + out = writer_.fill_padding(out, spec_.width_, +- internal::check(CHAR_WIDTH), fill); ++ internal::check(CHAR_SIZE), fill); + } else { +- std::uninitialized_fill_n(out + CHAR_WIDTH, +- spec_.width_ - CHAR_WIDTH, fill); ++ std::uninitialized_fill_n(out + CHAR_SIZE, ++ spec_.width_ - CHAR_SIZE, fill); + } + } else { +- out = writer_.grow_buffer(CHAR_WIDTH); ++ out = writer_.grow_buffer(CHAR_SIZE); + } + *out = internal::CharTraits::cast(value); + }