Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 001b9be

Browse files
committed
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.
1 parent ba98a42 commit 001b9be

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Python/importdl.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ typedef void (*dl_funcptr)();
181181
#include <sys/ldr.h>
182182
typedef void (*dl_funcptr)();
183183
#define _DL_FUNCPTR_DEFINED
184+
#ifdef AIX_GENUINE_CPLUSPLUS
185+
#include "/usr/lpp/xlC/include/load.h"
186+
#define aix_load loadAndInit
187+
#else
188+
#define aix_load load
189+
#endif
184190
static int aix_getoldmodules(void **);
185191
static int aix_bindnewmodule(void *, void *);
186192
static void aix_loaderror(char *);
@@ -473,7 +479,7 @@ _PyImport_LoadDynamicModule(name, pathname, fp)
473479
if (!staticmodlistptr)
474480
if (aix_getoldmodules(&staticmodlistptr) == -1)
475481
return NULL;
476-
p = (dl_funcptr) load(pathname, L_NOAUTODEFER, 0);
482+
p = (dl_funcptr) aix_load(pathname, L_NOAUTODEFER, 0);
477483
if (p == NULL) {
478484
aix_loaderror(pathname);
479485
return NULL;

0 commit comments

Comments
 (0)