Add typdef patch for more pedantic gcc 4.8.
This commit is contained in:
parent
6c9f5a1ca4
commit
67b5ae29db
|
@ -15,6 +15,8 @@ Source101: FindTBB.cmake
|
|||
Patch0: oiio-arm.patch
|
||||
Patch1: oiio-ppc.patch
|
||||
Patch2: oiio-s390.patch
|
||||
# https://github.com/OpenImageIO/oiio/pull/642
|
||||
Patch3: oiio-typedef.patch
|
||||
|
||||
BuildRequires: cmake txt2man
|
||||
BuildRequires: qt4-devel
|
||||
|
@ -83,6 +85,7 @@ Development files for package %{name}
|
|||
%patch0 -p1 -b .arm
|
||||
%patch1 -p1 -b .ppc
|
||||
#patch2 -p1 -b .s390
|
||||
%patch3 -p1 -b .typedef
|
||||
|
||||
# Install FindTBB.cmake
|
||||
install %{SOURCE101} src/cmake/modules/
|
||||
|
@ -161,6 +164,7 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1
|
|||
%changelog
|
||||
* Fri Jul 15 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.0-1
|
||||
- Update to latest upstream release.
|
||||
- Add patch for more pedantic gcc 4.8.
|
||||
|
||||
* Wed Jul 3 2013 Richard Shaw <hobbes1069@gmail.com> - 1.1.13-1
|
||||
- Update to latest bugfix release.
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
From 17748a3dfdddf0bc5e7a8948967547ab899dc700 Mon Sep 17 00:00:00 2001
|
||||
From: Larry Gritz <lg@larrygritz.com>
|
||||
Date: Thu, 18 Jul 2013 19:09:27 -0700
|
||||
Subject: [PATCH 1/3] Fix compiler warning about unused local typedef
|
||||
|
||||
---
|
||||
src/field3d.imageio/field3dinput.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/field3d.imageio/field3dinput.cpp b/src/field3d.imageio/field3dinput.cpp
|
||||
index eeeac12..4df7158 100644
|
||||
--- a/src/field3d.imageio/field3dinput.cpp
|
||||
+++ b/src/field3d.imageio/field3dinput.cpp
|
||||
@@ -145,7 +145,6 @@ inline int blocksize (FieldRes::Ptr &f)
|
||||
typename SparseField<T>::Ptr sf (field_dynamic_cast<SparseField<T> >(f));
|
||||
if (sf)
|
||||
return sf->blockSize();
|
||||
- typedef FIELD3D_VEC3_T<T> VecData_T;
|
||||
typename SparseField<T>::Ptr vsf (field_dynamic_cast<SparseField<T> >(f));
|
||||
if (vsf)
|
||||
return vsf->blockSize();
|
||||
--
|
||||
1.8.1.6
|
||||
|
||||
|
||||
From 27439302e32cdaacf7137f4e80eaf1c8a86cf862 Mon Sep 17 00:00:00 2001
|
||||
From: Larry Gritz <lg@larrygritz.com>
|
||||
Date: Thu, 18 Jul 2013 19:57:55 -0700
|
||||
Subject: [PATCH 2/3] Make it work for big endian
|
||||
|
||||
---
|
||||
src/libtexture/texture3d.cpp | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/libtexture/texture3d.cpp b/src/libtexture/texture3d.cpp
|
||||
index 34a57d6..2ba64f0 100644
|
||||
--- a/src/libtexture/texture3d.cpp
|
||||
+++ b/src/libtexture/texture3d.cpp
|
||||
@@ -378,10 +378,9 @@
|
||||
// bool svalid[2], tvalid[2], rvalid[2]; // Valid texels? false means black border
|
||||
union { bool bvalid[6]; unsigned long long ivalid; } valid_storage;
|
||||
valid_storage.ivalid = 0;
|
||||
- DASSERT (sizeof(valid_storage) >= 6*sizeof(bool));
|
||||
+ DASSERT (sizeof(valid_storage) == 8);
|
||||
const unsigned long long none_valid = 0;
|
||||
- const unsigned long long all_valid = 0x010101010101LL;
|
||||
- DASSERT (__LITTLE_ENDIAN__ && "this trick won't work with big endian");
|
||||
+ const unsigned long long all_valid = littleendian() ? 0x010101010101LL : 0x01010101010100LL;
|
||||
bool *svalid = valid_storage.bvalid;
|
||||
bool *tvalid = valid_storage.bvalid + 2;
|
||||
bool *rvalid = valid_storage.bvalid + 4;
|
||||
--
|
||||
1.8.1.6
|
||||
|
||||
|
||||
From 7fc6e497326cdcdd72904cda3d48ed9c1f87ac69 Mon Sep 17 00:00:00 2001
|
||||
From: Larry Gritz <lg@larrygritz.com>
|
||||
Date: Thu, 18 Jul 2013 19:58:45 -0700
|
||||
Subject: [PATCH 3/3] Fix compile problem with gcc but on platforms with no
|
||||
'pause'
|
||||
|
||||
---
|
||||
src/include/thread.h | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/include/thread.h b/src/include/thread.h
|
||||
index cf3717e..8a31dfc 100644
|
||||
--- a/src/include/thread.h
|
||||
+++ b/src/include/thread.h
|
||||
@@ -318,16 +318,17 @@ class thread_specific_ptr {
|
||||
inline void
|
||||
pause (int delay)
|
||||
{
|
||||
-#if defined(__GNUC__)
|
||||
- for (int i = 0; i < delay; ++i) {
|
||||
-#if defined __arm__ || defined __s390__
|
||||
- __asm__ __volatile__("NOP;");
|
||||
-#else
|
||||
+#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
|
||||
+ for (int i = 0; i < delay; ++i)
|
||||
__asm__ __volatile__("pause;");
|
||||
-#endif
|
||||
- }
|
||||
+
|
||||
+#elif defined(__GNUC__) && (defined(__arm__) || defined(__s390__))
|
||||
+ for (int i = 0; i < delay; ++i)
|
||||
+ __asm__ __volatile__("NOP;");
|
||||
+
|
||||
#elif USE_TBB
|
||||
__TBB_Pause(delay);
|
||||
+
|
||||
#elif defined(_MSC_VER)
|
||||
for (int i = 0; i < delay; ++i) {
|
||||
#if defined (_WIN64)
|
||||
@@ -336,6 +337,7 @@ class thread_specific_ptr {
|
||||
_asm pause
|
||||
#endif /* _WIN64 */
|
||||
}
|
||||
+
|
||||
#else
|
||||
// No pause on this platform, just punt
|
||||
for (int i = 0; i < delay; ++i) ;
|
||||
--
|
||||
1.8.1.6
|
||||
|
Loading…
Reference in New Issue