[Python-bugs-list] [ python-Bugs-472202 ] dlerror()-messages bogus on netbsd
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 18 Oct 2001 05:00:22 -0700
Bugs item #472202, was opened at 2001-10-17 12:25
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=472202&group_id=5470
Category: Build
Group: Platform-specific
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Audun Arnesen Nordal (audun)
Assigned to: Martin v. Löwis (loewis)
Summary: dlerror()-messages bogus on netbsd
Initial Comment:
In Python/dynload_shlib.c, a preprocessor check is done to determine if the 'NetBSD' identifier predates some value (199712) on NetBSD platforms. However, this identifier is defined in the <sys/param.h> file which is not included, and dlerror() messages are thus mistakingly hardcoded to "error in dynamic linking" on all NetBSD platforms.
Also, recent ELF-handling added targeted for OpenBSD applies to NetBSD as well.
This bug has been handled in the NetBSD package tree for some time (patch committed there by Matthias Drochner), but I couldn't find it reported in Python's buglist and the bug is present in Python's most recent cvs.
Patch enclosed.
Best regards,
Audun Nordal
----------------------------------------------------------------------
>Comment By: Audun Arnesen Nordal (audun)
Date: 2001-10-18 05:00
Message:
Logged In: YES
user_id=47184
Yes, the attached diff was fine. The one that I pasted into my second message was reversed and bogus. Sorry about the inclarity.
Thank you for applying the patch.
Audun
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2001-10-18 04:52
Message:
Logged In: YES
user_id=21627
Thanks for your report.
I have committed the attached file (dynload_shlib.c.diff) as
dynload_shlib.c 2.11. I could not spot anything funny in
that file, nor could I see any stray parentheses anywhere.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2001-10-17 13:37
Message:
Logged In: YES
user_id=21627
The patch looks fine to me.
----------------------------------------------------------------------
Comment By: Audun Arnesen Nordal (audun)
Date: 2001-10-17 13:02
Message:
Logged In: YES
user_id=47184
Right. I got the diff the wrong way around, plus there's a
stray paranthesis *blush*. Sorry about that.
Audun
----------------------------------------------------------------------
Comment By: Audun Arnesen Nordal (audun)
Date: 2001-10-17 12:31
Message:
Logged In: YES
user_id=47184
Grrr, my browser did something funny with the diff-file.
In verbatim below.
Audun
--- Python/dynload_shlib.c Wed Oct 17 21:05:08 2001
+++ Python/dynload_shlib.c.orig Wed Oct 17 20:58:42 2001
@@ -6,9 +6,7 @@
#include <sys/types.h>
#include <sys/stat.h>
-#if defined(__NetBSD__)
-#include <sys/param.h>
-#if (NetBSD < 199712)
+#if defined(__NetBSD__) && (NetBSD < 199712)
#include <nlist.h>
#include <link.h>
#define dlerror() "error in dynamic linking"
@@ -17,9 +15,8 @@
#include <dlfcn.h>
#endif
#endif
-#endif /* NetBSD */
-#if ((defined(__OpenBSD__) || defined(__NetBSD__)) && !defined(__ELF__)
+#if defined(__OpenBSD__) && !defined(__ELF__)
#define LEAD_UNDERSCORE "_"
#else
#define LEAD_UNDERSCORE ""
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=472202&group_id=5470