Browse Source

made target macpas compile again

git-svn-id: trunk@1077 -
olle 20 years ago
parent
commit
32fac59ac5
3 changed files with 10 additions and 1 deletions
  1. 2 1
      compiler/ncgutil.pas
  2. 2 0
      compiler/parser.pas
  3. 6 0
      rtl/macos/system.pp

+ 2 - 1
compiler/ncgutil.pas

@@ -1595,7 +1595,8 @@ implementation
         { call startup helpers from main program }
         if (current_procinfo.procdef.proctypeoption=potype_proginit) then
          begin
-           if (target_info.system = system_powerpc_darwin) then
+           if (target_info.system = system_powerpc_darwin) or
+              (target_info.system = system_powerpc_macos) then
              begin
               { the parameters are already in the right registers }
               cg.a_call_name(list,target_info.cprefix+'FPC_SYSTEMMAIN');

+ 2 - 0
compiler/parser.pas

@@ -35,7 +35,9 @@ interface
 implementation
 
     uses
+{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
       sysutils,
+{$ENDIF MACOS_USE_FAKE_SYSUTILS}
       cutils,cclasses,
       globtype,version,tokens,systems,globals,verbose,
       symbase,symtable,symsym,

+ 6 - 0
rtl/macos/system.pp

@@ -213,18 +213,24 @@ end;
                          SystemUnit Initialization
 *****************************************************************************}
 
+{$ifndef FPC_DARWIN_PASCALMAIN}
 procedure pascalmain; external name 'PASCALMAIN';
 
 {Main entry point in C style, needed to capture program parameters.
  For this to work, the system unit must be before the main program
  in the linking order.}
 procedure main(argcparam: Longint; argvparam: ppchar; envpparam: ppchar); cdecl; [public];
+{$else FPC_DARWIN_PASCALMAIN}
+procedure FPC_SYSTEMMAIN(argcparam: Longint; argvparam: ppchar; envpparam: ppchar); cdecl; [public];
+{$endif FPC_DARWIN_PASCALMAIN}
 
 begin
   argc:= argcparam;
   argv:= argvparam;
   envp:= envpparam;
+{$ifndef FPC_DARWIN_PASCALMAIN}
   pascalmain;  {run the pascal main program}
+{$endif FPC_DARWIN_PASCALMAIN}
 end;
 
 procedure setup_arguments;