[pkg-firebird-general] Bug#415668: patch

Bastian Blank waldi at debian.org
Mon Jul 27 19:08:51 UTC 2009


tags 415668 patch
thanks

Attached is the patch to support s390 and s390x. It survived the
database and table creation.

Bastian

-- 
No one may kill a man.  Not for any purpose.  It cannot be condoned.
		-- Kirk, "Spock's Brain", stardate 5431.6
-------------- next part --------------
diff -Nru firebird2.1-2.1.2.18118-0.ds1/debian/changelog firebird2.1-2.1.2.18118-0.ds1/debian/changelog
--- firebird2.1-2.1.2.18118-0.ds1/debian/changelog	2009-07-27 19:07:13.000000000 +0000
+++ firebird2.1-2.1.2.18118-0.ds1/debian/changelog	2009-07-27 19:07:14.000000000 +0000
@@ -1,3 +1,10 @@
+firebird2.1 (2.1.2.18118-0.ds1-3.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Add support for s390.
+
+ -- Bastian Blank <waldi at debian.org>  Mon, 27 Jul 2009 16:31:26 +0000
+
 firebird2.1 (2.1.2.18118-0.ds1-3) unstable; urgency=low
 
   * remove stray g++-4.3 from Build-Depends the package builds fine with
diff -Nru firebird2.1-2.1.2.18118-0.ds1/debian/patches/port-s390.patch firebird2.1-2.1.2.18118-0.ds1/debian/patches/port-s390.patch
--- firebird2.1-2.1.2.18118-0.ds1/debian/patches/port-s390.patch	1970-01-01 00:00:00.000000000 +0000
+++ firebird2.1-2.1.2.18118-0.ds1/debian/patches/port-s390.patch	2009-07-27 19:07:14.000000000 +0000
@@ -0,0 +1,103 @@
+--- a/src/jrd/common.h
++++ b/src/jrd/common.h
+@@ -151,6 +151,14 @@
+ #define RISC_ALIGNMENT
+ #endif // IA64
+ 
++#ifdef __s390__
++#ifdef __s390x__
++#define IMPLEMENTATION  isc_info_db_impl_linux_s390x	// 79
++#else
++#define IMPLEMENTATION  isc_info_db_impl_linux_s390	// 78
++#endif
++#endif
++
+ #define MEMMOVE(from, to, length)		memmove ((void *)to, (void *)from, (size_t) length)
+ #define MOVE_FAST(from, to, length)       memcpy (to, from, (int) (length))
+ #define MOVE_FASTER(from, to, length)     memcpy (to, from, (int) (length))
+--- a/src/jrd/inf_pub.h
++++ b/src/jrd/inf_pub.h
+@@ -208,6 +208,9 @@
+ 
+ 	isc_info_db_impl_darwin_ppc64 = 77,
+ 
++	isc_info_db_impl_linux_s390 = 78,
++	isc_info_db_impl_linux_s390x = 79,
++
+ 	isc_info_db_impl_last_value   // Leave this LAST!
+ };
+ 
+--- a/src/jrd/pag.cpp
++++ b/src/jrd/pag.cpp
+@@ -160,9 +160,11 @@
+ static const int CLASS_LINUX_ARM = 33;    // LINUX/ARM
+ static const int CLASS_LINUX_IA64 = 34;    // LINUX/IA64
+ static const int CLASS_DARWIN_PPC64 = 35; // Darwin/PowerPC64
++static const int CLASS_LINUX_S390 = 36; // LINUX/s390
++static const int CLASS_LINUX_S390X = 37; // LINUX/s390x
+ 
+ static const int CLASS_MAX10 = CLASS_LINUX_AMD64;	// This should not be changed, no new ports with ODS10
+-static const int CLASS_MAX = CLASS_DARWIN_PPC64;
++static const int CLASS_MAX = CLASS_LINUX_S390X;
+ 
+ // ARCHITECTURE COMPATIBILITY CLASSES
+ 
+@@ -253,7 +255,9 @@
+ 	archLittleEndian, // CLASS_SOLARIS_AMD64
+ 	archLittleEndian, // CLASS_LINUX_ARM
+ 	archLittleEndian, // CLASS_LINUX_IA64
+-	archBigEndian	  // CLASS_DARWIN_PPC64
++	archBigEndian,	  // CLASS_DARWIN_PPC64
++	archBigEndian,	  // CLASS_LINUX_S390
++	archBigEndian,	  // CLASS_LINUX_S390X
+ };
+ 
+ #ifdef sun
+@@ -311,6 +315,12 @@
+ const SSHORT CLASS		= CLASS_LINUX_MIPS;
+ #elif defined(IA64)
+ const SSHORT CLASS		= CLASS_LINUX_IA64;
++#elif defined(__s390__)
++# if defined(__s390x__)
++const SSHORT CLASS		= CLASS_LINUX_S390X;
++# else
++const SSHORT CLASS		= CLASS_LINUX_S390;
++# endif
+ #else
+ #error no support on other hardware for Linux
+ #endif
+--- a/src/jrd/utl.cpp
++++ b/src/jrd/utl.cpp
+@@ -244,7 +244,9 @@
+     "Firebird/sun/amd64",	/* 74 */	
+     "Firebird/linux ARM",	/* 75 */
+     "Firebird/linux IA64",	/* 76 */
+-	"Firebird/Darwin/PowerPC64"	/* 77 */
++    "Firebird/Darwin/PowerPC64",	/* 77 */
++    "Firebird/Linux s390",	/* 78 */
++    "Firebird/Linux s390x",	/* 79 */
+ };
+ 
+ 
+--- a/src/remote/xdr.cpp
++++ b/src/remote/xdr.cpp
+@@ -45,7 +45,7 @@
+ // ASF: Currently, all little-endian are SWAP_DOUBLE and big-endian aren't.
+ #if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64)
+ #define		SWAP_DOUBLE
+-#elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPSEB) || defined(__ppc64__)
++#elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPSEB) || defined(__ppc64__) || defined(__s390__)
+ #undef		SWAP_DOUBLE
+ #else
+ #error "Define SWAP_DOUBLE for your platform correctly !"
+--- a/builds/posix/prefix.linux_generic
++++ b/builds/posix/prefix.linux_generic
+@@ -18,7 +18,7 @@
+ #
+ # 2 Oct 2002, Nickolay Samofatov - Major cleanup
+ 
+-COMMON_FLAGS=-DLINUX -pipe -MMD -fPIC -DFB_SEND_FLAGS=MSG_NOSIGNAL
++COMMON_FLAGS=-DLINUX -pipe -MMD -fPIC -DFB_SEND_FLAGS=MSG_NOSIGNAL -fsigned-char
+ 
+ PROD_FLAGS=-ggdb -O3 -DNDEBUG $(COMMON_FLAGS)
+ DEV_FLAGS=-ggdb -p -Wall -Wno-switch $(COMMON_FLAGS)
diff -Nru firebird2.1-2.1.2.18118-0.ds1/debian/patches/series firebird2.1-2.1.2.18118-0.ds1/debian/patches/series
--- firebird2.1-2.1.2.18118-0.ds1/debian/patches/series	2009-07-27 19:07:13.000000000 +0000
+++ firebird2.1-2.1.2.18118-0.ds1/debian/patches/series	2009-07-27 19:07:14.000000000 +0000
@@ -12,3 +12,4 @@
 use-libedit.patch
 no-spurious-linkage.patch
 cvs_autogen.sh-autoreconf.patch
+port-s390.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-firebird-general/attachments/20090727/da9b95a6/attachment.pgp>


More information about the pkg-firebird-general mailing list