diff options
Diffstat (limited to 'Python/dynload_shlib.c')
-rw-r--r-- | Python/dynload_shlib.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index e8a04ce..61674ba 100644 --- a/Python/dynload_shlib.c +++ b/Python/dynload_shlib.c @@ -18,6 +18,10 @@ #ifdef HAVE_DLFCN_H #include <dlfcn.h> +#else +#if defined(PYOS_OS2) && defined(PYCC_GCC) +#include "dlfcn.h" +#endif #endif #if (defined(__OpenBSD__) || defined(__NetBSD__)) && !defined(__ELF__) @@ -32,9 +36,14 @@ const struct filedescr _PyImport_DynLoadFiletab[] = { {".dll", "rb", C_EXTENSION}, {"module.dll", "rb", C_EXTENSION}, #else +#if defined(PYOS_OS2) && defined(PYCC_GCC) + {".pyd", "rb", C_EXTENSION}, + {".dll", "rb", C_EXTENSION}, +#else {".so", "rb", C_EXTENSION}, {"module.so", "rb", C_EXTENSION}, #endif +#endif {0, 0} }; @@ -82,7 +91,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, } } +#if !(defined(PYOS_OS2) && defined(PYCC_GCC)) dlopenflags = PyThreadState_Get()->interp->dlopenflags; +#endif if (Py_VerboseFlag) printf("dlopen(\"%s\", %x);\n", pathname, dlopenflags); |