Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6042741

Browse files
committed
Rip out DOS and Win16 support.
1 parent 215c340 commit 6042741

1 file changed

Lines changed: 1 addition & 103 deletions

File tree

PC/config.h

Lines changed: 1 addition & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -128,97 +128,6 @@ typedef int pid_t;
128128
#define LONG_LONG __int64
129129
#endif /* _MSC_VER && > 850 */
130130

131-
#if defined(_MSC_VER) && _MSC_VER <= 850 /* presume this implies Win16 */
132-
/* Start of defines for 16-bit Windows using VC++ 1.5 */
133-
#define COMPILER "[MSC 16-bit]"
134-
#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
135-
#define IMPORT_8x3_NAMES
136-
typedef int pid_t;
137-
#define WORD_BIT 16
138-
#define SIZEOF_INT 2
139-
#define SIZEOF_LONG 4
140-
#define SIZEOF_VOID_P 4
141-
#pragma warning(disable:4113)
142-
#define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
143-
#define hypot _hypot
144-
#define SIGINT 2
145-
#include <stdio.h>
146-
/* Windows 3.1 will not tolerate any console io in a dll */
147-
#ifdef _USRDLL
148-
#include <time.h>
149-
#ifdef __cplusplus
150-
extern "C" {
151-
#endif
152-
#define stdin ((FILE *)0)
153-
#define stdout ((FILE *)1)
154-
#define stderr ((FILE *)2)
155-
#define fflush Py_fflush
156-
int Py_fflush(FILE *);
157-
#define fgets Py_fgets
158-
char *Py_fgets(char *, int, FILE *);
159-
#define fileno Py_fileno
160-
int Py_fileno(FILE *);
161-
#define fprintf Py_fprintf
162-
int Py_fprintf(FILE *, const char *, ...);
163-
#define printf Py_printf
164-
int Py_printf(const char *, ...);
165-
#define sscanf Py_sscanf
166-
int Py_sscanf(const char *, const char *, ...);
167-
clock_t clock();
168-
void _exit(int);
169-
void exit(int);
170-
int sscanf(const char *, const char *, ...);
171-
#ifdef __cplusplus
172-
}
173-
#endif
174-
#endif /* _USRDLL */
175-
#ifndef NETSCAPE_PI
176-
/* use sockets, but not in a Netscape dll */
177-
#define USE_SOCKET
178-
#endif
179-
#endif /* MS_WIN16 */
180-
181-
/* The Watcom compiler defines __WATCOMC__ */
182-
#ifdef __WATCOMC__
183-
#define COMPILER "[Watcom]"
184-
#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
185-
#define IMPORT_8x3_NAMES
186-
#include <ctype.h>
187-
#include <direct.h>
188-
typedef int mode_t;
189-
typedef int uid_t;
190-
typedef int gid_t;
191-
typedef int pid_t;
192-
#if defined(__NT__)
193-
#define NT /* NT is obsolete - please use MS_WIN32 instead */
194-
#define MS_WIN32
195-
#define MS_WINDOWS
196-
#define NT_THREADS
197-
#define USE_SOCKET
198-
#define WITH_THREAD
199-
#elif defined(__WINDOWS__)
200-
#define MS_WIN16
201-
#define MS_WINDOWS
202-
#endif
203-
#ifdef M_I386
204-
#define WORD_BIT 32
205-
#define SIZEOF_INT 4
206-
#define SIZEOF_LONG 4
207-
#define SIZEOF_VOID_P 4
208-
#else
209-
#define WORD_BIT 16
210-
#define SIZEOF_INT 2
211-
#define SIZEOF_LONG 4
212-
#define SIZEOF_VOID_P 4
213-
#endif
214-
#define VA_LIST_IS_ARRAY
215-
#define HAVE_CLOCK
216-
#define HAVE_STRFTIME
217-
#ifdef USE_DL_EXPORT
218-
#define DL_IMPORT(RTYPE) RTYPE __export
219-
#endif
220-
#endif /* __WATCOMC__ */
221-
222131
/* The Borland compiler defines __BORLANDC__ */
223132
/* XXX These defines are likely incomplete, but should be easy to fix. */
224133
#ifdef __BORLANDC__
@@ -268,14 +177,7 @@ typedef int pid_t;
268177
#define LONG_LONG __int64
269178

270179
#else /* !_WIN32 */
271-
/* XXX These defines are likely incomplete, but should be easy to fix. */
272-
273-
#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
274-
#define IMPORT_8x3_NAMES
275-
#ifdef USE_DL_IMPORT
276-
#define DL_IMPORT(RTYPE) RTYPE __import
277-
#endif
278-
180+
#error "Only Win32 and later are supported"
279181
#endif /* !_WIN32 */
280182

281183
#endif /* BORLANDC */
@@ -415,10 +317,6 @@ typedef unsigned long uintptr_t;
415317
# define SIZEOF_FPOS_T 8
416318
# define SIZEOF_HKEY 4
417319
# endif
418-
#elif defined(MS_WIN16)
419-
# define PLATFORM "win16"
420-
#else
421-
# define PLATFORM "dos"
422320
#endif
423321

424322

0 commit comments

Comments
 (0)