소스 검색

* on targets with indirect main entry argc, argv and envp are provided through the indirect entry information instead of externals

git-svn-id: trunk@36686 -
svenbarth 8 년 전
부모
커밋
d5c8fe7455
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      rtl/unix/sysunixh.inc

+ 6 - 0
rtl/unix/sysunixh.inc

@@ -57,9 +57,15 @@ const
   DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsLF;
 
 {$if not defined(solaris) and not defined(darwin) and not defined(aix)}
+{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
+var argc:longint;
+    argv:PPchar;
+    envp:PPchar;
+{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
 var argc:longint;external name 'operatingsystem_parameter_argc';
     argv:PPchar;external name 'operatingsystem_parameter_argv';
     envp:PPchar;external name 'operatingsystem_parameter_envp';
+{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
 {$endif}
 
 {$ifdef unix}