wok-next diff geeqie/stuff/patches/0001-Work-around-changed-c-11-std-string-implementation.patch @ rev 21247
updated cyrus-imapd (2.4.17 -> 3.0.12)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Dec 05 16:28:27 2019 +0100 (2019-12-05) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/geeqie/stuff/patches/0001-Work-around-changed-c-11-std-string-implementation.patch Thu Dec 05 16:28:27 2019 +0100 1.3 @@ -0,0 +1,66 @@ 1.4 +From 0b044d1d685307e5755917e31d56a1a3104cd505 Mon Sep 17 00:00:00 2001 1.5 +From: David Kalnischkies <david@kalnischkies.de> 1.6 +Date: Fri, 27 May 2016 12:04:40 +0100 1.7 +Subject: [PATCH] Work around changed c++11 std::string implementation 1.8 + 1.9 +Bug was already partly fixed by 96db62d but there was even more 1.10 +positions that was unseen by Solomon. 1.11 + 1.12 +The patch is originally from Debian bug report #800350. 1.13 + 1.14 +Signed-off-by: Klaus Ethgen <Klaus@Ethgen.de> 1.15 +--- 1.16 + src/exiv2.cc | 12 +++++++----- 1.17 + 1 file changed, 7 insertions(+), 5 deletions(-) 1.18 + 1.19 +diff --git a/src/exiv2.cc b/src/exiv2.cc 1.20 +index 1dbe1182..49b8e07c 100644 1.21 +--- a/src/exiv2.cc 1.22 ++++ b/src/exiv2.cc 1.23 +@@ -25,6 +25,7 @@ 1.24 + #include <exiv2/image.hpp> 1.25 + #include <exiv2/exif.hpp> 1.26 + #include <iostream> 1.27 ++#include <string> 1.28 + 1.29 + // EXIV2_TEST_VERSION is defined in Exiv2 0.15 and newer. 1.30 + #ifndef EXIV2_TEST_VERSION 1.31 +@@ -1140,8 +1141,9 @@ guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width, 1.32 + 1.33 + if (!exif->image()) return NULL; 1.34 + 1.35 ++ std::string const path = exif->image()->io().path(); 1.36 + /* given image pathname, first do simple (and fast) file extension test */ 1.37 +- gboolean is_raw = filter_file_class(exif->image()->io().path().c_str(), FORMAT_CLASS_RAWIMAGE); 1.38 ++ gboolean is_raw = filter_file_class(path.c_str(), FORMAT_CLASS_RAWIMAGE); 1.39 + 1.40 + if (!is_raw && requested_width == 0) return NULL; 1.41 + 1.42 +@@ -1241,10 +1243,10 @@ extern "C" guchar *exif_get_preview(ExifData *exif, guint *data_len, gint reques 1.43 + if (!exif) return NULL; 1.44 + if (!exif->image()) return NULL; 1.45 + 1.46 +- const char* path = exif->image()->io().path().c_str(); 1.47 ++ std::string const path = exif->image()->io().path(); 1.48 + 1.49 + /* given image pathname, first do simple (and fast) file extension test */ 1.50 +- if (!filter_file_class(path, FORMAT_CLASS_RAWIMAGE)) return NULL; 1.51 ++ if (!filter_file_class(path.c_str(), FORMAT_CLASS_RAWIMAGE)) return NULL; 1.52 + 1.53 + try { 1.54 + struct stat st; 1.55 +@@ -1255,9 +1257,9 @@ extern "C" guchar *exif_get_preview(ExifData *exif, guint *data_len, gint reques 1.56 + 1.57 + RawFile rf(exif->image()->io()); 1.58 + offset = rf.preview_offset(); 1.59 +- DEBUG_1("%s: offset %lu", path, offset); 1.60 ++ DEBUG_1("%s: offset %lu", path.c_str(), offset); 1.61 + 1.62 +- fd = open(path, O_RDONLY); 1.63 ++ fd = open(path.c_str(), O_RDONLY); 1.64 + if (fd == -1) 1.65 + { 1.66 + return NULL; 1.67 +-- 1.68 +2.13.2 1.69 +