From 280878b8a527ab73b539c2edde8e2e1eccfe1665 Mon Sep 17 00:00:00 2001 From: carl Date: Sun, 21 Apr 2002 15:52:58 +0000 Subject: [PATCH] + initialize some global variables --- rtl/go32v2/system.pp | 9 ++++++++- rtl/os2/system.pas | 7 ++++++- rtl/template/system.pp | 25 ++++++++++--------------- rtl/unix/sysunix.inc | 7 ++++++- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/rtl/go32v2/system.pp b/rtl/go32v2/system.pp index cdb4e70573..4ee706e64d 100644 --- a/rtl/go32v2/system.pp +++ b/rtl/go32v2/system.pp @@ -1483,6 +1483,10 @@ var temp_int : tseginfo; Begin StackBottom := __stkbottom; + { To be set if this is a GUI or console application } + IsConsole := TRUE; + { To be set if this is a library and not a program } + IsLibrary := FALSE; { save old int 0 and 75 } get_pm_interrupt($00,old_int00); get_pm_interrupt($75,old_int75); @@ -1525,7 +1529,10 @@ Begin End. { $Log$ - Revision 1.16 2002-04-12 17:34:05 carl + Revision 1.17 2002-04-21 15:52:58 carl + + initialize some global variables + + Revision 1.16 2002/04/12 17:34:05 carl + generic stack checking Revision 1.15 2002/03/11 19:10:33 peter diff --git a/rtl/os2/system.pas b/rtl/os2/system.pas index f3ac420645..bb05631466 100644 --- a/rtl/os2/system.pas +++ b/rtl/os2/system.pas @@ -929,6 +929,8 @@ end; var tib:Pthreadinfoblock; begin + IsConsole := TRUE; + IsLibrary := FALSE; {Determine the operating system we are running on.} {$ASMMODE INTEL} asm @@ -1019,7 +1021,10 @@ begin end. { $Log$ - Revision 1.20 2002-04-12 17:42:16 carl + Revision 1.21 2002-04-21 15:54:20 carl + + initialize some global variables + + Revision 1.20 2002/04/12 17:42:16 carl + generic stack checking Revision 1.19 2002/03/11 19:10:33 peter diff --git a/rtl/template/system.pp b/rtl/template/system.pp index 5c93d59a86..56563715a5 100644 --- a/rtl/template/system.pp +++ b/rtl/template/system.pp @@ -73,20 +73,6 @@ Procedure system_exit; begin end; -{***************************************************************************** - Stack check code -*****************************************************************************} -procedure int_stackcheck(stack_size:longint);[public,alias:'FPC_STACKCHECK']; -{ - called when trying to get local stack if the compiler directive $S - is set this function must preserve esi !!!! because esi is set by - the calling proc for methods it must preserve all registers !! - - With a 2048 byte safe area used to write to StdIo without crossing - the stack boundary -} -begin -end; {***************************************************************************** ParamStr/Randomize @@ -284,6 +270,12 @@ end; *****************************************************************************} Begin + { To be set if this is a GUI or console application } + IsConsole := TRUE; + { To be set if this is a library and not a program } + IsLibrary := FALSE; + StackBottom := SPtr - StackLength; + ExitCode := 0; { Setup heap } InitHeap; { Setup stdin, stdout and stderr } @@ -299,7 +291,10 @@ Begin End. { $Log$ - Revision 1.6 2001-06-19 20:46:56 hajny + Revision 1.7 2002-04-21 15:55:14 carl + + initialize some global variables + + Revision 1.6 2001/06/19 20:46:56 hajny * platform specific constants moved after systemh.inc, BeOS omission corrected Revision 1.5 2001/06/13 22:21:53 hajny diff --git a/rtl/unix/sysunix.inc b/rtl/unix/sysunix.inc index b405c79c1b..f6a4dd6e56 100644 --- a/rtl/unix/sysunix.inc +++ b/rtl/unix/sysunix.inc @@ -746,6 +746,8 @@ end; Begin + IsConsole := TRUE; + IsLibrary := FALSE; StackBottom := Sptr - StackLength; { Set up signals handlers } InstallSignals; @@ -765,7 +767,10 @@ End. { $Log$ - Revision 1.20 2002-04-12 17:43:28 carl + Revision 1.21 2002-04-21 15:55:00 carl + + initialize some global variables + + Revision 1.20 2002/04/12 17:43:28 carl + generic stack checking Revision 1.19 2002/03/11 19:10:33 peter