Initial port to CodeWarrior CFM68K support (mainly by disabling

unsupported features).
This commit is contained in:
Jack Jansen 1995-06-27 13:18:14 +00:00
parent eceb3e3f0a
commit f74f63a43f
8 changed files with 24 additions and 5 deletions

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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 {
} 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

View File

@ -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();
} }

View File

@ -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)
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);

View File

@ -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)
break; break;
} }
} }
#endif
} }
int int

View File

@ -0,0 +1,2 @@
#define HAVE_CONFIG_H
#define USE_MAC_DYNAMIC_LOADING