Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
58e0a8c1
Commit
58e0a8c1
authored
May 14, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.
parent
460f0691
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
14 deletions
+32
-14
Include/pyport.h
Include/pyport.h
+9
-0
Misc/NEWS
Misc/NEWS
+4
-0
Modules/posixmodule.c
Modules/posixmodule.c
+8
-10
Modules/timemodule.c
Modules/timemodule.c
+5
-3
PC/config.h
PC/config.h
+6
-1
No files found.
Include/pyport.h
View file @
58e0a8c1
...
@@ -434,6 +434,15 @@ typedef struct fd_set {
...
@@ -434,6 +434,15 @@ typedef struct fd_set {
#endif
#endif
#endif
#endif
/*
* Rename some functions for the Borland compiler
*/
#ifdef __BORLANDC__
# include <io.h>
# define _chsize chsize
# define _setmode setmode
#endif
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
Misc/NEWS
View file @
58e0a8c1
...
@@ -105,6 +105,10 @@ Tests
...
@@ -105,6 +105,10 @@ Tests
pprint.isreadable() return sensible results. Also verifies that simple
pprint.isreadable() return sensible results. Also verifies that simple
cases produce correct output.
cases produce correct output.
New platforms
- Python should compile and run out of the box using the Borland C
compiler (under Windows), thanks to Stephen Hansen.
What's New in Python 2.1 (final)?
What's New in Python 2.1 (final)?
=================================
=================================
...
...
Modules/posixmodule.c
View file @
58e0a8c1
...
@@ -63,12 +63,6 @@ corresponding Unix manual entries for more information on calls.";
...
@@ -63,12 +63,6 @@ corresponding Unix manual entries for more information on calls.";
#ifdef __BORLANDC__
/* Borland compiler */
#ifdef __BORLANDC__
/* Borland compiler */
#define HAVE_EXECV 1
#define HAVE_EXECV 1
#define HAVE_GETCWD 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_OPENDIR 1
#define HAVE_PIPE 1
#define HAVE_PIPE 1
#define HAVE_POPEN 1
#define HAVE_POPEN 1
...
@@ -152,7 +146,11 @@ extern int rmdir(char *);
...
@@ -152,7 +146,11 @@ extern int rmdir(char *);
extern
int
chdir
(
const
char
*
);
extern
int
chdir
(
const
char
*
);
extern
int
rmdir
(
const
char
*
);
extern
int
rmdir
(
const
char
*
);
#endif
#endif
#ifdef __BORLANDC__
extern
int
chmod
(
const
char
*
,
int
);
#else
extern
int
chmod
(
const
char
*
,
mode_t
);
extern
int
chmod
(
const
char
*
,
mode_t
);
#endif
extern
int
chown
(
const
char
*
,
uid_t
,
gid_t
);
extern
int
chown
(
const
char
*
,
uid_t
,
gid_t
);
extern
char
*
getcwd
(
char
*
,
int
);
extern
char
*
getcwd
(
char
*
,
int
);
extern
char
*
strerror
(
int
);
extern
char
*
strerror
(
int
);
...
@@ -5666,18 +5664,18 @@ all_ins(PyObject *d)
...
@@ -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 INITFUNC initnt
#define MODNAME "nt"
#define MODNAME "nt"
#else
#if defined(PYOS_OS2)
#
el
if defined(PYOS_OS2)
#define INITFUNC initos2
#define INITFUNC initos2
#define MODNAME "os2"
#define MODNAME "os2"
#else
#else
#define INITFUNC initposix
#define INITFUNC initposix
#define MODNAME "posix"
#define MODNAME "posix"
#endif
#endif
#endif
DL_EXPORT
(
void
)
DL_EXPORT
(
void
)
INITFUNC
(
void
)
INITFUNC
(
void
)
...
...
Modules/timemodule.c
View file @
58e0a8c1
...
@@ -41,17 +41,19 @@ extern int ftime(struct timeb *);
...
@@ -41,17 +41,19 @@ extern int ftime(struct timeb *);
#else
#else
#ifdef MS_WINDOWS
#ifdef MS_WINDOWS
#include <windows.h>
#include <windows.h>
#if
def MS_WIN16
#if
defined(MS_WIN16) || defined(__BORLANDC__)
/* These overrides not needed for Win32 */
/* These overrides not needed for Win32 */
#define timezone _timezone
#define timezone _timezone
#define tzname _tzname
#define tzname _tzname
#define daylight _daylight
#define daylight _daylight
#endif
/* MS_WIN16 || __BORLANDC__ */
#ifdef MS_WIN16
#define altzone _altzone
#define altzone _altzone
#endif
/* MS_WIN16 */
#endif
/* MS_WIN16 */
#endif
/* MS_WINDOWS */
#endif
/* MS_WINDOWS */
#endif
/* !__WATCOMC__ || __QNX__ */
#endif
/* !__WATCOMC__ || __QNX__ */
#if defined(MS_WIN32) && !defined(MS_WIN64)
#if defined(MS_WIN32) && !defined(MS_WIN64)
&& !defined(__BORLANDC__)
/* Win32 has better clock replacement
/* Win32 has better clock replacement
XXX Win64 does not yet, but might when the platform matures. */
XXX Win64 does not yet, but might when the platform matures. */
#include <largeint.h>
#include <largeint.h>
...
@@ -146,7 +148,7 @@ time_clock(PyObject *self, PyObject *args)
...
@@ -146,7 +148,7 @@ time_clock(PyObject *self, PyObject *args)
}
}
#endif
/* HAVE_CLOCK */
#endif
/* HAVE_CLOCK */
#if defined(MS_WIN32) && !defined(MS_WIN64)
#if defined(MS_WIN32) && !defined(MS_WIN64)
&& !defined(__BORLANDC__)
/* Due to Mark Hammond */
/* Due to Mark Hammond */
static
PyObject
*
static
PyObject
*
time_clock
(
PyObject
*
self
,
PyObject
*
args
)
time_clock
(
PyObject
*
self
,
PyObject
*
args
)
...
...
PC/config.h
View file @
58e0a8c1
...
@@ -36,6 +36,7 @@ compiler specific". Therefore, these should be very rare.
...
@@ -36,6 +36,7 @@ compiler specific". Therefore, these should be very rare.
#include <io.h>
#include <io.h>
#define HAVE_LIMITS_H
#define HAVE_LIMITS_H
#define HAVE_SYS_UTIME_H
#define HAVE_HYPOT
#define HAVE_HYPOT
#define DONT_HAVE_SIG_ALARM
#define DONT_HAVE_SIG_ALARM
#define DONT_HAVE_SIG_PAUSE
#define DONT_HAVE_SIG_PAUSE
...
@@ -177,6 +178,10 @@ typedef int pid_t;
...
@@ -177,6 +178,10 @@ typedef int pid_t;
#define LONG_LONG __int64
#define LONG_LONG __int64
#undef HAVE_HYPOT
#undef HAVE_HYPOT
#undef HAVE_SYS_UTIME_H
#define HAVE_UTIME_H
#define HAVE_DIRENT_H
#define HAVE_CLOCK
#else
/* !_WIN32 */
#else
/* !_WIN32 */
#error "Only Win32 and later are supported"
#error "Only Win32 and later are supported"
...
@@ -593,7 +598,7 @@ typedef unsigned long uintptr_t;
...
@@ -593,7 +598,7 @@ typedef unsigned long uintptr_t;
/* #define HAVE_SYS_UN_H 1 */
/* #define HAVE_SYS_UN_H 1 */
/* Define if you have the <sys/utime.h> header file. */
/* Define if you have the <sys/utime.h> header file. */
#define HAVE_SYS_UTIME_H 1
/* #define HAVE_SYS_UTIME_H 1 */
/* Define if you have the <sys/utsname.h> header file. */
/* Define if you have the <sys/utsname.h> header file. */
/* #define HAVE_SYS_UTSNAME_H 1 */
/* #define HAVE_SYS_UTSNAME_H 1 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment