Skip to content

Commit eaf9b6c

Browse files
committed
More changes for NT, Guido style
1 parent 497aedd commit eaf9b6c

File tree

10 files changed

+803
-5004
lines changed

10 files changed

+803
-5004
lines changed

PC/_tkinter.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EXPORTS
2+
init_tkinter

PC/config.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ extern void initarray();
3333
extern void initaudioop();
3434
extern void initbinascii();
3535
extern void initcmath();
36-
extern void initenvironment();
3736
extern void initerrno();
3837
extern void initimageop();
3938
extern void initmath();
@@ -65,7 +64,6 @@ struct _inittab inittab[] = {
6564
#endif
6665
{"binascii", initbinascii},
6766
{"cmath", initcmath},
68-
{"environment", initenvironment},
6967
{"errno", initerrno},
7068
{"imageop", initimageop},
7169
{"math", initmath},

PC/config.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ compiler specific". Therefore, these should be very rare.
4444
#define PREFIX ""
4545
#define EXEC_PREFIX ""
4646

47+
#ifndef WIN32_PATCH_LEVEL
48+
#define WIN32_PATCH_LEVEL "14"
49+
#endif
50+
4751
/* Microsoft C defines _MSC_VER */
4852

4953
#if defined(_MSC_VER) && _MSC_VER > 850
@@ -52,12 +56,16 @@ compiler specific". Therefore, these should be very rare.
5256
#define MS_WIN32
5357
#define MS_WINDOWS
5458

55-
#ifdef MS_COREDLL /* Python core is in a DLL */
59+
/* For NT the Python core is in a DLL by default. Test the
60+
standard macro MS_COREDLL to find out. If you have an exception
61+
you must define MS_NO_COREDLL (do not test this macro) */
62+
#ifndef MS_NO_COREDLL
63+
#define MS_COREDLL /* Python core is in a DLL */
5664
#define main Py_Main
5765
#ifndef USE_DL_EXPORT
5866
#define USE_DL_IMPORT
5967
#endif /* !USE_DL_EXPORT */
60-
#endif /* MS_COREDLL */
68+
#endif /* !MS_NO_COREDLL */
6169

6270
#ifdef _M_IX86
6371
#define COMPILER "[MSC 32 bit (Intel)]"
@@ -283,6 +291,12 @@ typedef int pid_t;
283291
/* Define this if your time.h defines altzone */
284292
/* #define HAVE_ALTZONE */
285293

294+
/* Define if you have the putenv function. */
295+
#ifdef MS_WIN32
296+
/* Does this exist on Win16? */
297+
#define HAVE_PUTENV
298+
#endif
299+
286300
/* Define if your compiler supports function prototypes */
287301
#define HAVE_PROTOTYPES
288302

PC/getpath_nt.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
#include "osdefs.h"
33
#include <windows.h>
44

5-
#ifndef WIN32_PATCH_LEVEL
6-
#define WIN32_PATCH_LEVEL "000"
7-
#endif
8-
95
/* PREFIX and EXEC_PREFIX are meaningless on Windows */
106

117
#ifndef PREFIX

PC/import_nt.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/********************************************************************
22
3-
importnt.c
3+
import_nt.c
44
55
Win32 specific import code.
66
@@ -12,10 +12,6 @@
1212
#include "import.h"
1313
#include "importdl.h"
1414

15-
#ifndef WIN32_PATCH_LEVEL
16-
#define WIN32_PATCH_LEVEL "000"
17-
#endif
18-
1915
extern BOOL PyWin_IsWin32s();
2016

2117
FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppFileDesc, char *pathBuf, int pathLen)

PC/main_nt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2424

2525
/* Python interpreter main program */
2626

27-
#define HAVE_CONFIG_H
28-
#include "Python.h"
29-
#undef main
27+
extern int Py_Main(int, char **);
3028

3129
int
3230
main(argc, argv)

PC/python.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,8 @@ EXPORTS
231231
PyTuple_GetItem
232232
PyTuple_SetItem
233233
PyTuple_GetSlice
234+
Py_Main
235+
PySlice_Type DATA
236+
PySlice_New
237+
PySlice_GetIndices
238+
Py_GetProgramName

0 commit comments

Comments
 (0)