Thomas Heller added the comment:
This patch looks better. However, the 'os.uname()' function seems to
return the information that we need; so I updated the patch to use this
instead. Can you please proofread it (osx.patch) ?
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1203>
__________________________________
Index: Lib/ctypes/__init__.py
===================================================================
--- Lib/ctypes/__init__.py (revision 58034)
+++ Lib/ctypes/__init__.py (working copy)
@@ -24,0 +24,0 @@
DEFAULT_MODE = RTLD_LOCAL
if _os.name == "posix" and _sys.platform == "darwin":
- import gestalt
-
- # gestalt.gestalt("sysv") returns the version number of the
- # currently active system file as BCD.
- # On OS X 10.4.6 -> 0x1046
- # On OS X 10.2.8 -> 0x1028
- # See also http://www.rgaros.nl/gestalt/
- #
# On OS X 10.3, we use RTLD_GLOBAL as default mode
# because RTLD_LOCAL does not work at least on some
- # libraries.
+ # libraries. OS X 10.3 is Darwin 7, so we check for
+ # that.
- if gestalt.gestalt("sysv") < 0x1040:
+ if int(_os.uname()[2].split('.')[0]) < 8:
DEFAULT_MODE = RTLD_GLOBAL
from _ctypes import FUNCFLAG_CDECL as _FUNCFLAG_CDECL, \
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com