Package: cryfs
Version: 0.9.7-1
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu artful ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * CHAR_WIDTH.patch: Backport a commit from upstream to avoid collision
    with ISO/IEC TS 18661-1:2014 CHAR_WIDTH macro now included in glibc.

Should be fairly self-explanatory.  Note that updating to a new upstream
version would also include this fix and close the bug, as they seem to
have updated their vendor copy.

... Adam

-- System Information:
Debian Release: stretch/sid
  APT prefers artful
  APT policy: (500, 'artful')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0-12-lowlatency (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru cryfs-0.9.7/debian/patches/CHAR_WIDTH.patch 
cryfs-0.9.7/debian/patches/CHAR_WIDTH.patch
--- cryfs-0.9.7/debian/patches/CHAR_WIDTH.patch 1969-12-31 17:00:00.000000000 
-0700
+++ cryfs-0.9.7/debian/patches/CHAR_WIDTH.patch 2017-09-12 14:14:10.000000000 
-0600
@@ -0,0 +1,52 @@
+From abbefd71666055daac9e14e78262620f9e845850 Mon Sep 17 00:00:00 2001
+From: Victor Zverovich <victor.zverov...@gmail.com>
+Date: Wed, 19 Oct 2016 06:52:55 -0700
+Subject: [PATCH] CHAR_WIDTH -> CHAR_SIZE to avoid collision with ISO/IEC TS
+ 18661-1:2014 macro
+
+---
+ fmt/format.h | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/fmt/format.h b/fmt/format.h
+index ae7bd493..de1475bc 100644
+--- a/vendor/spdlog/spdlog/fmt/bundled/format.h
++++ b/vendor/spdlog/spdlog/fmt/bundled/format.h
+@@ -2233,29 +2233,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 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::const_check(CHAR_WIDTH), 
fill);
++                                           internal::const_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<Char>::cast(value);
+     }
diff -Nru cryfs-0.9.7/debian/patches/series cryfs-0.9.7/debian/patches/series
--- cryfs-0.9.7/debian/patches/series   2017-05-17 18:50:07.000000000 -0600
+++ cryfs-0.9.7/debian/patches/series   2017-09-12 14:15:55.000000000 -0600
@@ -1,2 +1,3 @@
 build-test
 disable-mars-test
+CHAR_WIDTH.patch

Reply via email to