summaryrefslogtreecommitdiff
path: root/Python/dynload_shlib.c
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-02-26 11:41:34 +0000
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-02-26 11:41:34 +0000
commit9f850cb9be12258a414dcc9d85b4ce5b75eb2dd9 (patch)
treeef75cf9d7f79460f565ffe3d6fd1d8504d9b4d01 /Python/dynload_shlib.c
parent733ffd482af626798383dc5b55dbd2e785b6fddd (diff)
downloadcpython-9f850cb9be12258a414dcc9d85b4ce5b75eb2dd9.tar.gz
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 e8a04ce500..61674ba555 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);