rev 9415 - in trunk/packages/qt-x11-free/debian: . patches

Fathi Boudra fabo at alioth.debian.org
Sat Feb 16 15:25:36 UTC 2008


Author: fabo
Date: 2008-02-16 15:25:36 +0000 (Sat, 16 Feb 2008)
New Revision: 9415

Added:
   trunk/packages/qt-x11-free/debian/patches/01_stat_extern_inline_hack.diff
Modified:
   trunk/packages/qt-x11-free/debian/changelog
   trunk/packages/qt-x11-free/debian/patches/0087-use-xrandr-1.2.diff
   trunk/packages/qt-x11-free/debian/patches/series
Log:
* Re-add *stat64 symbols to Qt3 using 01_stat_extern_inline_hack patch.


Modified: trunk/packages/qt-x11-free/debian/changelog
===================================================================
--- trunk/packages/qt-x11-free/debian/changelog	2008-02-15 12:22:32 UTC (rev 9414)
+++ trunk/packages/qt-x11-free/debian/changelog	2008-02-16 15:25:36 UTC (rev 9415)
@@ -1,3 +1,28 @@
+qt-x11-free (3:3.3.8b-2) unstable; urgency=low
+
+  * Re-add *stat64 symbols to Qt3 using 01_stat_extern_inline_hack patch:
+
+    * the extern inlines from sys/stat.h are just gone, and that's just normal
+      in fact.
+    * /usr/lib/libc.so is a linker script that pulls /lib/libc-2.7.so _and_
+      /usr/lib/libc_nonshared.a.
+    * the latter defines stat64 and friends as weak-symbols and alises to
+      __xstat64 and friends.
+
+    That's how when you link something that uses fstat64 it finds the symbol at
+    link time, letting you the possibility to override it with your own
+    implementation.
+
+    The fact that the extern inlines were used at some point in the past _was_
+    a bug, and let qt3 divert those, which should have not happened in the
+    first place. Sadly, when you link against qt3, it picks those symbols
+    because it will always prefer symbols from a shared lib than from the .a
+    IIRC, or it's due to the link order, anyways, it's not relevant.
+
+    Thanks to Pierre Habouzit and Modestas Vainius. (Closes: #465028)
+
+ -- Fathi Boudra <fabo at debian.org>  Sat, 16 Feb 2008 16:02:03 +0100
+
 qt-x11-free (3:3.3.8b-1) unstable; urgency=low
 
   * New upstream release:

Modified: trunk/packages/qt-x11-free/debian/patches/0087-use-xrandr-1.2.diff
===================================================================
--- trunk/packages/qt-x11-free/debian/patches/0087-use-xrandr-1.2.diff	2008-02-15 12:22:32 UTC (rev 9414)
+++ trunk/packages/qt-x11-free/debian/patches/0087-use-xrandr-1.2.diff	2008-02-16 15:25:36 UTC (rev 9415)
@@ -18,15 +18,16 @@
      }
  
      if ( rects )     delete [] rects;
