[Pythonmac-SIG] ctypes and gestalt

Bill Janssen janssen at parc.com
Tue Sep 25 18:51:04 CEST 2007


I noticed that ctypes doesn't load on my Mac, due to the fact that I
build 2.5.1 with --disable-toolbox-glue, and ctypes critically depends
on gestalt, which doesn't get built.  The only use for the gestalt
dependency is to check the version of OS X.

I'd like to replace that with

  DEFAULT_MODE = RTLD_LOCAL
  if _os.name == "posix" and _sys.platform == "darwin":
      import platform

      # On OS X 10.3, we use RTLD_GLOBAL as default mode
      # because RTLD_LOCAL does not work at least on some
      # libraries.

      if [10, 4] > [int(x) for x in platform.release().split('.')[:2]]:
          DEFAULT_MODE = RTLD_GLOBAL

Bill



More information about the Pythonmac-SIG mailing list