[linbox] Fix build when size_t is unsigned long (eg. on s390)

Dan Horák sharkcz at fedoraproject.org
Tue Jan 1 15:35:52 UTC 2013


commit f51cedb93ca5e342bd202bd00df02afc7c8571e3
Author: Dan Horák <dan at danny.cz>
Date:   Tue Jan 1 16:35:47 2013 +0100

    Fix build when size_t is unsigned long (eg. on s390)

 linbox-size_t.patch |   25 +++++++++++++++++++++++++
 linbox.spec         |    8 +++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/linbox-size_t.patch b/linbox-size_t.patch
new file mode 100644
index 0000000..228e775
--- /dev/null
+++ b/linbox-size_t.patch
@@ -0,0 +1,25 @@
+diff -up linbox-1.3.2/linbox/matrix/blas-matrix.h.size_t linbox-1.3.2/linbox/matrix/blas-matrix.h
+--- linbox-1.3.2/linbox/matrix/blas-matrix.h.size_t	2013-01-01 14:05:14.000000000 +0100
++++ linbox-1.3.2/linbox/matrix/blas-matrix.h	2013-01-01 14:06:30.000000000 +0100
+@@ -225,7 +225,8 @@ namespace LinBox
+ 		// Pascal Giorgi: fix a bug with MAC OSX
+ 		// MAC OSX defines in stdint.h the int64_t to be a long long which causes trouble here
+ 		// might be useful to add signed type either but need to resolve conflict with pathch version above for GCC-4.4.5
+-#ifdef __APPLE__
++		// Dan Horak: also fixes case where size_t is defined as unsigned long (eg. on s390)
++#if defined(__APPLE__) || defined(__s390__)
+ 
+ 		template<class T>
+ 		BlasMatrix (const _Field &F, const unsigned long &m, const T &n) ;
+diff -up linbox-1.3.2/linbox/matrix/blas-matrix.inl.size_t linbox-1.3.2/linbox/matrix/blas-matrix.inl
+--- linbox-1.3.2/linbox/matrix/blas-matrix.inl.size_t	2013-01-01 14:05:19.000000000 +0100
++++ linbox-1.3.2/linbox/matrix/blas-matrix.inl	2013-01-01 14:06:47.000000000 +0100
+@@ -268,7 +268,7 @@ namespace LinBox
+ #endif
+ #endif
+ 
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__s390__)
+ 	template <class _Field>
+ 	template<class T>
+ 	BlasMatrix< _Field>::BlasMatrix (const _Field &F, const unsigned long & m, const T& n) :
diff --git a/linbox.spec b/linbox.spec
index 2e4ece9..22dd9ad 100644
--- a/linbox.spec
+++ b/linbox.spec
@@ -1,6 +1,6 @@
 Name:           linbox
 Version:        1.3.2
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        C++ Library for High-Performance Exact Linear Algebra
 Group:          Development/Libraries
 License:        LGPLv2+
@@ -20,6 +20,8 @@ Patch4:         %{name}-driver.patch
 Patch5:         %{name}-lapack.patch
 # Adapt to FPLLL 4.x
 Patch6:         %{name}-fplll.patch
+# Fix build when size_t is unsigned long (eg. on s390)
+Patch7:         %{name}-size_t.patch
 
 BuildRequires:  atlas-devel
 BuildRequires:  fflas-ffpack-devel
@@ -74,6 +76,7 @@ Documentation for %{name}.
 %patch4
 %patch5
 %patch6
+%patch7 -p1
 
 %build
 CFLAGS="%{optflags}"
@@ -138,6 +141,9 @@ LD_LIBRARY_PATH=`pwd`/linbox/.libs make %{?_smp_mflags} check
 
 
 %changelog
+* Tue Jan  1 2013 Dan Horák <dan[at]danny.cz> - 1.3.2-7
+- Fix build when size_t is unsigned long (eg. on s390)
+
 * Mon Dec 31 2012 Jerry James <loganjerry at gmail.com> - 1.3.2-6
 - Rebuild for m4ri 20121224
 


More information about the scm-commits mailing list