-@@ -119,30 +119,33 @@
+@@ -117,6 +117,8 @@
+ void QDesktopWidgetPrivate::init()
+ {
      // get the screen count
++    int newScreenCount;
++
  #ifndef QT_NO_XINERAMA
      XineramaScreenInfo *xinerama_screeninfo = 0;
--    int unused;
-+    int unused, newScreenCount;
-     use_xinerama = (XineramaQueryExtension(QPaintDevice::x11AppDisplay(),
- 					   &unused, &unused) &&
- 		    XineramaIsActive(QPaintDevice::x11AppDisplay()));
+     int unused;
+@@ -126,23 +128,26 @@
  
      if (use_xinerama) {
  	xinerama_screeninfo =
@@ -59,7 +60,7 @@
  
  #ifndef QT_NO_XINERAMA
  	if (use_xinerama) {
-@@ -159,11 +162,33 @@
+@@ -159,11 +164,33 @@
  		h = HeightOfScreen(ScreenOfDisplay(QPaintDevice::x11AppDisplay(), i));
  	    }
  
@@ -94,7 +95,7 @@
      if (xinerama_screeninfo)
  	XFree(xinerama_screeninfo);
  #endif // QT_NO_XINERAMA
-@@ -216,8 +241,7 @@
+@@ -216,8 +243,7 @@
  	screen = d->defaultScreen;
  
      if ( ! d->screens ) {

Added: trunk/packages/qt-x11-free/debian/patches/01_stat_extern_inline_hack.diff
===================================================================
--- trunk/packages/qt-x11-free/debian/patches/01_stat_extern_inline_hack.diff	                        (rev 0)
+++ trunk/packages/qt-x11-free/debian/patches/01_stat_extern_inline_hack.diff	2008-02-16 15:25:36 UTC (rev 9415)
@@ -0,0 +1,89 @@
+--- a/src/tools/qfile_unix.cpp
++++ b/src/tools/qfile_unix.cpp
+@@ -40,6 +40,8 @@
+ 
+ #include "qplatformdefs.h"
+ 
++#include "__stat_extern_inline_hack.h"
++
+ // POSIX Large File Support redefines open -> open64
+ static inline int qt_open(const char *pathname, int flags, mode_t mode)
+ { return ::open(pathname, flags, mode); }
+--- /dev/null
++++ b/src/tools/__stat_extern_inline_hack.h
+@@ -0,0 +1,75 @@
++/*
++ * This piece of code was taken from libc6-dev 2.3.6.ds1-13etch4
++ * /usr/include/sys/stat.h
++ *
++ * extern __inline__ is required for symbols to be exported 
++ * once they are referenced in the code.
++ */
++ 
++#if defined __GNUC__ && __GNUC__ >= 2
++/* Inlined versions of the real stat and mknod functions.  */
++
++extern __inline__ int
++__NTH (stat (__const char *__path, struct stat *__statbuf))
++{
++  return __xstat (_STAT_VER, __path, __statbuf);
++}
++
++# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
++extern __inline__ int
++__NTH (lstat (__const char *__path, struct stat *__statbuf))
++{
++  return __lxstat (_STAT_VER, __path, __statbuf);
++}
++# endif
++
++extern __inline__ int
++__NTH (fstat (int __fd, struct stat *__statbuf))
++{
++  return __fxstat (_STAT_VER, __fd, __statbuf);
++}
++
++# if defined __USE_MISC || defined __USE_BSD
++extern __inline__ int
++__NTH (mknod (__const char *__path, __mode_t __mode, __dev_t __dev))
++{
++  return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
++}
++# endif
++
++# if defined __USE_LARGEFILE64 \
++  && (! defined __USE_FILE_OFFSET64 \
++      || (defined __REDIRECT_NTH && defined __OPTIMIZE__))
++extern __inline__ int
++__NTH (stat64 (__const char *__path, struct stat64 *__statbuf))
++{
++  return __xstat64 (_STAT_VER, __path, __statbuf);
++}
++
++#  if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
++extern __inline__ int
++__NTH (lstat64 (__const char *__path, struct stat64 *__statbuf))
++{
++  return __lxstat64 (_STAT_VER, __path, __statbuf);
++}
++#  endif
++
++extern __inline__ int
++__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
++{
++  return __fxstat64 (_STAT_VER, __fd, __statbuf);
++}
++# endif
++
++#endif
++
++/*
++ * This dummy function is required for the symbols referenced below to be
++   actually exported. In case of -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
++   {f,l}stat() become {f,l}stat64() so {f,l}stat64() are exported then.
++ */
++static void __stat_extern_inline_hack() {
++    stat(0, 0);
++    fstat(0, 0);
++    lstat(0, 0);
++}

Modified: trunk/packages/qt-x11-free/debian/patches/series
===================================================================
--- trunk/packages/qt-x11-free/debian/patches/series	2008-02-15 12:22:32 UTC (rev 9414)
+++ trunk/packages/qt-x11-free/debian/patches/series	2008-02-16 15:25:36 UTC (rev 9415)
@@ -18,6 +18,7 @@
 0085-fix-buildkey.diff
 0086-revert-qt-khmer-fix.diff
 0087-use-xrandr-1.2.diff
+01_stat_extern_inline_hack.diff
 02_various_fixes.diff
 03_qt_fontlist_fix.diff
 04_qsql_odbc.diff




More information about the pkg-kde-commits mailing list