From d5c8fe7455816ed12d428b5ae99d7da31fa8f2bb Mon Sep 17 00:00:00 2001 From: svenbarth Date: Sat, 8 Jul 2017 19:18:20 +0000 Subject: [PATCH] * 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 - --- rtl/unix/sysunixh.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rtl/unix/sysunixh.inc b/rtl/unix/sysunixh.inc index ecc8ed1208..3fe1f6fe9e 100644 --- a/rtl/unix/sysunixh.inc +++ b/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}