Kaydet (Commit) f74f63a4 authored tarafından Jack Jansen's avatar Jack Jansen

Initial port to CodeWarrior CFM68K support (mainly by disabling

unsupported features).
üst eceb3e3f
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define HAVE_FOPENRF #define HAVE_FOPENRF
#endif #endif
#ifdef __CFM68K__ #ifdef SYMANTEC__CFM68K__
#define atof Py_AtoF #define atof Py_AtoF
#define strtod Py_StrToD #define strtod Py_StrToD
#endif #endif
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
#ifdef __MWERKS__ #ifdef __MWERKS__
#include "errno_unix.h" #include "errno_unix.h"
#include <Strings.h>
#define c2pstr C2PStr
#define p2cstr P2CStr
#endif #endif
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
......
...@@ -34,7 +34,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -34,7 +34,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_UNIVERSAL_HEADERS #define HAVE_UNIVERSAL_HEADERS
#endif #endif
#ifdef __CFM68K__ #ifdef SYMANTEC__CFM68K__
#pragma lib_export on #pragma lib_export on
#endif #endif
......
...@@ -94,10 +94,14 @@ getversion() ...@@ -94,10 +94,14 @@ getversion()
#ifdef __MWERKS__ #ifdef __MWERKS__
#ifdef __powerc #ifdef __powerc
strcat(version, " [MW PPC compiler]"); strcat(version, " [MW PPC compiler]");
#else
#ifdef __CFM68K__
strcat(version, " [MW CFM68K compiler]");
#else #else
strcat(version, " [MW 68K compiler]"); strcat(version, " [MW 68K compiler]");
#endif #endif
#endif #endif
#endif
#ifdef THINK_C #ifdef THINK_C
#ifdef __SC__ #ifdef __SC__
strcat(version, " [Symantec Think C compiler]"); strcat(version, " [Symantec Think C compiler]");
...@@ -330,7 +334,7 @@ struct { ...@@ -330,7 +334,7 @@ struct {
} inittab[] = { } inittab[] = {
{"array", initarray}, {"array", initarray},
#ifndef __CFM68K__ #ifndef SYMANTEC__CFM68K__
/* The math library seems mostly broken... */ /* The math library seems mostly broken... */
{"math", initmath}, {"math", initmath},
#endif #endif
......
...@@ -24,12 +24,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -24,12 +24,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Macintosh Applet Python main program */ /* Macintosh Applet Python main program */
#ifdef __CFM68K__ #ifdef SYMANTEC__CFM68K__
#pragma lib_export on #pragma lib_export on
#endif #endif
extern void PyMac_InitApplication(); extern void PyMac_InitApplication();
main() { main() {
#if defined(__MWERKS__) && defined(__CFM68K__)
printf("Hello, world!\n");
#endif
PyMac_InitApplication(); PyMac_InitApplication();
} }
...@@ -50,7 +50,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -50,7 +50,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_UNIVERSAL_HEADERS #define HAVE_UNIVERSAL_HEADERS
#endif #endif
#ifdef __CFM68K__ #ifdef SYMANTEC__CFM68K__
#pragma lib_export on #pragma lib_export on
#endif #endif
...@@ -120,6 +120,9 @@ get_full_path (FSSpec *fss, char *buf) ...@@ -120,6 +120,9 @@ get_full_path (FSSpec *fss, char *buf)
char tmpbuf[256]; char tmpbuf[256];
int plen; int plen;
#if defined(__MWERKS__) && defined(__CFM68K__)
return -1; /* get_folder_parent doesn't work */
#endif
fss_current = *fss; fss_current = *fss;
plen = fss_current.name[0]; plen = fss_current.name[0];
memcpy(buf, &fss_current.name[1], plen); memcpy(buf, &fss_current.name[1], plen);
......
...@@ -223,6 +223,9 @@ static void ...@@ -223,6 +223,9 @@ static void
scan_event_queue(flush) scan_event_queue(flush)
int flush; int flush;
{ {
#if defined(__MWERKS__) && defined(__CFM68K__)
return; /* No GetEvQHdr yet */
#else
register EvQElPtr q; register EvQElPtr q;
q = (EvQElPtr) GetEvQHdr()->qHead; q = (EvQElPtr) GetEvQHdr()->qHead;
...@@ -237,6 +240,7 @@ scan_event_queue(flush) ...@@ -237,6 +240,7 @@ scan_event_queue(flush)
break; break;
} }
} }
#endif
} }
int int
......
#define HAVE_CONFIG_H
#define USE_MAC_DYNAMIC_LOADING
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment