summaryrefslogtreecommitdiffstats
path: root/Python/dynload_shlib.c
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-02-26 11:41:34 (GMT)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-02-26 11:41:34 (GMT)
commitd940054ad4bcd39e31f6e22d0fd6f674ec4a99b3 (patch)
tree4cb201880bdd113ccee29bc944b55cbbd1d45f10 /Python/dynload_shlib.c
parentc487439aa79acaf6c83a65985c110d5ca1ea71da (diff)
downloadcpython-d940054ad4bcd39e31f6e22d0fd6f674ec4a99b3.zip
cpython-d940054ad4bcd39e31f6e22d0fd6f674ec4a99b3.tar.gz
cpython-d940054ad4bcd39e31f6e22d0fd6f674ec4a99b3.tar.bz2
OS/2 EMX port changes (Python part of patch #450267):
Python/ dynload_shlib.c // EMX port emulates dlopen() etc. for DL extensions import.c // changes to support 8.3 DLL name limit (VACPP+EMX) // and case sensitive import semantics importdl.h thread_os2.h
Diffstat (limited to 'Python/dynload_shlib.c')
-rw-r--r--Python/dynload_shlib.c11
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);