mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.
This commit is contained in:
parent
460f0691df
commit
58e0a8c130
5 changed files with 32 additions and 14 deletions
|
@ -63,12 +63,6 @@ corresponding Unix manual entries for more information on calls.";
|
|||
#ifdef __BORLANDC__ /* Borland compiler */
|
||||
#define HAVE_EXECV 1
|
||||
#define HAVE_GETCWD 1
|
||||
#define HAVE_GETEGID 1
|
||||
#define HAVE_GETEUID 1
|
||||
#define HAVE_GETGID 1
|
||||
#define HAVE_GETPPID 1
|
||||
#define HAVE_GETUID 1
|
||||
#define HAVE_KILL 1
|
||||
#define HAVE_OPENDIR 1
|
||||
#define HAVE_PIPE 1
|
||||
#define HAVE_POPEN 1
|
||||
|
@ -152,7 +146,11 @@ extern int rmdir(char *);
|
|||
extern int chdir(const char *);
|
||||
extern int rmdir(const char *);
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
extern int chmod(const char *, int);
|
||||
#else
|
||||
extern int chmod(const char *, mode_t);
|
||||
#endif
|
||||
extern int chown(const char *, uid_t, gid_t);
|
||||
extern char *getcwd(char *, int);
|
||||
extern char *strerror(int);
|
||||
|
@ -5666,18 +5664,18 @@ all_ins(PyObject *d)
|
|||
}
|
||||
|
||||
|
||||
#if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(__QNX__)
|
||||
#if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__)) && !defined(__QNX__)
|
||||
#define INITFUNC initnt
|
||||
#define MODNAME "nt"
|
||||
#else
|
||||
#if defined(PYOS_OS2)
|
||||
|
||||
#elif defined(PYOS_OS2)
|
||||
#define INITFUNC initos2
|
||||
#define MODNAME "os2"
|
||||
|
||||
#else
|
||||
#define INITFUNC initposix
|
||||
#define MODNAME "posix"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DL_EXPORT(void)
|
||||
INITFUNC(void)
|
||||
|
|
|
@ -41,17 +41,19 @@ extern int ftime(struct timeb *);
|
|||
#else
|
||||
#ifdef MS_WINDOWS
|
||||
#include <windows.h>
|
||||
#ifdef MS_WIN16
|
||||
#if defined(MS_WIN16) || defined(__BORLANDC__)
|
||||
/* These overrides not needed for Win32 */
|
||||
#define timezone _timezone
|
||||
#define tzname _tzname
|
||||
#define daylight _daylight
|
||||
#endif /* MS_WIN16 || __BORLANDC__ */
|
||||
#ifdef MS_WIN16
|
||||
#define altzone _altzone
|
||||
#endif /* MS_WIN16 */
|
||||
#endif /* MS_WINDOWS */
|
||||
#endif /* !__WATCOMC__ || __QNX__ */
|
||||
|
||||
#if defined(MS_WIN32) && !defined(MS_WIN64)
|
||||
#if defined(MS_WIN32) && !defined(MS_WIN64) && !defined(__BORLANDC__)
|
||||
/* Win32 has better clock replacement
|
||||
XXX Win64 does not yet, but might when the platform matures. */
|
||||
#include <largeint.h>
|
||||
|
@ -146,7 +148,7 @@ time_clock(PyObject *self, PyObject *args)
|
|||
}
|
||||
#endif /* HAVE_CLOCK */
|
||||
|
||||
#if defined(MS_WIN32) && !defined(MS_WIN64)
|
||||
#if defined(MS_WIN32) && !defined(MS_WIN64) && !defined(__BORLANDC__)
|
||||
/* Due to Mark Hammond */
|
||||
static PyObject *
|
||||
time_clock(PyObject *self, PyObject *args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue