diff Python/dynload_shlib.c @ 22054:5cbcfde3ad55 legacy-trunk

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
author Andrew MacIntyre <andymac@bullseye.apana.org.au>
date Tue, 26 Feb 2002 11:41:34 +0000
parents 379fc66f4c96
children ac487a7f7f2c
line wrap: on
line diff
--- a/Python/dynload_shlib.c	Tue Feb 26 11:36:35 2002 +0000
+++ b/Python/dynload_shlib.c	Tue Feb 26 11:41:34 2002 +0000
@@ -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 @@
 	{".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 @@
 		}
 	}
 
+#if !(defined(PYOS_OS2) && defined(PYCC_GCC))
         dlopenflags = PyThreadState_Get()->interp->dlopenflags;
+#endif
 
 	if (Py_VerboseFlag)
 		printf("dlopen(\"%s\", %x);\n", pathname, dlopenflags);