Skip to content

Commit a5890d2

Browse files
committed
Issue #22592: Drop support of the Borland C compiler to build Python
The distutils module still supports it to build extensions.
1 parent 2cc67d8 commit a5890d2

File tree

4 files changed

+9
-51
lines changed

4 files changed

+9
-51
lines changed

Misc/NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,12 @@ Tests
11131113
Build
11141114
-----
11151115

1116+
- Issue #22592: Drop support of the Borland C compiler to build Python. The
1117+
distutils module still supports it to build extensions.
1118+
1119+
- Issue #22591: Drop support of MS-DOS, especially of the DJGPP compiler
1120+
(MS-DOS port of GCC).
1121+
11161122
- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
11171123
Jonathan Hosmer.
11181124

Modules/posixmodule.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
functions are either unimplemented or implemented differently. The source
77
assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent
88
of the compiler used. Different compilers define their own feature
9-
test macro, e.g. '__BORLANDC__' or '_MSC_VER'. */
9+
test macro, e.g. '_MSC_VER'. */
1010

1111

1212

@@ -143,13 +143,6 @@ corresponding Unix manual entries for more information on calls.");
143143
#define HAVE_SYSTEM 1
144144
#include <process.h>
145145
#else
146-
#ifdef __BORLANDC__ /* Borland compiler */
147-
#define HAVE_EXECV 1
148-
#define HAVE_OPENDIR 1
149-
#define HAVE_PIPE 1
150-
#define HAVE_SYSTEM 1
151-
#define HAVE_WAIT 1
152-
#else
153146
#ifdef _MSC_VER /* Microsoft compiler */
154147
#define HAVE_GETPPID 1
155148
#define HAVE_GETLOGIN 1
@@ -179,7 +172,6 @@ corresponding Unix manual entries for more information on calls.");
179172
#define HAVE_WAIT 1
180173
#define HAVE_TTYNAME 1
181174
#endif /* _MSC_VER */
182-
#endif /* __BORLANDC__ */
183175
#endif /* ! __WATCOMC__ || __QNX__ */
184176

185177

@@ -214,11 +206,7 @@ extern int rmdir(char *);
214206
extern int chdir(const char *);
215207
extern int rmdir(const char *);
216208
#endif
217-
#ifdef __BORLANDC__
218-
extern int chmod(const char *, int);
219-
#else
220209
extern int chmod(const char *, mode_t);
221-
#endif
222210
/*#ifdef HAVE_FCHMOD
223211
extern int fchmod(int, mode_t);
224212
#endif*/

Modules/timemodule.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@
2727
#define WIN32_LEAN_AND_MEAN
2828
#include <windows.h>
2929
#include "pythread.h"
30-
31-
#if defined(__BORLANDC__)
32-
/* These overrides not needed for Win32 */
33-
#define timezone _timezone
34-
#define tzname _tzname
35-
#define daylight _daylight
36-
#endif /* __BORLANDC__ */
3730
#endif /* MS_WINDOWS */
3831
#endif /* !__WATCOMC__ || __QNX__ */
3932

@@ -88,7 +81,7 @@ floatclock(_Py_clock_info_t *info)
8881
}
8982
#endif /* HAVE_CLOCK */
9083

91-
#if defined(MS_WINDOWS) && !defined(__BORLANDC__)
84+
#ifdef MS_WINDOWS
9285
#define WIN32_PERF_COUNTER
9386
/* Win32 has better clock replacement; we have our own version, due to Mark
9487
Hammond and Tim Peters */
@@ -120,7 +113,7 @@ win_perf_counter(_Py_clock_info_t *info)
120113
}
121114
return PyFloat_FromDouble(diff / (double)cpu_frequency);
122115
}
123-
#endif
116+
#endif /* MS_WINDOWS */
124117

125118
#if defined(WIN32_PERF_COUNTER) || defined(HAVE_CLOCK)
126119
#define PYCLOCK

PC/pyconfig.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -226,35 +226,6 @@ typedef int pid_t;
226226

227227
#endif /* _MSC_VER */
228228

229-
/* ------------------------------------------------------------------------*/
230-
/* The Borland compiler defines __BORLANDC__ */
231-
/* XXX These defines are likely incomplete, but should be easy to fix. */
232-
#ifdef __BORLANDC__
233-
#define COMPILER "[Borland]"
234-
235-
#ifdef _WIN32
236-
/* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
237-
*/
238-
239-
typedef int pid_t;
240-
/* BCC55 seems to understand __declspec(dllimport), it is used in its
241-
own header files (winnt.h, ...) - so we can do nothing and get the default*/
242-
243-
#undef HAVE_SYS_UTIME_H
244-
#define HAVE_UTIME_H
245-
#define HAVE_DIRENT_H
246-
247-
/* rename a few functions for the Borland compiler */
248-
#include <io.h>
249-
#define _chsize chsize
250-
#define _setmode setmode
251-
252-
#else /* !_WIN32 */
253-
#error "Only Win32 and later are supported"
254-
#endif /* !_WIN32 */
255-
256-
#endif /* BORLANDC */
257-
258229
/* ------------------------------------------------------------------------*/
259230
/* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
260231
#if defined(__GNUC__) && defined(_WIN32)

0 commit comments

Comments
 (0)