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

Skip to content

Commit becdbec

Browse files
committed
ported to Think C
1 parent e2aaa9d commit becdbec

4 files changed

Lines changed: 26 additions & 1 deletion

File tree

Mac/Include/macglue.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2222
2323
******************************************************************/
2424

25+
#ifndef SystemSevenOrLater
26+
#define SystemSevenOrLater 1
27+
#endif
28+
2529
#include <Types.h>
2630
#include <Files.h>
2731
#include <Events.h>
2832

33+
#ifdef GENERATINGCFM /* Defined to 0 or 1 in Universal headers */
34+
#define HAVE_UNIVERSAL_HEADERS
35+
#endif
36+
2937
char *macstrerror(int); /* strerror with mac errors */
3038

3139
extern int PyMac_DoYieldEnabled; /* Don't do eventloop when false */

Mac/Modules/config.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,20 @@ getversion()
9999
#else
100100
strcat(version, " [MW 68K compiler]");
101101
#endif
102+
#endif
103+
#ifdef THINK_C
104+
#ifdef __SC__
105+
strcat(version, " [Symantec Think C compiler]");
106+
#else
107+
strcat(version, " [Think C compiler]");
108+
#endif
109+
#endif
110+
#ifdef MPW
111+
#ifdef __SC__
112+
strcat(version, " [Symantec MPW C compiler]");
113+
#else
114+
strcat(version, " [Apple MPW C compiler]");
115+
#endif
102116
#endif
103117
return version;
104118
}
@@ -335,6 +349,7 @@ struct {
335349
#ifdef THINK_C
336350
{"Snd", initSnd},
337351
{"Win", initWin},
352+
#endif
338353

339354
/* -- ADDMODULE MARKER 2 -- */
340355

Mac/Modules/macfsmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2626
#include "modsupport.h" /* For getargs() etc. */
2727
#include "macglue.h"
2828

29+
#include <Memory.h>
2930
#include <Files.h>
3031
#include <StandardFile.h>
3132
#include <Aliases.h>

Mac/Python/macglue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2323
******************************************************************/
2424

2525
#include "Python.h"
26+
2627
#include "macglue.h"
2728

2829
#include <OSUtils.h> /* for Set(Current)A5 */
@@ -401,7 +402,7 @@ PyMac_GetPythonDir()
401402
prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm);
402403
if ( prefrh == -1 ) {
403404
/* It doesn't exist. Try to create it */
404-
FSpCreateResFile(&dirspec, 'PYTH', 'pref', NULL);
405+
FSpCreateResFile(&dirspec, 'PYTH', 'pref', 0);
405406
prefrh = FSpOpenResFile(&dirspec, fsRdWrShPerm);
406407
if ( prefrh == -1 ) {
407408
cannotmodify = 1;

0 commit comments

Comments
 (0)