]> git.pld-linux.org Git - packages/spdlog.git/commitdiff
- fix var clash with a constant from limits.h auto/th/spdlog-1.12-2
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 9 Jun 2020 20:34:41 +0000 (22:34 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 9 Jun 2020 20:34:41 +0000 (22:34 +0200)
- rel 2

spdlog.spec
var-name-clash.patch [new file with mode: 0644]

index c9e2710aacf08658e221c9f73c54b6c1b3c4d205..715f7dcb9d0cee07a1317819d292ec2f31f0bb88 100644 (file)
@@ -2,13 +2,14 @@ Summary:      Very fast C++ logging library
 Summary(pl.UTF-8):     Bardzo szybka biblioteka C++ do logowania
 Name:          spdlog
 Version:       1.12
-Release:       1
+Release:       2
 License:       MIT
 Group:         Development/Libraries
 #Source0Download: https://github.com/COMBINE-lab/spdlog/releases
 Source0:       https://github.com/COMBINE-lab/spdlog/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: e05894aef7494567b417328cee683a55
 Patch0:                libdir.patch
+Patch1:                var-name-clash.patch
 URL:           https://github.com/COMBINE-lab/spdlog
 BuildRequires: cmake >= 3.1
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -36,6 +37,7 @@ logowania.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
diff --git a/var-name-clash.patch b/var-name-clash.patch
new file mode 100644 (file)
index 0000000..edc6b32
--- /dev/null
@@ -0,0 +1,40 @@
+--- spdlog-1.12/include/spdlog/fmt/bundled/format.h~   2016-08-26 14:39:00.000000000 +0200
++++ spdlog-1.12/include/spdlog/fmt/bundled/format.h    2020-06-09 22:31:27.877890734 +0200
+@@ -2195,29 +2195,29 @@
+         typedef typename BasicWriter<Char>::CharPtr CharPtr;
+         Char fill = internal::CharTraits<Char>::cast(spec_.fill());
+         CharPtr out = CharPtr();
+-        const unsigned CHAR_WIDTH = 1;
+-        if (spec_.width_ > CHAR_WIDTH)
++        const unsigned _SPD_CHAR_WIDTH = 1;
++        if (spec_.width_ > _SPD_CHAR_WIDTH)
+         {
+             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_ - _SPD_CHAR_WIDTH, fill);
++                out += spec_.width_ - _SPD_CHAR_WIDTH;
+             }
+             else if (spec_.align_ == ALIGN_CENTER)
+             {
+                 out = writer_.fill_padding(out, spec_.width_,
+-                                           internal::const_check(CHAR_WIDTH), fill);
++                                           internal::const_check(_SPD_CHAR_WIDTH), fill);
+             }
+             else
+             {
+-                std::uninitialized_fill_n(out + CHAR_WIDTH,
+-                                          spec_.width_ - CHAR_WIDTH, fill);
++                std::uninitialized_fill_n(out + _SPD_CHAR_WIDTH,
++                                          spec_.width_ - _SPD_CHAR_WIDTH, fill);
+             }
+         }
+         else
+         {
+-            out = writer_.grow_buffer(CHAR_WIDTH);
++            out = writer_.grow_buffer(_SPD_CHAR_WIDTH);
+         }
+         *out = internal::CharTraits<Char>::cast(value);
+     }
This page took 0.195297 seconds and 4 git commands to generate.