]> granicus.if.org Git - python/commitdiff
Issue #22592: Drop support of the Borland C compiler to build Python
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 22 Oct 2014 10:33:23 +0000 (12:33 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 22 Oct 2014 10:33:23 +0000 (12:33 +0200)
The distutils module still supports it to build extensions.

Misc/NEWS
Modules/posixmodule.c
Modules/timemodule.c
PC/pyconfig.h

index 300818a134b5c5fce88b39d9818f56d8f96f235f..6c15f81d0f0bdc718614bbf0ca6228786cd7cee4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1113,6 +1113,12 @@ Tests
 Build
 -----
 
+- Issue #22592: Drop support of the Borland C compiler to build Python. The
+  distutils module still supports it to build extensions.
+
+- Issue #22591: Drop support of MS-DOS, especially of the DJGPP compiler
+  (MS-DOS port of GCC).
+
 - Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
   Jonathan Hosmer.
 
index 38ba74b1eaf31b472993292974f5e0a594189b44..0f0f1c3efe36b90fce4adbe3134438706d4cbee4 100644 (file)
@@ -6,7 +6,7 @@
    functions are either unimplemented or implemented differently.  The source
    assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent
    of the compiler used.  Different compilers define their own feature
-   test macro, e.g. '__BORLANDC__' or '_MSC_VER'. */
+   test macro, e.g. '_MSC_VER'. */
 
 
 
@@ -143,13 +143,6 @@ corresponding Unix manual entries for more information on calls.");
 #define HAVE_SYSTEM     1
 #include <process.h>
 #else
-#ifdef __BORLANDC__             /* Borland compiler */
-#define HAVE_EXECV      1
-#define HAVE_OPENDIR    1
-#define HAVE_PIPE       1
-#define HAVE_SYSTEM     1
-#define HAVE_WAIT       1
-#else
 #ifdef _MSC_VER         /* Microsoft compiler */
 #define HAVE_GETPPID    1
 #define HAVE_GETLOGIN   1
@@ -179,7 +172,6 @@ corresponding Unix manual entries for more information on calls.");
 #define HAVE_WAIT       1
 #define HAVE_TTYNAME    1
 #endif  /* _MSC_VER */
-#endif  /* __BORLANDC__ */
 #endif  /* ! __WATCOMC__ || __QNX__ */
 
 
@@ -214,11 +206,7 @@ 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
 /*#ifdef HAVE_FCHMOD
 extern int fchmod(int, mode_t);
 #endif*/
index 16f4f6d95dd8823e5cb979a590faa4cfda631727..1f07bcc90fdd25a6fd4805253be969912d49768f 100644 (file)
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include "pythread.h"
-
-#if defined(__BORLANDC__)
-/* These overrides not needed for Win32 */
-#define timezone _timezone
-#define tzname _tzname
-#define daylight _daylight
-#endif /* __BORLANDC__ */
 #endif /* MS_WINDOWS */
 #endif /* !__WATCOMC__ || __QNX__ */
 
@@ -88,7 +81,7 @@ floatclock(_Py_clock_info_t *info)
 }
 #endif /* HAVE_CLOCK */
 
-#if defined(MS_WINDOWS) && !defined(__BORLANDC__)
+#ifdef MS_WINDOWS
 #define WIN32_PERF_COUNTER
 /* Win32 has better clock replacement; we have our own version, due to Mark
    Hammond and Tim Peters */
@@ -120,7 +113,7 @@ win_perf_counter(_Py_clock_info_t *info)
     }
     return PyFloat_FromDouble(diff / (double)cpu_frequency);
 }
-#endif
+#endif   /* MS_WINDOWS */
 
 #if defined(WIN32_PERF_COUNTER) || defined(HAVE_CLOCK)
 #define PYCLOCK
index 49c25997b5a1c8fa88567e8d0e02b420d82c0a44..9cdc4c5a9525eba50d558edaeb97dd9ff7566ae9 100644 (file)
@@ -226,35 +226,6 @@ typedef int pid_t;
 
 #endif /* _MSC_VER */
 
-/* ------------------------------------------------------------------------*/
-/* The Borland compiler defines __BORLANDC__ */
-/* XXX These defines are likely incomplete, but should be easy to fix. */
-#ifdef __BORLANDC__
-#define COMPILER "[Borland]"
-
-#ifdef _WIN32
-/* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
- */
-
-typedef int pid_t;
-/* BCC55 seems to understand __declspec(dllimport), it is used in its
-   own header files (winnt.h, ...) - so we can do nothing and get the default*/
-
-#undef HAVE_SYS_UTIME_H
-#define HAVE_UTIME_H
-#define HAVE_DIRENT_H
-
-/* rename a few functions for the Borland compiler */
-#include <io.h>
-#define _chsize chsize
-#define _setmode setmode
-
-#else /* !_WIN32 */
-#error "Only Win32 and later are supported"
-#endif /* !_WIN32 */
-
-#endif /* BORLANDC */
-
 /* ------------------------------------------------------------------------*/
 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
 #if defined(__GNUC__) && defined(_WIN32)