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

Skip to content

Commit eceb3e3

Browse files
committed
Porting to CW CFM68K
1 parent f9480ce commit eceb3e3

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

Python/errors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6060

6161
#include <errno.h>
6262

63-
#ifdef __CFM68K__
63+
#ifdef SYMANTEC__CFM68K__
6464
#pragma lib_export on
6565
#endif
6666

Python/importdl.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ typedef void (*dl_funcptr)();
151151

152152
#ifdef USE_MAC_DYNAMIC_LOADING
153153
#include <CodeFragments.h>
154-
#ifdef __CFM68K__ /* Really just an older version of Universal Headers */
154+
#ifdef SYMANTEC__CFM68K__ /* Really just an older version of Universal Headers */
155155
#define CFragConnectionID ConnectionID
156156
#define kLoadCFrag 0x01
157157
#endif
@@ -268,7 +268,10 @@ load_dynamic_module(name, pathname, fp)
268268

269269
/* First resolve any aliases to find the real file */
270270
(void)FSMakeFSSpec(0, 0, Pstring(pathname), &libspec);
271+
#if !(defined(__MWERKS__) && defined(__CFM68K__))
272+
/* Bug: not in library */
271273
err = ResolveAliasFile(&libspec, 1, &isfolder, &didsomething);
274+
#endif
272275
if ( err ) {
273276
sprintf(buf, "%s: %s", pathname, PyMac_StrError(err));
274277
err_setstr(ImportError, buf);

Python/pythonmain.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ realmain(argc, argv)
106106
fprintf(stderr,
107107
"usage: %s [-d] [-i] [-s] [-u ] [-v] [-c cmd | file | -] [arg] ...\n",
108108
argv[0]);
109+
#if !(defined(__CFM68K__) && defined(__MWERKS__))
110+
/* Mwerks cfm68k linker doesn't like these... */
109111
fprintf(stderr, "\
110112
\n\
111113
Options and arguments (and corresponding environment variables):\n\
@@ -128,6 +130,7 @@ PYTHONSTARTUP: file executed on interactive startup (no default)\n\
128130
PYTHONPATH : colon-separated list of directories prefixed to the\n\
129131
default module search path. The result is sys.path.\n\
130132
");
133+
#endif /* !cfm68k || !mwerks */
131134
exit(2);
132135
/*NOTREACHED*/
133136

0 commit comments

Comments
 (0)