Some more changes · pythoncapi/cpython@29e7af0 · GitHub
Skip to content

Commit 29e7af0

Browse files
committed
Some more changes
1 parent bd851cd commit 29e7af0

5 files changed

Lines changed: 25 additions & 22 deletions

File tree

Mac/Include/config.h

Lines changed: 2 additions & 2 deletions

Mac/Modules/config.c

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* Generated automatically from ../../Modules/config.c.in by makesetup. */
21
/* -*- C -*- ***********************************************
32
Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
43
Amsterdam, The Netherlands.
@@ -23,12 +22,19 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2322
2423
******************************************************************/
2524

26-
/* Universal Python configuration file */
25+
/* Macintosh Python configuration file */
2726

2827
#ifdef HAVE_CONFIG_H
2928
#include "config.h"
3029
#endif
3130

31+
#ifdef macintosh
32+
/* The Macintosh main program is in macmain.c */
33+
#define NO_MAIN
34+
/* Comment this out if you're not interested in STDWIN */
35+
#define USE_STDWIN
36+
#endif
37+
3238
#include <stdio.h>
3339
#include <string.h>
3440

@@ -53,10 +59,6 @@ main(argc, argv)
5359
int argc;
5460
char **argv;
5561
{
56-
#ifdef macintosh
57-
/* Macs always support stdwin */
58-
// wargs(&argc, &argv);
59-
#endif
6062
argv0 = argv[0];
6163
realmain(argc, argv);
6264
}
@@ -190,6 +192,7 @@ extern void initcl();
190192
extern void initfm();
191193
extern void initgl();
192194
extern void initimgfile();
195+
extern void initimgformat();
193196
extern void initsgi();
194197
extern void initsv();
195198
extern void initfl();
@@ -199,6 +202,7 @@ extern void initsignal();
199202
extern void initnew();
200203
extern void initdl();
201204
extern void initsyslog();
205+
extern void initgestalt();
202206

203207
/* -- ADDMODULE MARKER 1 -- */
204208

@@ -220,11 +224,14 @@ struct {
220224
{"audioop", initaudioop},
221225
{"imageop", initimageop},
222226
{"rgbimg", initrgbimg},
223-
// {"stdwin", initstdwin},
227+
#ifdef USE_STDWIN
228+
{"stdwin", initstdwin},
229+
#endif
224230
{"md5", initmd5},
225231
{"rotor", initrotor},
226-
// {"signal", initsignal},
227232
{"new", initnew},
233+
{"gestalt", initgestalt},
234+
{"imgformat", initimgformat},
228235

229236
/* -- ADDMODULE MARKER 2 -- */
230237

Mac/Modules/macmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3333
#include <stdio.h>
3434
#include <string.h>
3535
#include <errno.h>
36+
#include <stat.h>
3637

3738
#include <fcntl.h>
3839

3940
#include "macdefs.h"
4041
#include "dirent.h"
41-
#include "stat.h"
4242

4343
#ifndef MAXPATHLEN
4444
#define MAXPATHLEN 1024
@@ -369,7 +369,7 @@ mac_stat(self, args)
369369
return mac_error();
370370
return mkvalue("(llllllllll)",
371371
(long)st.st_mode,
372-
0L /* st_ino */,
372+
(long)st.st_ito, /* XXX st_ino -- typo in THINK C <stat.h>? */
373373
(long)st.st_dev,
374374
(long)st.st_nlink,
375375
(long)st.st_uid,

Mac/README

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ arbitrarily because of the 32000 bytes restriction.
8282
- From Mac: all .c files except fopenRF.c [[which shouldn't even
8383
be there]].
8484

85-
- From Parser: acceler.c, grammar1.c, myreadline.c, node.c,
85+
- From Parser: acceler.c, grammar1.c, intrcheck.c, myreadline.c, node.c,
8686
parser.c, parsetok.c, tokenizer.c.
8787

8888
- From Python: bltinmodule.c, ceval.c, cgensupport.c,
8989
compile.c, errors.c, getopt.c, graminit.c, import.c,
9090
marshal.c, modsupport.c, mystrtoul.c, pythonmain.c,
91-
pythonrun.c, structmember.c, sysmodule.c, traceback.c
91+
pythonrun.c, sigcheck.c, structmember.c, sysmodule.c, traceback.c
9292
(i.e. all .c files except dup2.c, fmod.c, frozenmain.c,
9393
getcwd.c, getmtime.c, memmove.c, sigcheck.c, strerror.c,
9494
strtod.c, thread.c)
@@ -102,9 +102,7 @@ arbitrarily because of the 32000 bytes restriction.
102102
macmodule.c in the Mac subdirectory, so it should already have
103103
been added in a previous step.) Note that for most modules,
104104
the source file is called <name>module.c, but for a few long
105-
module names it is just <module>.c. - If you don't add
106-
signalmodule.c, you must add intrcheck.c from Parser and
107-
sigcheck.c from Python.
105+
module names it is just <module>.c.
108106

109107
The following THINK C libraries must be added: from Standard
110108
Libraries, ANSI and unix; from Mac Libraries, MacTraps. I put each

Mac/Relnotes-1.2

Lines changed: 3 additions & 5 deletions

0 commit comments

Comments
 (0)