Initial port to CodeWarrior CFM68K support (mainly by disabling
unsupported features).
This commit is contained in:
parent
eceb3e3f0a
commit
f74f63a43f
|
@ -13,7 +13,7 @@
|
|||
#define HAVE_FOPENRF
|
||||
#endif
|
||||
|
||||
#ifdef __CFM68K__
|
||||
#ifdef SYMANTEC__CFM68K__
|
||||
#define atof Py_AtoF
|
||||
#define strtod Py_StrToD
|
||||
#endif
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -94,10 +94,14 @@ getversion()
|
|||
#ifdef __MWERKS__
|
||||
#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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#define HAVE_CONFIG_H
|
||||
#define USE_MAC_DYNAMIC_LOADING
|
Loading…
Reference in New Issue