[debian-hurd-Patches][301183] #394195: FTBFS and Debian issues - qt-x11-free-3.3.3
Patches item #301183, was opened at 13/02/2005 16:42
>Status: Closed
Priority: 3
Submitted By: Barry deFreese (bddebian-guest)
Assigned to: Nobody (None)
Summary: #394195: FTBFS and Debian issues - qt-x11-free-3.3.3
Category: several
Group: needs-work
>Resolution: Fixed
Initial Comment:
Author: Barry deFreese <bddebian@comcast.net>
Source: qt-x11-free
Status: posix issues fixed. Debian stuff needs work.
Categories: posix
Strip-Level: -p0
I am pasting in the posix fixes. I have posted my build log and my hacked up debian/rules, and debian/control files here:
http://www.bddebian.com/projects/qt/
diff -urp qt-x11-free-3.3.3.old/src/tools/qdir.cpp qt-x11-free-3.3.3/src/tools/qdir.cpp
--- qt-x11-free-3.3.3.old/src/tools/qdir.cpp 2005-02-13 05:11:10.000000000 -0500
+++ qt-x11-free-3.3.3/src/tools/qdir.cpp 2005-02-08 15:14:04.000000000 -0500
@@ -38,6 +38,10 @@
#include "qplatformdefs.h"
#include "qdir.h"
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
#ifndef QT_NO_DIR
#include <private/qdir_p.h>
#include "qfileinfo.h"
diff -urp qt-x11-free-3.3.3.old/src/tools/qdir_unix.cpp qt-x11-free-3.3.3/src/tools/qdir_unix.cpp
--- qt-x11-free-3.3.3.old/src/tools/qdir_unix.cpp 2005-02-13 05:11:22.000000000 -0500
+++ qt-x11-free-3.3.3/src/tools/qdir_unix.cpp 2005-02-08 15:14:04.000000000 -0500
@@ -38,6 +38,10 @@
#include "qplatformdefs.h"
#include "qdir.h"
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
#ifndef QT_NO_DIR
#include "qdir_p.h"
diff -urp qt-x11-free-3.3.3.old/src/tools/qfileinfo_unix.cpp qt-x11-free-3.3.3/src/tools/qfileinfo_unix.cpp
--- qt-x11-free-3.3.3.old/src/tools/qfileinfo_unix.cpp 2005-02-13 05:11:34.000000000 -0500
+++ qt-x11-free-3.3.3/src/tools/qfileinfo_unix.cpp 2005-02-08 15:14:04.000000000 -0500
@@ -41,6 +41,10 @@
#include "qdatetime.h"
#include "qdir.h"
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
#include <limits.h>
----------------------------------------------------------------------
Comment By: Cyril Brulebois (kibi-guest)
Date: 20/10/2006 13:23
Message:
connecté
user_id=14303
Posted to the BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=394195
----------------------------------------------------------------------
Comment By: Samuel Thibault (sthibaul-guest)
Date: 07/10/2006 16:52
Message:
connecté
user_id=12824
Here is a corrected patch.
----------------------------------------------------------------------
Comment By: Samuel Thibault (sthibaul-guest)
Date: 06/10/2006 23:55
Message:
connecté
user_id=12824
<youpi> there's a memory leak in readLink()
<youpi> in case realloc returns NULL, you need to free(s)
<youpi> because else it's lost
<youpi> (iirc the semantic of realloc returning NULL)
<youpi> yeah, realloc() can be NULL, and the passed block remains allocated, so it must be freed
*** youpi doesn't see the need to #define PATH_CHUNK_SIZE 256
<youpi> since it's used only once
<youpi> else the patch looks fine
----------------------------------------------------------------------
Comment By: Cyril Brulebois (kibi-guest)
Date: 04/10/2006 13:47
Message:
connecté
user_id=14303
Here are two patches (qt3-debian.kibi.diff and 60_gnu_hurd_support.dpatch) which allow the build of qt3.
Please note the link workaround, due to the strange order of -lX options for -lpthread (which should be the first...)
----------------------------------------------------------------------
Comment By: Alfredo Beaumont (abeaumont-guest)
Date: 08/08/2006 14:47
Message:
Logged In: YES
user_id=13735
a) Agreed power of 2
b) I used Q_OS_HURD instead of !PATH_MAX to make it seem less intrusive and easier to identify.
c) r is always initialized (with default constructor). I did not initialize it explicitely because it's not done so in the original sources
d) Agreed the namespace issue
----------------------------------------------------------------------
Comment By: Michael Banck (mbanck)
Date: 06/08/2006 16:09
Message:
Logged In: YES
user_id=2380
And some more:
<youpi> Mmm, they're writing ::getcwd()
<youpi> shouldn't we write ::get_current_dir_name() too ?
<youpi> else the patch seems fine
----------------------------------------------------------------------
Comment By: Michael Banck (mbanck)
Date: 06/08/2006 16:07
Message:
Logged In: YES
user_id=2380
Some comments to abeaumont's patch:
<youpi> I'd say PATH_CHUNK_SIZE should be a power of 2 :)
<youpi> why should it be #if defined(Q_OS_HURD) ? shouldn't it be #if !defined(PATH_MAX) ?
<youpi> else the algorithm looks sane
<youpi> (for ReadLink)
<youpi> canonicalPath is strange: r should be initialized
<youpi> because in case tmp is null, r is not defined to null
----------------------------------------------------------------------
You can respond by visiting:
http://alioth.debian.org/tracker/?func=detail&atid=410472&aid=301183&group_id=30628
Reply to: