made target macpas compile again

git-svn-id: trunk@1077 -
This commit is contained in:
olle 2005-09-12 19:39:58 +00:00
parent f6ec99633c
commit 32fac59ac5
3 changed files with 10 additions and 1 deletions

View File

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

View File

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

View File

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