>> (2) Move to using dlopen() to load the libraries instead of  
>> NSLinkImage. This might need some minor changes to  
>> dynload_shlib.c, and it would need the configure script to be  
>> smart enough to choose dynload_next.c on 10.2 and below.
>
> If you come up with a patch for (2) against Python's svn trunk that  
> is tested and works on 10.2 then I'll commit it.  It's not  
> appropriate to make this sort of change against Python 2.4,  
> though.  *Maybe* for the universal branch that Ronald and I are  
> doing, because that's also unlikely to be merged with the 2.4 branch.

Here's the patch, in all its glory.

--- configure.in        (revision 42867)
+++ configure.in        (working copy)
@@ -2105,7 +2105,8 @@
-       Darwin/*) DYNLOADFILE="dynload_next.o";;
+  # use dynload_next.o only on darwin versions without dlopen().
+       Darwin/@<:@0123456@:>@.*) DYNLOADFILE="dynload_next.o";;

(Also, autoconf must be re-run to generate a new configure file from  
the patched configure.in.)

I just built python with this patch and it passes all of the tests on  
10.4. Is there anything else I should test, or will the dynload  
functionality be tested plenty by the standard tests? (I assume  
that's the case.)

I don't have access to a 10.2 machine currently, so if someone is  
able to test this patch on 10.1, 10.2, and/or 10.3, I would be most  
grateful. I can try to find some 10.2 install disks (and hope that my  
computer can run 10.2) if nobody has easy access to such a machine.

One last thing -- given that OS X now has dlfcn.h and dlopen(), will  
the library dl module now work? Right now, setup.py won't build  
dlmodule.c on darwin, even if it can find dlfcn.h. Does anyone know  
the reason for this is still valid for 10.3 or 10.4?

Zach


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

Reply via email to