summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Include/config.h2
-rw-r--r--Mac/Include/macdefs.h3
-rw-r--r--Mac/Include/macglue.h2
-rw-r--r--Mac/Modules/config.c6
-rw-r--r--Mac/Python/macapplication.c5
-rw-r--r--Mac/Python/macgetargv.c5
-rw-r--r--Mac/Python/macglue.c4
-rw-r--r--Mac/mwerks/old/mwerks_cfm68k_config.h2
8 files changed, 24 insertions, 5 deletions
diff --git a/Mac/Include/config.h b/Mac/Include/config.h
index b78d63b..93def6c 100644
--- a/Mac/Include/config.h
+++ b/Mac/Include/config.h
@@ -13,7 +13,7 @@
#define HAVE_FOPENRF
#endif
-#ifdef __CFM68K__
+#ifdef SYMANTEC__CFM68K__
#define atof Py_AtoF
#define strtod Py_StrToD
#endif
diff --git a/Mac/Include/macdefs.h b/Mac/Include/macdefs.h
index b64a47e..71f73b1 100644
--- a/Mac/Include/macdefs.h
+++ b/Mac/Include/macdefs.h
@@ -13,6 +13,9 @@
#ifdef __MWERKS__
#include "errno_unix.h"
+#include <Strings.h>
+#define c2pstr C2PStr
+#define p2cstr P2CStr
#endif
#include <errno.h>
#include <string.h>
diff --git a/Mac/Include/macglue.h b/Mac/Include/macglue.h
index a9ef0f7..13468fb 100644
--- a/Mac/Include/macglue.h
+++ b/Mac/Include/macglue.h
@@ -34,7 +34,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_UNIVERSAL_HEADERS
#endif
-#ifdef __CFM68K__
+#ifdef SYMANTEC__CFM68K__
#pragma lib_export on
#endif
diff --git a/Mac/Modules/config.c b/Mac/Modules/config.c
index 385372a..224be8b 100644
--- a/Mac/Modules/config.c
+++ b/Mac/Modules/config.c
@@ -95,9 +95,13 @@ getversion()
#ifdef __powerc
strcat(version, " [MW PPC compiler]");
#else
+#ifdef __CFM68K__
+ strcat(version, " [MW CFM68K compiler]");
+#else
strcat(version, " [MW 68K compiler]");
#endif
#endif
+#endif
#ifdef THINK_C
#ifdef __SC__
strcat(version, " [Symantec Think C compiler]");
@@ -330,7 +334,7 @@ struct {
} inittab[] = {
{"array", initarray},
-#ifndef __CFM68K__
+#ifndef SYMANTEC__CFM68K__
/* The math library seems mostly broken... */
{"math", initmath},
#endif
diff --git a/Mac/Python/macapplication.c b/Mac/Python/macapplication.c
index bac0620..0028741 100644
--- a/Mac/Python/macapplication.c
+++ b/Mac/Python/macapplication.c
@@ -24,12 +24,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Macintosh Applet Python main program */
-#ifdef __CFM68K__
+#ifdef SYMANTEC__CFM68K__
#pragma lib_export on
#endif
extern void PyMac_InitApplication();
main() {
+#if defined(__MWERKS__) && defined(__CFM68K__)
+ printf("Hello, world!\n");
+#endif
PyMac_InitApplication();
}
diff --git a/Mac/Python/macgetargv.c b/Mac/Python/macgetargv.c
index 66c6d59..5f2e637 100644
--- a/Mac/Python/macgetargv.c
+++ b/Mac/Python/macgetargv.c
@@ -50,7 +50,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_UNIVERSAL_HEADERS
#endif
-#ifdef __CFM68K__
+#ifdef SYMANTEC__CFM68K__
#pragma lib_export on
#endif
@@ -120,6 +120,9 @@ get_full_path (FSSpec *fss, char *buf)
char tmpbuf[256];
int plen;
+#if defined(__MWERKS__) && defined(__CFM68K__)
+ return -1; /* get_folder_parent doesn't work */
+#endif
fss_current = *fss;
plen = fss_current.name[0];
memcpy(buf, &fss_current.name[1], plen);
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index 38f654f..24667e6 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -223,6 +223,9 @@ static void
scan_event_queue(flush)
int flush;
{
+#if defined(__MWERKS__) && defined(__CFM68K__)
+ return; /* No GetEvQHdr yet */
+#else
register EvQElPtr q;
q = (EvQElPtr) GetEvQHdr()->qHead;
@@ -237,6 +240,7 @@ scan_event_queue(flush)
break;
}
}
+#endif
}
int
diff --git a/Mac/mwerks/old/mwerks_cfm68k_config.h b/Mac/mwerks/old/mwerks_cfm68k_config.h
new file mode 100644
index 0000000..7770af74
--- /dev/null
+++ b/Mac/mwerks/old/mwerks_cfm68k_config.h
@@ -0,0 +1,2 @@
+#define HAVE_CONFIG_H
+#define USE_MAC_DYNAMIC_LOADING