[Pythonmac-SIG] ctypes and gestalt

2007-09-25 Thread Bill Janssen
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

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] ctypes and gestalt

2007-09-25 Thread skip

Bill The only use for the gestalt dependency is to check the version of
Bill OS X.

Bill I'd like to replace that with
...

Looks find to me.  I say check it in and let people (or buildbots) complain
if something breaks.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] ctypes and gestalt

2007-09-25 Thread Bill Janssen
 Looks find to me.  I say check it in and let people (or buildbots) complain
 if something breaks.

Actually, it's broken.  Should be

  if int(platform.release().split('.')[0])  8:
  DEFAULT_MODE = RTLD_GLOBAL

We're looking at the version of Darwin, not OS X.

Bill
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig