SF patch 473749 compile under OS/2 VA C++, from Michael Muller.

Changes enabling Python to compile under OS/2 Visual Age C++.
This commit is contained in:
Tim Peters 2001-11-05 02:45:59 +00:00
parent c44403995e
commit 603c6831d0
7 changed files with 68 additions and 36 deletions

View file

@ -567,7 +567,11 @@ builtin_execfile(PyObject *self, PyObject *args)
#ifndef RISCOS
if (!stat(filename, &s)) {
if (S_ISDIR(s.st_mode))
#if defined(PYOS_OS2) && defined(PYCC_VACPP)
errno = EOS2ERR;
#else
errno = EISDIR;
#endif
else
exists = 1;
}

View file

@ -38,6 +38,7 @@ extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
typedef FARPROC dl_funcptr;
#else
#ifdef PYOS_OS2
#include <os2def.h>
typedef int (* APIENTRY dl_funcptr)();
#else
typedef void (*dl_funcptr)(void);