Patches item #1610795, was opened at 2006-12-07 14:29 Message generated for change (Comment added) made by theller You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1610795&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Library (Lib) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Martin Kammerhofer (mkam) Assigned to: Thomas Heller (theller) Summary: BSD version of ctypes.util.find_library Initial Comment: The ctypes.util.find_library function for Posix systems is actually tailored for Linux systems. While the _findlib_gcc function relies only on the GNU compiler and may therefore work on any system with the "gcc" command in PATH, the _findLib_ld function relies on the /sbin/ldconfig command (originating from SunOS 4.0) which is not standardized. The version from GNU libc differs in option syntax and output format from other ldconfig programs around. I therefore provide a patch that enables find_library to properly communicate with the ldconfig program on FreeBSD systems. It has been tested on FreeBSD 4.11 and 6.2. It probably works on other *BSD systems too. (It works without this patch on FreeBSD, because after getting an error from ldconfig it falls back to _findlib_gcc.) While at it I also tidied up the Linux specific code: I'm escaping the function argument before interpolating it into a regular expression (to protect against nasty regexps) and removed the code for creation of a temporary file that was not used in any way. ---------------------------------------------------------------------- >Comment By: Thomas Heller (theller) Date: 2006-12-07 22:11 Message: Logged In: YES user_id=11105 Originator: NO Will do (although I would appreciate review from others too; I'm not exactly a BSD expert). ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2006-12-07 20:15 Message: Logged In: YES user_id=21627 Originator: NO Thomas, can you take a look? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1610795&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches