]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #836434: Use dlopen/dlsym on AIX if available. Also disable
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 18 Nov 2003 19:59:39 +0000 (19:59 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 18 Nov 2003 19:59:39 +0000 (19:59 +0000)
_XOPEN_SOURCE on AIX 4.

configure
configure.in

index 20a0df8666d19f8397ecfefed8f3111cf10c7422..94ff7722fd0ffcecd4881c45420781e677f02d19 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.427.4.8 .
+# From configure.in Revision: 1.427.4.9 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.57 for python 2.3.
 #
@@ -1458,6 +1458,11 @@ case $ac_sys_system/$ac_sys_release in
   # This should hopefully be fixed in FreeBSD 4.9
   FreeBSD/4.8* | Darwin/6* )
     define_xopen_source=no;;
+  # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
+  # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
+  # has another value. By not (re)defining it, the defaults come in place.
+  AIX/4)
+    define_xopen_source=no;;
 esac
 
 if test $define_xopen_source = yes
@@ -12972,7 +12977,12 @@ echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
 if test -z "$DYNLOADFILE"
 then
        case $ac_sys_system/$ac_sys_release in
-       AIX*) DYNLOADFILE="dynload_aix.o";;
+       AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
+       if test "$ac_cv_func_dlopen" = yes
+       then DYNLOADFILE="dynload_shlib.o"
+       else DYNLOADFILE="dynload_aix.o"
+       fi
+       ;;
        BeOS*) DYNLOADFILE="dynload_beos.o";;
        hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
        Darwin/*) DYNLOADFILE="dynload_next.o";;
index d2c56e7dbdf33d69d06c9d76fae0426450071073..a1382d6d2fc253a257c800240f072bd3df187d7d 100644 (file)
@@ -156,6 +156,11 @@ case $ac_sys_system/$ac_sys_release in
   # This should hopefully be fixed in FreeBSD 4.9
   FreeBSD/4.8* | Darwin/6* )
     define_xopen_source=no;;
+  # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
+  # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
+  # has another value. By not (re)defining it, the defaults come in place.
+  AIX/4)
+    define_xopen_source=no;;
 esac
 
 if test $define_xopen_source = yes
@@ -2024,7 +2029,12 @@ AC_MSG_CHECKING(DYNLOADFILE)
 if test -z "$DYNLOADFILE"
 then
        case $ac_sys_system/$ac_sys_release in
-       AIX*) DYNLOADFILE="dynload_aix.o";;
+       AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
+       if test "$ac_cv_func_dlopen" = yes
+       then DYNLOADFILE="dynload_shlib.o"
+       else DYNLOADFILE="dynload_aix.o"
+       fi
+       ;;
        BeOS*) DYNLOADFILE="dynload_beos.o";;
        hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
        Darwin/*) DYNLOADFILE="dynload_next.o";;