diff Python/importdl.c @ 11469:c05363cf1b73 legacy-trunk

Patch by Vladimir Marangozov, inspired by a bug report from Gary Duzan, for AIX, to support C++ objects with static initializers, when using the genuine IBM C++ compiler (namely xlC/xlC_r). See accompanying patches to configure.in and acconfig.h.
author Guido van Rossum <guido@python.org>
date Tue, 16 Nov 1999 15:54:16 +0000
parents 5f5fc1031957
children 14561e8395bb
line wrap: on
line diff
--- a/Python/importdl.c	Mon Nov 15 19:29:33 1999 +0000
+++ b/Python/importdl.c	Tue Nov 16 15:54:16 1999 +0000
@@ -181,6 +181,12 @@
 #include <sys/ldr.h>
 typedef void (*dl_funcptr)();
 #define _DL_FUNCPTR_DEFINED
+#ifdef AIX_GENUINE_CPLUSPLUS
+#include "/usr/lpp/xlC/include/load.h"
+#define aix_load loadAndInit
+#else
+#define aix_load load
+#endif
 static int  aix_getoldmodules(void **);
 static int  aix_bindnewmodule(void *, void *);
 static void aix_loaderror(char *);
@@ -473,7 +479,7 @@
 		if (!staticmodlistptr)
 			if (aix_getoldmodules(&staticmodlistptr) == -1)
 				return NULL;
-		p = (dl_funcptr) load(pathname, L_NOAUTODEFER, 0);
+		p = (dl_funcptr) aix_load(pathname, L_NOAUTODEFER, 0);
 		if (p == NULL) {
 			aix_loaderror(pathname);
 			return NULL;