[Pkg-phototools-commits] [SCM] openimageio branch, upstream, updated. upstream/1.1.6+dfsg0-1-g5a783e1
Matteo F. Vescovi
mfv.debian at gmail.com
Tue Feb 26 08:35:04 UTC 2013
The following commit has been merged in the upstream branch:
commit 5a783e124d550485ec5fe152bac658f626dae469
Author: Matteo F. Vescovi <mfv.debian at gmail.com>
Date: Tue Feb 26 09:33:42 2013 +0100
Imported Upstream version 1.1.7+dfsg0
diff --git a/CHANGES b/CHANGES
index e8c2b5b..df059d9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,14 @@
Changes:
+Release 1.1.7 (21 Feb 2013)
+---------------------------
+* Back out dangerous change to thread.h that was in 1.1.6, which could
+ cause performance problems.
+* Compile fix for WIN32 in strutil.cpp
+* Compile fix for Windows XP - add implementation of InterlockedExchangeAdd64
+
+
Release 1.1.6 (11 Feb 2013)
---------------------------
* Fix bug that could generate NaNs or other bad values near the poles of
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d9aa5b9..d35a913 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,7 +3,7 @@ project (OpenImageIO)
# Release version of the library
set (OIIO_VERSION_MAJOR 1)
set (OIIO_VERSION_MINOR 1)
-set (OIIO_VERSION_PATCH 6)
+set (OIIO_VERSION_PATCH 7)
cmake_minimum_required (VERSION 2.6)
if (NOT CMAKE_VERSION VERSION_LESS 2.8.4)
diff --git a/src/include/thread.h b/src/include/thread.h
index 92267f8..28645fc 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -91,6 +91,18 @@
# if defined(_WIN64)
# pragma intrinsic(_InterlockedExchangeAdd64)
# endif
+// InterlockedExchangeAdd64 is not available for XP
+# if defined(_WIN32_WINNT) && _WIN32_WINNT <= 0x0501
+inline long long
+InterlockedExchangeAdd64 (volatile long long *Addend, long long Value)
+{
+ long long Old;
+ do {
+ Old = *Addend;
+ } while (_InterlockedCompareExchange64(Addend, Old + Value, Old) != Old);
+ return Old;
+}
+# endif
#endif
#ifdef __APPLE__
@@ -98,9 +110,9 @@
#endif
#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
-# if !USE_TBB
-# define USE_GCC_ATOMICS 1
-# endif
+#if !defined(__FreeBSD__) || defined(__x86_64__)
+#define USE_GCC_ATOMICS
+#endif
#endif
OIIO_NAMESPACE_ENTER
diff --git a/src/libutil/strutil.cpp b/src/libutil/strutil.cpp
index 3eead1d..6ab139d 100644
--- a/src/libutil/strutil.cpp
+++ b/src/libutil/strutil.cpp
@@ -41,6 +41,16 @@
#include <boost/algorithm/string.hpp>
#ifdef _WIN32
+// defining NOMINMAX to prevent problems with std::min/std::max
+// and std::numeric_limits<type>::min()/std::numeric_limits<type>::max()
+// when including windows.h
+#ifdef _MSC_VER
+# define WIN32_LEAN_AND_MEAN
+# define VC_EXTRALEAN
+# ifndef NOMINMAX
+# define NOMINMAX
+# endif
+#endif
#include <windows.h>
#include <shellapi.h>
#endif
--
OpenImageIO packaging
More information about the Pkg-phototools-commits
mailing list