[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:43:40 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a7d516b

The following commit has been merged in the master branch:
commit a7d516b072f9016770b3f1b3cf6b5c103276dd40
Author: Robin Mills <robin at clanmills.com>
Date:   Wed Apr 17 04:14:05 2013 +0000

    Patch:  Forum Topic 1177.  Thanks very much to James for providing this.
---
 CMakeLists.txt                   |  4 +++-
 config/config.h.cmake            | 17 +++++++++++++++++
 config/config.h.in               | 17 +++++++++++++++++
 samples/geotag.cpp               | 11 ++++++++---
 src/matroskavideo.cpp            |  2 +-
 src/quicktimevideo.cpp           |  6 +++---
 src/rcsid_int.hpp                |  3 ++-
 xmpsdk/include/XMP_Environment.h | 21 +++++++++++++++++++++
 8 files changed, 72 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bea3261..9151182 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,8 @@ OPTION( EXIV2_ENABLE_BUILD_SAMPLES "Build the unit tests"
 OPTION( EXIV2_ENABLE_BUILD_PO      "Build translations files"                              OFF )
 
 IF( MINGW OR UNIX )
-    ADD_DEFINITIONS(-Wall
+    IF ( CMAKE_CXX_COMPILER STREQUAL "g++" OR CMAKE_C_COMPILER STREQUAL "gcc" ) 
+        ADD_DEFINITIONS(-Wall
                     -Wcast-align
                     -Wpointer-arith
                     -Wformat-security
@@ -61,6 +62,7 @@ IF( MINGW OR UNIX )
                     -Woverloaded-virtual
                     -W
                    )
+    ENDIF()
 ENDIF( MINGW OR UNIX )
 
 
diff --git a/config/config.h.cmake b/config/config.h.cmake
index 84f7b2a..41a1998 100644
--- a/config/config.h.cmake
+++ b/config/config.h.cmake
@@ -246,3 +246,20 @@ typedef int pid_t;
 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
 # pragma warning(disable : 4996 4251)
 #endif
+
+/*
+  If you're using Solaris and the Solaris Studio compiler, then you really
+  do need to use -library=stdcxx4 along with these inclusions below
+*/
+#if defined(OS_SOLARIS)
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <math.h>
+#if defined(__cplusplus)
+#include <ios>
+#include <fstream>
+#endif
+#endif
+
diff --git a/config/config.h.in b/config/config.h.in
index 5ff3c7f..c20c234 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -246,3 +246,20 @@
 #else
 # define EXIV2API
 #endif /* ! EXV_HAVE_DLL */
+
+/*
+  If you're using Solaris and the Solaris Studio compiler, then you really
+  do need to use -library=stdcxx4 along with these inclusions below
+*/
+#if defined(OS_SOLARIS)
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <math.h>
+#if defined(__cplusplus)
+#include <ios>
+#include <fstream>
+#endif
+#endif
+
diff --git a/samples/geotag.cpp b/samples/geotag.cpp
index c7a71e5..4381fcc 100644
--- a/samples/geotag.cpp
+++ b/samples/geotag.cpp
@@ -404,17 +404,22 @@ int timeZoneAdjust()
 {
     time_t    now   = time(NULL);
     struct tm local = *localtime(&now) ;
+    int       offset;
 
 #if   defined(_MSC_VER)
     TIME_ZONE_INFORMATION TimeZoneInfo;
     GetTimeZoneInformation( &TimeZoneInfo );
-    int offset = - (((int)TimeZoneInfo.Bias + (int)TimeZoneInfo.DaylightBias) * 60);
+    offset = - (((int)TimeZoneInfo.Bias + (int)TimeZoneInfo.DaylightBias) * 60);
 #elif defined(__CYGWIN__)
     struct tm lcopy  = *localtime(&now);
     time_t    gmt    =  timegm(&lcopy) ; // timegm modifies lcopy, so don't use local
-    int       offset = (int) ( ((long signed int) gmt) - ((long signed int) now) ) ;
+    offset           = (int) ( ((long signed int) gmt) - ((long signed int) now) ) ;
+#elif defined(OS_SOLARIS)
+    time_t local_tt = (int) mktime(&local);
+    time_t time_gmt = (int) mktime(gmtime(&now));
+    offset = time_gmt - local_tt;
 #else
-    int offset = local.tm_gmtoff ;
+    offset = local.tm_gmtoff ;
 #endif
 
 #if 0
diff --git a/src/matroskavideo.cpp b/src/matroskavideo.cpp
index ae50287..a1a6929 100644
--- a/src/matroskavideo.cpp
+++ b/src/matroskavideo.cpp
@@ -457,7 +457,7 @@ namespace Exiv2 {
         int64_t temp = 0;
 
         for(int i = size-1; i >= 0; i--) {
-            temp = temp + static_cast<int64_t>(buf[i]*(pow(256.0, size-i-1)));
+            temp = temp + static_cast<int64_t>(buf[i]*(pow(256.0, (double)size-i-1)));
         }
 // Todo: remove debug output
 //        std::cerr << "size = " << size << ", val = " << temp << std::hex << " (0x" << temp << std::dec << ")";
diff --git a/src/quicktimevideo.cpp b/src/quicktimevideo.cpp
index a4957d8..866ca46 100644
--- a/src/quicktimevideo.cpp
+++ b/src/quicktimevideo.cpp
@@ -1,4 +1,4 @@
-// ***************************************************************** -*- C++ -*-
+// ***************************************************************** -*- C++ -*-
 /*
  * Copyright (C) 2004-2012 Andreas Huggel <ahuggel at gmx.net>
  *
@@ -559,7 +559,7 @@ namespace Exiv2 {
 #ifdef _MSC_VER
             temp = temp + static_cast<int64_t>(buf.pData_[i]*(pow(static_cast<float>(256), n-i-1)));
 #else
-			temp = temp + buf.pData_[i]*(pow(256,n-i-1));
+	temp = temp + buf.pData_[i]*(pow((float)256,n-i-1));
 #endif
 
         return temp;
@@ -577,7 +577,7 @@ namespace Exiv2 {
 #if _MSC_VER
 			temp = temp + static_cast<uint64_t>(buf.pData_[i]*(pow(static_cast<float>(256), n-i-1)));
 #else
-			temp = temp + buf.pData_[i]*(pow(256,n-i-1));
+	temp = temp + buf.pData_[i]*(pow((float)256,n-i-1));
 #endif
 
         return temp;
diff --git a/src/rcsid_int.hpp b/src/rcsid_int.hpp
index 6a65e79..efd69a1 100644
--- a/src/rcsid_int.hpp
+++ b/src/rcsid_int.hpp
@@ -55,7 +55,8 @@
 
 #ifndef  __clang__
 #define EXIV2_RCSID(id) \
-    namespace { \
+//    namespace { \
+    { \
         inline const char* getRcsId(const char*) { return id ; } \
         const char* rcsId = getRcsId(rcsId); \
     }
diff --git a/xmpsdk/include/XMP_Environment.h b/xmpsdk/include/XMP_Environment.h
index e855457..9180d23 100644
--- a/xmpsdk/include/XMP_Environment.h
+++ b/xmpsdk/include/XMP_Environment.h
@@ -27,7 +27,11 @@
 // macros with 0 or 1 values.
 
 /* 20-Oct-07, ahu: Determine the platform, set the above defines accordingly.                     */
+
+#if !defined(_FILE_OFFSET_BITS)
 #define _FILE_OFFSET_BITS 64
+#endif
+
 #if defined __CYGWIN32__ && !defined __CYGWIN__
    /* For backwards compatibility with Cygwin b19 and
       earlier, we define __CYGWIN__ here, so that
@@ -139,3 +143,20 @@
 // =================================================================================================
 
 #endif  // __XMP_Environment_h__
+
+/*
+  If you're using Solaris and the Solaris Studio compiler, then you really
+  do need to use -library=stdcxx4 along with these inclusions below
+*/
+#if defined(OS_SOLARIS)
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <math.h>
+#if defined(__cplusplus)
+#include <ios>
+#include <fstream>
+#endif
+#endif
+

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list