[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#438869: #438869, qt-x11-free should Build-Depend on firebird2.0-dev



Hi,

Here's an improved version of the patch.

Changes since the last:

* Added powerpc to debian/rules' interbase-architectures list.
* Fixed bad typecast in interbase sql driver, causing FTBFS on amd64

That last needs some explanation:

  -    d->ibase = (isc_db_handle)connection;
  +    d->ibase = (isc_db_handle)(long int)connection;

thing is that connection is defined as void* and isc_db_handle is
defined like this (/usr/include/ibase.h):

  #if defined(_LP64) || defined(__LP64__) || defined(__arch64__)
  typedef unsigned int    FB_API_HANDLE;
  #else
  typedef void*           FB_API_HANDLE;
  #endif

  typedef FB_API_HANDLE isc_db_handle;

So on 32-bit architectures both connection and isc_db_handle are void*,
but on 64-bit one is isc_db_handle is unsigned int (32-bit), while
connection is void* (64-bit).

In older versions of firebird, isc_db_handle was void*.

As I understand it, the intention of FB_API_HANDLE is to give 32-bit
number on all architectures. This causes problems on 64-bit ones, where
void* is 64-bit. The (long int) intermediate cast in the patch serves
only to shut up the compiler, knowing that connection always contains
32-bit number.

The proper way to fix this is to use isc_db_handle as the type of
connection. This, however means API change and may be better made upstream.

Anyway, I believe the patch is complete now and would cause no harm.

Please consider applying.
-- 
dam            JabberID: dam@jabber.minus273.org
diff -u qt-x11-free-3.3.7/debian/rules qt-x11-free-3.3.7/debian/rules
--- qt-x11-free-3.3.7/debian/rules
+++ qt-x11-free-3.3.7/debian/rules
@@ -93,7 +93,7 @@
 		-inputmethod			\
 		# End of CONFIGURE_OPTS
 
-interbase_archs := i386 amd64 sparc
+interbase_archs := i386 amd64 sparc powerpc
 ifneq ($(DEB_HOST_ARCH_CPU),$(findstring $(DEB_HOST_ARCH_CPU),$(interbase_archs)))
 	CONFIGURE_OPTS += -no-sql-ibase
 	IBASE = -Nlibqt3-mt-ibase
diff -u qt-x11-free-3.3.7/debian/control qt-x11-free-3.3.7/debian/control
--- qt-x11-free-3.3.7/debian/control
+++ qt-x11-free-3.3.7/debian/control
@@ -1,7 +1,7 @@
 Source: qt-x11-free
 Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
 Uploaders: Christopher Martin <chrsmrtn@debian.org>, Adeodato Simó <dato@net.com.org.es>, Ana Beatriz Guerrero Lopez <ana@debian.org>, Sune Vuorela <debian@pusling.com>
-Build-Depends: debhelper (>= 5.0.31), libxext-dev (>= 4.3.0.dfsg.1-4), libxrandr-dev (>= 4.3.0.dfsg.1-4), libsm-dev (>= 4.3.0.dfsg.1-4), libxmu-dev (>= 4.3.0.dfsg.1-4), libice-dev (>= 4.3.0.dfsg.1-4), libx11-dev (>= 4.3.0.dfsg.1-4), libxt-dev (>= 4.3.0.dfsg.1-4), libxrender-dev, libxcursor-dev, libxinerama-dev, libxi-dev, zlib1g-dev, libjpeg62-dev, libmng-dev (>= 1.0.3), libpng12-dev | libpng12-0-dev, libfontconfig1-dev, libfreetype6-dev, libxft-dev, libiodbc2-dev (>= 3.51.2-4), libmysqlclient15-dev | libmysqlclient-dev, flex, libpq-dev, libaudio-dev, libcupsys2-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, dpatch (>= 1.13), libsqlite3-dev, firebird1.5-dev [i386 kfreebsd-i386 kfreebsd-amd64 knetbsd-i386 netbsd-i386 amd64 sparc]
+Build-Depends: debhelper (>= 5.0.31), libxext-dev (>= 4.3.0.dfsg.1-4), libxrandr-dev (>= 4.3.0.dfsg.1-4), libsm-dev (>= 4.3.0.dfsg.1-4), libxmu-dev (>= 4.3.0.dfsg.1-4), libice-dev (>= 4.3.0.dfsg.1-4), libx11-dev (>= 4.3.0.dfsg.1-4), libxt-dev (>= 4.3.0.dfsg.1-4), libxrender-dev, libxcursor-dev, libxinerama-dev, libxi-dev, zlib1g-dev, libjpeg62-dev, libmng-dev (>= 1.0.3), libpng12-dev | libpng12-0-dev, libfontconfig1-dev, libfreetype6-dev, libxft-dev, libiodbc2-dev (>= 3.51.2-4), libmysqlclient15-dev | libmysqlclient-dev, flex, libpq-dev, libaudio-dev, libcupsys2-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, dpatch (>= 1.13), libsqlite3-dev, firebird2.0-dev [i386 kfreebsd-i386 kfreebsd-amd64 knetbsd-i386 netbsd-i386 amd64 sparc powerpc]
 Section: libs
 Priority: optional
 Standards-Version: 3.7.2
@@ -51,7 +51,7 @@
  to access a PostgreSQL DB.
 
 Package: libqt3-mt-ibase
-Architecture: i386 kfreebsd-i386 kfreebsd-amd64 knetbsd-i386 netbsd-i386 amd64 sparc
+Architecture: i386 kfreebsd-i386 kfreebsd-amd64 knetbsd-i386 netbsd-i386 amd64 sparc powerpc
 Section: libs
 Depends: ${shlibs:Depends}
 Conflicts: libqt3c102-mt-ibase
diff -u qt-x11-free-3.3.7/debian/changelog qt-x11-free-3.3.7/debian/changelog
--- qt-x11-free-3.3.7/debian/changelog
+++ qt-x11-free-3.3.7/debian/changelog
@@ -1,3 +1,13 @@
+qt-x11-free (3:3.3.7-6.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Build-Depend on firebird2.0-dev
+  * Add powerpc to firebird-supported architectures
+  * Fix bad typecast in src/sql/drivers/ibase/qsql_ibase.cpp causing FTBFS on
+    amd64
+
+ -- Damyan Ivanov <dmn@debian.org>  Tue, 21 Aug 2007 10:25:20 +0300
+
 qt-x11-free (3:3.3.7-6) unstable; urgency=low
 
   * Patch for potential vulnerability in QTextEdit, which might cause remote
only in patch2:
unchanged:
--- qt-x11-free-3.3.7.orig/src/sql/drivers/ibase/qsql_ibase.cpp
+++ qt-x11-free-3.3.7/src/sql/drivers/ibase/qsql_ibase.cpp
@@ -767,7 +767,7 @@
     : QSqlDriver(parent, name ? name : QIBASE_DRIVER_NAME)
 {
     d = new QIBaseDriverPrivate(this);
-    d->ibase = (isc_db_handle)connection;
+    d->ibase = (isc_db_handle)(long int)connection;
     setOpen(TRUE);
     setOpenError(FALSE);
 }

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: