diff --git a/rtl/bsd/system.pp b/rtl/bsd/system.pp index 7fc5bcbdbe..7e074911fb 100644 --- a/rtl/bsd/system.pp +++ b/rtl/bsd/system.pp @@ -78,13 +78,13 @@ Implementation {$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION} {$define FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION} -procedure OsSetupEntryInformation(const info: TEntryInformation); forward; +procedure OsSetupEntryInformation(constref info: TEntryInformation); forward; {$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} {$I system.inc} {$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION} -procedure OsSetupEntryInformation(const info: TEntryInformation); +procedure OsSetupEntryInformation(constref info: TEntryInformation); begin argc := info.OS.argc; argv := info.OS.argv; diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 8afbfcca07..f7e8517a2d 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -121,7 +121,7 @@ var {$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} {$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION} -procedure SetupEntryInformation(const info: TEntryInformation);[public,alias:'_FPC_SetupEntryInformation']; +procedure SetupEntryInformation(constref info: TEntryInformation);[public,alias:'_FPC_SetupEntryInformation']; begin EntryInformation := info; FPCResStrInitTables := info.ResStrInitTables; diff --git a/rtl/win/systlsdir.inc b/rtl/win/systlsdir.inc index a35c799700..564e83b2d4 100644 --- a/rtl/win/systlsdir.inc +++ b/rtl/win/systlsdir.inc @@ -52,7 +52,7 @@ procedure SysAllocateThreadVars; external name '_FPC_SysAllocateThreadVars'; procedure InitHeap; external name '_FPC_InitHeap'; {$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION} -procedure SetupEntryInformation(const info: TEntryInformation); external name '_FPC_SetupEntryInformation'; +procedure SetupEntryInformation(constref info: TEntryInformation); external name '_FPC_SetupEntryInformation'; {$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} {$endif FPC_INSSIDE_SYSINIT} diff --git a/rtl/win/syswin.inc b/rtl/win/syswin.inc index 5502868a76..0965cf0b5e 100644 --- a/rtl/win/syswin.inc +++ b/rtl/win/syswin.inc @@ -356,7 +356,7 @@ Var DLLInitState : Longint = -1; DLLBuf : Jmp_buf; -function Dll_entry{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}(const info : TEntryInformation){$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} : longbool; [public,alias:'_FPC_DLL_Entry']; +function Dll_entry{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}(constref info : TEntryInformation){$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} : longbool; [public,alias:'_FPC_DLL_Entry']; begin {$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION} SetupEntryInformation(info); diff --git a/rtl/win32/sysinit.inc b/rtl/win32/sysinit.inc index c25b9d51ed..0eea501af0 100644 --- a/rtl/win32/sysinit.inc +++ b/rtl/win32/sysinit.inc @@ -42,8 +42,8 @@ tls_callback: pointer; external name '__FPC_tls_callbacks'; {$endif FPC_USE_TLS_DIRECTORY} - procedure EXE_Entry(const info : TEntryInformation); external name '_FPC_EXE_Entry'; - function DLL_Entry(const info : TEntryInformation) : longbool; external name '_FPC_DLL_Entry'; + procedure EXE_Entry(constref info : TEntryInformation); external name '_FPC_EXE_Entry'; + function DLL_Entry(constref info : TEntryInformation) : longbool; external name '_FPC_DLL_Entry'; procedure PascalMain;external name 'PASCALMAIN'; function GetStdHandle(nStdHandle:DWORD) : THandle; stdcall; external 'kernel32' name 'GetStdHandle'; diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index ef19528c65..7082b8732d 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -114,7 +114,7 @@ var FPCSysInstance : PLongint;public name '_FPC_SysInstance'; {$define FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION} -procedure OsSetupEntryInformation(const info: TEntryInformation); forward; +procedure OsSetupEntryInformation(constref info: TEntryInformation); forward; {$ifdef FPC_USE_WIN32_SEH} function main_wrapper(arg: Pointer; proc: Pointer): ptrint; forward; @@ -133,7 +133,7 @@ end; { include code common with win64 } {$I syswin.inc} -procedure OsSetupEntryInformation(const info: TEntryInformation); +procedure OsSetupEntryInformation(constref info: TEntryInformation); begin TlsKey := info.OS.TlsKeyAddr; FPCSysInstance := info.OS.SysInstance; @@ -191,7 +191,7 @@ var to check if the call stack can be written on exceptions } _SS : Cardinal; -procedure Exe_entry(const info : TEntryInformation);[public,alias:'_FPC_EXE_Entry']; +procedure Exe_entry(constref info : TEntryInformation);[public,alias:'_FPC_EXE_Entry']; var xframe: TEXCEPTION_FRAME; begin