diff options
author | johnvg | 2004-04-19 15:50:03 +0000 |
---|---|---|
committer | johnvg | 2004-04-19 15:50:03 +0000 |
commit | ff301d4971b3d8956165cfb5ab4636eeb86fbf1e (patch) | |
tree | ed2257312907fefdc8f641d88ae14f92730f9f9b /backendC | |
parent | port to gcc on Mac OS X (diff) |
port to gcc on Mac OS X
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1488 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC')
-rw-r--r-- | backendC/CleanCompilerSources/apple_main.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/backendC/CleanCompilerSources/apple_main.c b/backendC/CleanCompilerSources/apple_main.c index a4f6636..8ce9dac 100644 --- a/backendC/CleanCompilerSources/apple_main.c +++ b/backendC/CleanCompilerSources/apple_main.c @@ -1,13 +1,17 @@ #include "compiledefines.h" +#define CG_PPC_XO + #ifdef KARBON # define TARGET_API_MAC_CARBON 1 #endif #include <stdio.h> -#include <unix.h> -#include <SIOUX.h> +#if !defined (GNU_C) +# include <unix.h> +# include <SIOUX.h> +#endif #include <quickdraw.h> #include <fonts.h> @@ -242,8 +246,19 @@ int do_command (char *command) } #endif #ifdef CODE_GENERATOR +# ifndef GNU_C else if (!strcmp (argv[0],"cg")) result=generate_code (argc,&argv[0]); +# ifdef CG_PPC_XO + else if (!strcmp (argv[0],"cg_xo")) + result=generate_code_xo (argc,&argv[0],return_error_string,&compiler_id); + else if (!strcmp (argv[0],"cg_o")) + result=generate_code_o (argc,&argv[0],return_error_string,&compiler_id); +# endif +# else + else if (!strcmp (argv[0],"cg_o")) + result=generate_code_o (argc,&argv[0],return_error_string,&compiler_id); +# endif # ifndef NO68K else if (!strcmp (argv[0],"cg68")) result=generate_code68 (argc,&argv[0]); @@ -313,6 +328,10 @@ pascal OSErr do_script_apple_event (const AppleEvent *apple_event,AppleEvent *re return error; } +#if defined (KARBON) +# define NewAEEventHandlerProc(userRoutine) NewAEEventHandlerUPP(userRoutine) +#endif + static void InitAppleEventsStuff (void) { OSErr retCode; @@ -361,6 +380,8 @@ extern short InstallConsole (short fd); # include <Profiler.h> #endif +#if !defined (GNU_C) + int /*clean_compiler_*/ main (void) { OSErr retCode; @@ -386,8 +407,9 @@ int /*clean_compiler_*/ main (void) # endif #endif +#if !defined (GNU_C) _fcreator='3PRM'; - +#endif gQuitFlag = false; gSleepVal = kSleepMax; @@ -440,3 +462,4 @@ int /*clean_compiler_*/ main (void) } #endif +#endif
\ No newline at end of file |