mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 20:49:09 +02:00
Rename FPC_HAS_INDIRECT_MAIN_INFORMATION to FPC_HAS_INDIRECT_ENTRY_INFORMATION which is more logical considering the record's name
git-svn-id: trunk@33950 -
This commit is contained in:
parent
f406867100
commit
535621faaa
@ -4072,7 +4072,7 @@ begin
|
|||||||
set_system_macro('FPC_FULLVERSION',Format('%d%.02d%.02d',[StrToInt(version_nr),StrToInt(release_nr),StrToInt(patch_nr)]));
|
set_system_macro('FPC_FULLVERSION',Format('%d%.02d%.02d',[StrToInt(version_nr),StrToInt(release_nr),StrToInt(patch_nr)]));
|
||||||
|
|
||||||
if target_info.system in systems_indirect_entry_information then
|
if target_info.system in systems_indirect_entry_information then
|
||||||
def_system_macro('FPC_HAS_INDIRECT_MAIN_INFORMATION');
|
def_system_macro('FPC_HAS_INDIRECT_ENTRY_INFORMATION');
|
||||||
|
|
||||||
if not (tf_winlikewidestring in target_info.flags) then
|
if not (tf_winlikewidestring in target_info.flags) then
|
||||||
def_system_macro('FPC_WIDESTRING_EQUAL_UNICODESTRING');
|
def_system_macro('FPC_WIDESTRING_EQUAL_UNICODESTRING');
|
||||||
|
@ -76,14 +76,14 @@ Implementation
|
|||||||
{$endif defined(CPUARM) or defined(CPUM68K)}
|
{$endif defined(CPUARM) or defined(CPUM68K)}
|
||||||
|
|
||||||
|
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$define FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION}
|
{$define FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION}
|
||||||
procedure OsSetupEntryInformation(const info: TEntryInformation); forward;
|
procedure OsSetupEntryInformation(const info: TEntryInformation); forward;
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
{$I system.inc}
|
{$I system.inc}
|
||||||
|
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
procedure OsSetupEntryInformation(const info: TEntryInformation);
|
procedure OsSetupEntryInformation(const info: TEntryInformation);
|
||||||
begin
|
begin
|
||||||
argc := info.OS.argc;
|
argc := info.OS.argc;
|
||||||
@ -91,7 +91,7 @@ begin
|
|||||||
envp := info.OS.envp;
|
envp := info.OS.envp;
|
||||||
initialstklen := info.OS.stklen;
|
initialstklen := info.OS.stklen;
|
||||||
end;
|
end;
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
{$ifdef FPC_HAS_SETSYSNR_INC}
|
{$ifdef FPC_HAS_SETSYSNR_INC}
|
||||||
{$I setsysnr.inc}
|
{$I setsysnr.inc}
|
||||||
@ -310,7 +310,7 @@ end;
|
|||||||
|
|
||||||
{$ifdef Darwin}
|
{$ifdef Darwin}
|
||||||
|
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
procedure SysEntry(constref info: TEntryInformation);[public,alias:'FPC_SysEntry'];
|
procedure SysEntry(constref info: TEntryInformation);[public,alias:'FPC_SysEntry'];
|
||||||
begin
|
begin
|
||||||
@ -321,7 +321,7 @@ begin
|
|||||||
info.PascalMain();
|
info.PascalMain();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
procedure pascalmain;external name '_PASCALMAIN';
|
procedure pascalmain;external name '_PASCALMAIN';
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ begin
|
|||||||
{$endif cpui386}
|
{$endif cpui386}
|
||||||
pascalmain; {run the pascal main program}
|
pascalmain; {run the pascal main program}
|
||||||
end;
|
end;
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$endif Darwin}
|
{$endif Darwin}
|
||||||
{$endif FPC_USE_LIBC}
|
{$endif FPC_USE_LIBC}
|
||||||
|
|
||||||
|
@ -869,19 +869,19 @@ asm
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$asmmode att}
|
{$asmmode att}
|
||||||
{$ifndef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifndef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
var
|
var
|
||||||
valgrind_used : boolean;external name '__fpc_valgrind';
|
valgrind_used : boolean;external name '__fpc_valgrind';
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
procedure setup_fastmove;{$ifdef SYSTEMINLINE}inline;{$endif}
|
procedure setup_fastmove;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
begin
|
begin
|
||||||
{ workaround valgrind bug }
|
{ workaround valgrind bug }
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
if EntryInformation.valgrind_used then
|
if EntryInformation.valgrind_used then
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
if valgrind_used then
|
if valgrind_used then
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
begin
|
begin
|
||||||
fastmoveproc_forward:=@Forwards_Valgrind;
|
fastmoveproc_forward:=@Forwards_Valgrind;
|
||||||
fastmoveproc_backward:=@Backwards_Valgrind;
|
fastmoveproc_backward:=@Backwards_Valgrind;
|
||||||
|
@ -98,29 +98,29 @@ var
|
|||||||
{$ifndef FPC_NO_GENERIC_STACK_CHECK}
|
{$ifndef FPC_NO_GENERIC_STACK_CHECK}
|
||||||
{ if the OS does the stack checking, we don't need any stklen from the
|
{ if the OS does the stack checking, we don't need any stklen from the
|
||||||
main program }
|
main program }
|
||||||
initialstklen : SizeUint{$ifndef FPC_HAS_INDIRECT_MAIN_INFORMATION}; external name '__stklen';{$else} = 0;{$endif}
|
initialstklen : SizeUint{$ifndef FPC_HAS_INDIRECT_ENTRY_INFORMATION}; external name '__stklen';{$else} = 0;{$endif}
|
||||||
{$endif FPC_NO_GENERIC_STACK_CHECK}
|
{$endif FPC_NO_GENERIC_STACK_CHECK}
|
||||||
|
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
EntryInformation: TEntryInformation;
|
EntryInformation: TEntryInformation;
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
var
|
var
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$ifdef FPC_HAS_RESSTRINITS}
|
{$ifdef FPC_HAS_RESSTRINITS}
|
||||||
FPCResStrInitTables : Pointer;public name '_FPC_ResStrInitTables';
|
FPCResStrInitTables : Pointer;public name '_FPC_ResStrInitTables';
|
||||||
{$endif FPC_HAS_RESSTRINITS}
|
{$endif FPC_HAS_RESSTRINITS}
|
||||||
FPCResourceStringTables : Pointer;public name '_FPC_ResourceStringTables';
|
FPCResourceStringTables : Pointer;public name '_FPC_ResourceStringTables';
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$ifdef FPC_HAS_RESSTRINITS}
|
{$ifdef FPC_HAS_RESSTRINITS}
|
||||||
FPCResStrInitTablesVar : record end; external name 'FPC_RESSTRINITTABLES';
|
FPCResStrInitTablesVar : record end; external name 'FPC_RESSTRINITTABLES';
|
||||||
FPCResStrInitTables : Pointer = @FPCResStrInitTablesVar;public name '_FPC_ResStrInitTables';
|
FPCResStrInitTables : Pointer = @FPCResStrInitTablesVar;public name '_FPC_ResStrInitTables';
|
||||||
{$endif FPC_HAS_RESSTRINITS}
|
{$endif FPC_HAS_RESSTRINITS}
|
||||||
FPCResourceStringTablesVar : record end; External Name 'FPC_RESOURCESTRINGTABLES';
|
FPCResourceStringTablesVar : record end; External Name 'FPC_RESOURCESTRINGTABLES';
|
||||||
FPCResourceStringTables : Pointer = @FPCResourceStringTablesVar;public name '_FPC_ResourceStringTables';
|
FPCResourceStringTables : Pointer = @FPCResourceStringTablesVar;public name '_FPC_ResourceStringTables';
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
procedure SetupEntryInformation(const info: TEntryInformation);[public,alias:'_FPC_SetupEntryInformation'];
|
procedure SetupEntryInformation(const info: TEntryInformation);[public,alias:'_FPC_SetupEntryInformation'];
|
||||||
begin
|
begin
|
||||||
EntryInformation := info;
|
EntryInformation := info;
|
||||||
@ -130,7 +130,7 @@ begin
|
|||||||
OSSetupEntryInformation(info);
|
OSSetupEntryInformation(info);
|
||||||
{$endif FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION}
|
{$endif FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION}
|
||||||
end;
|
end;
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
{ checks whether the given suggested size for the stack of the current
|
{ checks whether the given suggested size for the stack of the current
|
||||||
thread is acceptable. If this is the case, returns it unaltered.
|
thread is acceptable. If this is the case, returns it unaltered.
|
||||||
@ -872,10 +872,10 @@ type
|
|||||||
PInitFinalTable = ^TInitFinalTable;
|
PInitFinalTable = ^TInitFinalTable;
|
||||||
|
|
||||||
|
|
||||||
{$ifndef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifndef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
var
|
var
|
||||||
InitFinalTable : TInitFinalTable;external name 'INITFINAL';
|
InitFinalTable : TInitFinalTable;external name 'INITFINAL';
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
|
|
||||||
procedure fpc_InitializeUnits;[public,alias:'FPC_INITIALIZEUNITS']; compilerproc;
|
procedure fpc_InitializeUnits;[public,alias:'FPC_INITIALIZEUNITS']; compilerproc;
|
||||||
@ -887,17 +887,17 @@ var
|
|||||||
begin
|
begin
|
||||||
{ call cpu/fpu initialisation routine }
|
{ call cpu/fpu initialisation routine }
|
||||||
fpc_cpuinit;
|
fpc_cpuinit;
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$ifdef DEBUG}
|
{$ifdef DEBUG}
|
||||||
pt := PInitFinalTable(EntryInformation.InitFinalTable);
|
pt := PInitFinalTable(EntryInformation.InitFinalTable);
|
||||||
{$endif}
|
{$endif}
|
||||||
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$ifdef DEBUG}
|
{$ifdef DEBUG}
|
||||||
pt := @InitFinalTable;
|
pt := @InitFinalTable;
|
||||||
{$endif}
|
{$endif}
|
||||||
with InitFinalTable do
|
with InitFinalTable do
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
begin
|
begin
|
||||||
for i:=1 to ALUUInt(TableCount) do
|
for i:=1 to ALUUInt(TableCount) do
|
||||||
begin
|
begin
|
||||||
@ -930,11 +930,11 @@ procedure FinalizeUnits; external name 'FPC_FINALIZE_FUNC_TABLE';
|
|||||||
{$else CPUAVR}
|
{$else CPUAVR}
|
||||||
procedure FinalizeUnits;[public,alias:'FPC_FINALIZEUNITS'];
|
procedure FinalizeUnits;[public,alias:'FPC_FINALIZEUNITS'];
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with InitFinalTable do
|
with InitFinalTable do
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
begin
|
begin
|
||||||
while (InitCount>0) do
|
while (InitCount>0) do
|
||||||
begin
|
begin
|
||||||
|
@ -33,10 +33,10 @@ type
|
|||||||
end;
|
end;
|
||||||
PltvInitTablesTable = ^TltvInitTablesTable;
|
PltvInitTablesTable = ^TltvInitTablesTable;
|
||||||
|
|
||||||
{$ifndef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifndef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
var
|
var
|
||||||
ThreadvarTablesTable : TltvInitTablesTable; external name 'FPC_THREADVARTABLES';
|
ThreadvarTablesTable : TltvInitTablesTable; external name 'FPC_THREADVARTABLES';
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
procedure init_unit_threadvars (tableEntry : pltvInitEntry);
|
procedure init_unit_threadvars (tableEntry : pltvInitEntry);
|
||||||
begin
|
begin
|
||||||
@ -52,11 +52,11 @@ procedure init_all_unit_threadvars;
|
|||||||
var
|
var
|
||||||
i : longint;
|
i : longint;
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with PltvInitTablesTable(EntryInformation.ThreadvarTablesTable)^ do
|
with PltvInitTablesTable(EntryInformation.ThreadvarTablesTable)^ do
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with ThreadvarTablesTable do
|
with ThreadvarTablesTable do
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
begin
|
begin
|
||||||
{$ifdef DEBUG_MT}
|
{$ifdef DEBUG_MT}
|
||||||
WriteLn ('init_all_unit_threadvars (',count,') units');
|
WriteLn ('init_all_unit_threadvars (',count,') units');
|
||||||
@ -86,11 +86,11 @@ procedure copy_all_unit_threadvars;
|
|||||||
var
|
var
|
||||||
i: longint;
|
i: longint;
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with PltvInitTablesTable(EntryInformation.ThreadvarTablesTable)^ do
|
with PltvInitTablesTable(EntryInformation.ThreadvarTablesTable)^ do
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with ThreadvarTablesTable do
|
with ThreadvarTablesTable do
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
begin
|
begin
|
||||||
{$ifdef DEBUG_MT}
|
{$ifdef DEBUG_MT}
|
||||||
WriteLn ('copy_all_unit_threadvars (',count,') units');
|
WriteLn ('copy_all_unit_threadvars (',count,') units');
|
||||||
|
@ -875,10 +875,10 @@ type
|
|||||||
PInitFinalTable = ^TInitFinalTable;
|
PInitFinalTable = ^TInitFinalTable;
|
||||||
|
|
||||||
|
|
||||||
{$ifndef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifndef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
var
|
var
|
||||||
InitFinalTable : TInitFinalTable;external name 'INITFINAL';
|
InitFinalTable : TInitFinalTable;external name 'INITFINAL';
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
|
|
||||||
procedure fpc_InitializeUnits;[public,alias:'FPC_INITIALIZEUNITS']; compilerproc;
|
procedure fpc_InitializeUnits;[public,alias:'FPC_INITIALIZEUNITS']; compilerproc;
|
||||||
@ -890,17 +890,17 @@ var
|
|||||||
begin
|
begin
|
||||||
{ call cpu/fpu initialisation routine }
|
{ call cpu/fpu initialisation routine }
|
||||||
fpc_cpuinit;
|
fpc_cpuinit;
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$ifdef DEBUG}
|
{$ifdef DEBUG}
|
||||||
pt := PInitFinalTable(EntryInformation.InitFinalTable);
|
pt := PInitFinalTable(EntryInformation.InitFinalTable);
|
||||||
{$endif}
|
{$endif}
|
||||||
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$ifdef DEBUG}
|
{$ifdef DEBUG}
|
||||||
pt := @InitFinalTable;
|
pt := @InitFinalTable;
|
||||||
{$endif}
|
{$endif}
|
||||||
with InitFinalTable do
|
with InitFinalTable do
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
begin
|
begin
|
||||||
for i:=1 to TableCount do
|
for i:=1 to TableCount do
|
||||||
begin
|
begin
|
||||||
@ -929,11 +929,11 @@ end;
|
|||||||
|
|
||||||
procedure FinalizeUnits;[public,alias:'FPC_FINALIZEUNITS'];
|
procedure FinalizeUnits;[public,alias:'FPC_FINALIZEUNITS'];
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
with PInitFinalTable(EntryInformation.InitFinalTable)^ do
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
with InitFinalTable do
|
with InitFinalTable do
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
begin
|
begin
|
||||||
while (InitCount>0) do
|
while (InitCount>0) do
|
||||||
begin
|
begin
|
||||||
|
@ -94,12 +94,12 @@ var
|
|||||||
var
|
var
|
||||||
// public names are used by heaptrc unit
|
// public names are used by heaptrc unit
|
||||||
threadvarblocksize : dword; public name '_FPC_TlsSize';
|
threadvarblocksize : dword; public name '_FPC_TlsSize';
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
TLSKey : PDword = nil; public name '_FPC_TlsKey';
|
TLSKey : PDword = nil; public name '_FPC_TlsKey';
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
TLSKeyVar : DWord = $ffffffff;
|
TLSKeyVar : DWord = $ffffffff;
|
||||||
TLSKey : PDWord = @TLSKeyVar; public name '_FPC_TlsKey';
|
TLSKey : PDWord = @TLSKeyVar; public name '_FPC_TlsKey';
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
var
|
var
|
||||||
MainThreadIdWin32 : DWORD;
|
MainThreadIdWin32 : DWORD;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
{$ifdef FPC_INSSIDE_SYSINIT}
|
{$ifdef FPC_INSSIDE_SYSINIT}
|
||||||
|
|
||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
{$define FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$define FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
|
|
||||||
Const
|
Const
|
||||||
@ -51,9 +51,9 @@ procedure InitSystemThreads; external name '_FPC_InitSystemThreads';
|
|||||||
procedure SysAllocateThreadVars; external name '_FPC_SysAllocateThreadVars';
|
procedure SysAllocateThreadVars; external name '_FPC_SysAllocateThreadVars';
|
||||||
procedure InitHeap; external name '_FPC_InitHeap';
|
procedure InitHeap; external name '_FPC_InitHeap';
|
||||||
|
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
procedure SetupEntryInformation(const info: TEntryInformation); external name '_FPC_SetupEntryInformation';
|
procedure SetupEntryInformation(const info: TEntryInformation); external name '_FPC_SetupEntryInformation';
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
{$endif FPC_INSSIDE_SYSINIT}
|
{$endif FPC_INSSIDE_SYSINIT}
|
||||||
|
|
||||||
@ -77,12 +77,12 @@ procedure Exec_Tls_callback(Handle : pointer; reason : Dword; Reserved : pointer
|
|||||||
and the EntryInformation is a constant which sholud prevent troubles }
|
and the EntryInformation is a constant which sholud prevent troubles }
|
||||||
DLL_PROCESS_ATTACH:
|
DLL_PROCESS_ATTACH:
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
{ since this procedure is called before SetupEntryInformation and thus
|
{ since this procedure is called before SetupEntryInformation and thus
|
||||||
before EXE_Entry we need to setup the entry information here so that
|
before EXE_Entry we need to setup the entry information here so that
|
||||||
the threadvar handling can be correctly initialized }
|
the threadvar handling can be correctly initialized }
|
||||||
SetupEntryInformation(SysInitEntryInformation);
|
SetupEntryInformation(SysInitEntryInformation);
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
InitHeap;
|
InitHeap;
|
||||||
InitSystemThreads;
|
InitSystemThreads;
|
||||||
end;
|
end;
|
||||||
|
@ -356,11 +356,11 @@ Var
|
|||||||
DLLInitState : Longint = -1;
|
DLLInitState : Longint = -1;
|
||||||
DLLBuf : Jmp_buf;
|
DLLBuf : Jmp_buf;
|
||||||
|
|
||||||
function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntryInformation){$endif FPC_HAS_INDIRECT_MAIN_INFORMATION} : longbool; [public,alias:'_FPC_DLL_Entry'];
|
function Dll_entry{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}(const info : TEntryInformation){$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} : longbool; [public,alias:'_FPC_DLL_Entry'];
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
SetupEntryInformation(info);
|
SetupEntryInformation(info);
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
IsLibrary:=true;
|
IsLibrary:=true;
|
||||||
DllInitState:=DLLreason;
|
DllInitState:=DLLreason;
|
||||||
Dll_entry:=false; { return value is ignored, except when DLLreason=DLL_PROCESS_ATTACH }
|
Dll_entry:=false; { return value is ignored, except when DLLreason=DLL_PROCESS_ATTACH }
|
||||||
@ -371,11 +371,11 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry
|
|||||||
|
|
||||||
If SetJmp(DLLBuf) = 0 then
|
If SetJmp(DLLBuf) = 0 then
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
EntryInformation.PascalMain();
|
EntryInformation.PascalMain();
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
PascalMain;
|
PascalMain;
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
Dll_entry:=true;
|
Dll_entry:=true;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -660,12 +660,12 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
WStrInitTablesTable: PWStrInitTablesTable;
|
WStrInitTablesTable: PWStrInitTablesTable;
|
||||||
{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
WStrInitTablesTableVar: TWStrInitTablesTable; external name 'FPC_WIDEINITTABLES';
|
WStrInitTablesTableVar: TWStrInitTablesTable; external name 'FPC_WIDEINITTABLES';
|
||||||
WStrInitTablesTable: PWStrInitTablesTable = @WStrInitTablesTableVar;
|
WStrInitTablesTable: PWStrInitTablesTable = @WStrInitTablesTableVar;
|
||||||
{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
function GetACP:UINT; stdcall; external 'kernel32' name 'GetACP';
|
function GetACP:UINT; stdcall; external 'kernel32' name 'GetACP';
|
||||||
function GetConsoleCP:UINT; stdcall; external 'kernel32' name 'GetConsoleCP';
|
function GetConsoleCP:UINT; stdcall; external 'kernel32' name 'GetConsoleCP';
|
||||||
|
@ -20,7 +20,7 @@ interface
|
|||||||
{$define SYSTEMEXCEPTIONDEBUG}
|
{$define SYSTEMEXCEPTIONDEBUG}
|
||||||
{$endif SYSTEMDEBUG}
|
{$endif SYSTEMDEBUG}
|
||||||
|
|
||||||
{$define FPC_HAS_INDIRECT_MAIN_INFORMATION}
|
{$define FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||||
|
|
||||||
{$ifdef cpui386}
|
{$ifdef cpui386}
|
||||||
{$define Set_i386_Exception_handler}
|
{$define Set_i386_Exception_handler}
|
||||||
|
Loading…
Reference in New Issue
Block a user