summaryrefslogtreecommitdiffstats
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-11-16 15:54:16 (GMT)
committerGuido van Rossum <guido@python.org>1999-11-16 15:54:16 (GMT)
commit001b9bebcabc71d33f279775eba975423a598084 (patch)
tree03f6862264c176f7cca1be7b208c248e7291aae3 /Python/importdl.c
parentba98a42a0f08ada3dc311536815136d7fd960d15 (diff)
downloadcpython-001b9bebcabc71d33f279775eba975423a598084.zip
cpython-001b9bebcabc71d33f279775eba975423a598084.tar.gz
cpython-001b9bebcabc71d33f279775eba975423a598084.tar.bz2
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.
Diffstat (limited to 'Python/importdl.c')
-rw-r--r--Python/importdl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Python/importdl.c b/Python/importdl.c
index a40d084..3085d66 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -181,6 +181,12 @@ typedef void (*dl_funcptr)();
#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 @@ _PyImport_LoadDynamicModule(name, pathname, fp)
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;