[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:46:51 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=14f7f18
The following commit has been merged in the master branch:
commit 14f7f18222b6dc0d3fc046dcf18b3c0ccec27646
Author: Robin Mills <robin at clanmills.com>
Date: Mon Sep 5 20:52:46 2016 +0000
#1057 Correction to r4633 to fix Windows build-breakers (Cygwin/MinGW and msvc)
---
src/actions.cpp | 8 +++++---
src/exiv2app.hpp | 20 +++++++++++++++++++-
src/jpgimage.cpp | 14 +++++---------
3 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/src/actions.cpp b/src/actions.cpp
index b0717d4..d13f7e6 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -1324,9 +1324,11 @@ namespace Action {
std::cerr << iccProfilePath
<< ": " << _("Failed to open the file
");
rc = -1;
- }
- Exiv2::DataBuf iccProfileBlob = Exiv2::readFile(iccProfilePath);
- return insertIccProfile(path,iccProfileBlob);
+ } else {
+ Exiv2::DataBuf iccProfileBlob = Exiv2::readFile(iccProfilePath);
+ rc = insertIccProfile(path,iccProfileBlob);
+ }
+ return rc;
} // Insert::insertIccProfile
diff --git a/src/exiv2app.hpp b/src/exiv2app.hpp
index f2a6e57..c5b0bd6 100644
--- a/src/exiv2app.hpp
+++ b/src/exiv2app.hpp
@@ -44,9 +44,16 @@
#include <regex.h>
#endif
+#if EXV_HAVE_STDINT_H
#include <unistd.h>
+#endif
+
+#ifndef _MSC_VER
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
+#include <sys/select.h>
+#endif
// *****************************************************************************
// class definitions
@@ -289,6 +296,16 @@ private:
// copy stdin to stdinBuf
SET_BINARY_MODE(stdin);
+#if 0
+#ifdef _MSC_VER
+ // http://stackoverflow.com/questions/19955617/win32-read-from-stdin-with-timeout
+ INPUT_RECORD record;
+ DWORD numRead;
+ if ( ReadConsoleInput(GetStdHandle(STD_INPUT_HANDLE), &record, 1, &numRead)) {
+#endif
+#endif
+
+#if defined(__APPLE__) || defined(__LINUX__)
// http://stackoverflow.com/questions/34479795/make-c-not-wait-for-user-input/34479916#34479916
fd_set readfds;
FD_ZERO (&readfds);
@@ -303,7 +320,7 @@ private:
bool more = bytes != NULL;
while ( more ) {
char buff[buff_size];
- int n = fread(buff,1,buff_size,stdin);
+ int n = (int) fread(buff,1,buff_size,stdin);
more = n > 0 ;
if ( more ) {
bytes = (Exiv2::byte*) realloc(bytes,nBytes+n);
@@ -318,6 +335,7 @@ private:
}
if ( bytes != NULL ) ::free(bytes) ;
}
+#endif
}
//! Prevent copy-construction: not implemented.
diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp
index 456d952..893f39e 100644
--- a/src/jpgimage.cpp
+++ b/src/jpgimage.cpp
@@ -606,15 +606,11 @@ namespace Exiv2 {
// which markers have a length field?
bool mHasLength[256];
- for ( int marker = 0 ; marker < 256 ; marker ++ )
- mHasLength[marker]
- = ( marker >= sof0_ && marker <= sof15_)
- || ( marker >= app0_ && marker <= (app0_ | 0x0F))
- || marker == dht_
- || marker == dqt_
- || marker == dri_
- || marker == com_
- || marker == sos_
+ for ( int i = 0 ; i < 256 ; i ++ )
+ mHasLength[i]
+ = ( i >= sof0_ && i <= sof15_)
+ || ( i >= app0_ && i <= (app0_ | 0x0F))
+ || ( i == dht_ || i == dqt_ || i == dri_ || i == com_ || i == sos_ )
;
// Container for the signature
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list