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
This commit is contained in:
Andrew MacIntyre 2002-02-26 11:41:34 +00:00
parent c487439aa7
commit d940054ad4
4 changed files with 140 additions and 3 deletions

View file

@ -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__)
@ -31,9 +35,14 @@ const struct filedescr _PyImport_DynLoadFiletab[] = {
#ifdef __CYGWIN__
{".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);