Added PC files from Jim Ahlstrom. · pythoncapi/cpython@1bc716f · GitHub
Skip to content

Commit 1bc716f

Browse files
committed
Added PC files from Jim Ahlstrom.
1 parent c012547 commit 1bc716f

33 files changed

Lines changed: 17716 additions & 21 deletions

PC/config.c

Lines changed: 5 additions & 14 deletions

PC/config.h

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,31 @@ standard part of the Python distribution.
2424
#define HAVE_HYPOT
2525
#define DONT_HAVE_SIG_ALARM
2626
#define DONT_HAVE_SIG_PAUSE
27+
#define LONG_BIT 32
2728

2829
/* Microsoft C defines _MSC_VER */
2930

3031
#if defined(_MSC_VER) && _MSC_VER > 850
31-
/* Start of defines for NT using VC++ 2.0 and up */
32-
#define NT
32+
/* Start of defines for MS_WIN32 using VC++ 2.0 and up */
33+
#define NT /* NT is obsolete - please use MS_WIN32 instead */
34+
#define MS_WIN32
35+
#define MS_WINDOWS
3336
#ifdef _M_IX86
3437
#define COMPILER "[MSC 32 bit (Intel)]"
3538
#else
3639
#define COMPILER "[MSC (Unknown)]"
3740
#endif
38-
#define PYTHONPATH "c:\\python\\lib"
41+
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win"
3942
typedef int pid_t;
43+
#define WORD_BIT 32
4044
#pragma warning(disable:4113)
4145
#define hypot _hypot
4246
#include <stdio.h>
4347
#define HAVE_CLOCK
4448
#define HAVE_STRFTIME
4549
#define NT_THREADS
4650
#define WITH_THREAD
51+
#define _COMPLEX_DEFINED
4752
#ifndef NETSCAPE_PI
4853
#define USE_SOCKET
4954
#endif
@@ -53,15 +58,20 @@ typedef int pid_t;
5358
#ifdef USE_DL_EXPORT
5459
#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
5560
#endif
56-
#endif /* NT */
61+
#endif /* MS_WIN32 */
5762

5863
#if defined(_MSC_VER) && _MSC_VER <= 850
5964
/* Start of defines for 16-bit Windows using VC++ 1.5 */
6065
#define COMPILER "[MSC 16-bit]"
66+
#ifdef _WINDOWS
6167
#define MS_WIN16
62-
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\dos_8x3"
68+
#define MS_WINDOWS
69+
#endif
70+
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
6371
#define IMPORT_8x3_NAMES
6472
typedef int pid_t;
73+
#define WORD_BIT 16
74+
#define _COMPLEX_DEFINED
6575
#pragma warning(disable:4113)
6676
#define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
6777
#define hypot _hypot
@@ -99,13 +109,30 @@ int sscanf(const char *, const char *, ...);
99109
/* The Watcom compiler defines __WATCOMC__ */
100110
#ifdef __WATCOMC__
101111
#define COMPILER "[Watcom]"
102-
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\dos_8x3"
112+
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
103113
#define IMPORT_8x3_NAMES
104114
#include <ctype.h>
105115
#include <direct.h>
106116
typedef int mode_t;
107117
typedef int uid_t;
108118
typedef int gid_t;
119+
typedef int pid_t;
120+
#if defined(__NT__)
121+
#define NT /* NT is obsolete - please use MS_WIN32 instead */
122+
#define MS_WIN32
123+
#define MS_WINDOWS
124+
#define NT_THREADS
125+
#define USE_SOCKET
126+
#define WITH_THREAD
127+
#elif defined(__WINDOWS__)
128+
#define MS_WIN16
129+
#define MS_WINDOWS
130+
#endif
131+
#ifdef M_I386
132+
#define WORD_BIT 32
133+
#else
134+
#define WORD_BIT 16
135+
#endif
109136
#define VA_LIST_IS_ARRAY
110137
#define HAVE_CLOCK
111138
#define HAVE_STRFTIME
@@ -117,7 +144,7 @@ typedef int gid_t;
117144
/* The Borland compiler defines __BORLANDC__ */
118145
#ifdef __BORLANDC__
119146
#define COMPILER "[Borland]"
120-
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\dos_8x3"
147+
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
121148
#define IMPORT_8x3_NAMES
122149
#define HAVE_CLOCK
123150
#define HAVE_STRFTIME

PC/makesrc.exe

25 KB
Binary file not shown.

PC/pyth_w31.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
NAME
2+
EXETYPE WINDOWS
3+
CODE PRELOAD MOVABLE DISCARDABLE
4+
DATA PRELOAD MOVABLE
5+
HEAPSIZE 4096

PC/python.def

Lines changed: 231 additions & 0 deletions

0 commit comments

Comments
 (0)