+ exceptions in system is default now

This commit is contained in:
pierre 2000-03-13 19:45:20 +00:00
parent 47a02cf8d3
commit 5b52f307e6
4 changed files with 38 additions and 22 deletions

View File

@ -141,6 +141,12 @@ SYSTEMUNIT=system
ifdef EXCEPTIONS_IN_SYSTEM
override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
endif
# Insert exception handler in system unit
ifdef NO_EXCEPTIONS_IN_SYSTEM
override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
endif
#####################################################################
# FPCDIR Setting
#####################################################################
@ -226,7 +232,7 @@ endif
# Info
INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
#####################################################################
# Post Settings
@ -1233,4 +1239,4 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
# Other system-dependent RTL Units
#
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)

View File

@ -45,6 +45,12 @@ SYSTEMUNIT=system
ifdef EXCEPTIONS_IN_SYSTEM
override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
endif
# Insert exception handler in system unit
ifdef NO_EXCEPTIONS_IN_SYSTEM
override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
endif
[postsettings]
SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
@ -167,4 +173,3 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
#
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)

View File

@ -18,7 +18,7 @@
{$GOTO ON}
{$define IN_DPMIEXCP_UNIT}
{$ifndef NO_EXCEPTIONS_IN_SYSTEM}
{ $ define EXCEPTIONS_IN_SYSTEM}
{$define EXCEPTIONS_IN_SYSTEM}
{$endif NO_EXCEPTIONS_IN_SYSTEM}
Unit DpmiExcp;
@ -32,8 +32,10 @@ Unit DpmiExcp;
interface
{$ifdef NO_EXCEPTIONS_IN_SYSTEM}
uses
go32;
{$endif NO_EXCEPTIONS_IN_SYSTEM}
{$endif ndef IN_SYSTEM}
{ No stack checking ! }
@ -167,17 +169,13 @@ function __djgpp_set_sigquit_key(new_key : longint) : longint;cdecl;
external name '___djgpp_set_sigquit_key';
function __djgpp__traceback_exit(sig : longint) : longint;cdecl;
external name '__djgpp__traceback_exit';
{$endif CREATE_C_FUNCTIONS}
{$else CREATE_C_FUNCTIONS}
var
v2prt0_ds_alias : word;external name '___v2prt0_ds_alias';
djgpp_ds_alias : word;external name '___djgpp_ds_alias';
djgpp_exception_state_ptr : pexception_state;external name '___djgpp_exception_state_ptr';
endtext : longint;external name '_etext';
starttext : longint;external name 'start';
djgpp_old_kbd : tseginfo;external name '___djgpp_old_kbd';
djgpp_hw_lock_start : longint;external name '___djgpp_hw_lock_start';
djgpp_hw_lock_end : longint;external name '___djgpp_hw_lock_end';
djgpp_hwint_flags : longint;external name '___djgpp_hwint_flags';
djgpp_dos_sel : word;external name '___djgpp_dos_sel';
djgpp_exception_table : array[0..0] of pointer;external name '___djgpp_exception_table';
dosmemselector : word;external name '_core_selector';
@ -188,7 +186,12 @@ procedure djgpp_npx_hdlr;external name '___djgpp_npx_hdlr';
procedure djgpp_kbd_hdlr;external name '___djgpp_kbd_hdlr';
procedure djgpp_kbd_hdlr_pc98;external name '___djgpp_kbd_hdlr_pc98';
procedure djgpp_cbrk_hdlr;external name '___djgpp_cbrk_hdlr';
{$endif CREATE_C_FUNCTIONS}
var
endtext : longint;external name '_etext';
starttext : longint;external name 'start';
djgpp_exception_state_ptr : pexception_state;external name '___djgpp_exception_state_ptr';
djgpp_hwint_flags : longint;external name '___djgpp_hwint_flags';
{$ifdef CREATE_C_FUNCTIONS}
var
@ -1095,12 +1098,12 @@ begin
end;
{$ifdef CREATE_C_FUNCTIONS}
var
_swap_in : pointer;external name '_swap_in';
_swap_out : pointer;external name '_swap_out';
_exception_exit : pointer;external name '_exception_exit';
{$ifdef CREATE_C_FUNCTIONS}
procedure dpmiexcp_exit{(status : longint)};[public,alias : 'excep_exit'];
{ We need to restore hardware interrupt handlers even if somebody calls
`_exit' directly, or else we crash the machine in nested programs.
@ -1133,17 +1136,9 @@ begin
djgpp_exception_toggle;
end;
{$else CREATE_C_FUNCTIONS}
procedure dpmiexcp_exit;external name 'excep_exit';
procedure dpmi_swap_in;external name 'swap_in';
procedure dpmi_swap_out;external name 'swap_out';
{$endif CREATE_C_FUNCTIONS}
var
___djgpp_app_DS : word;external name '___djgpp_app_DS';
___djgpp_our_DS : word;external name '___djgpp_our_DS';
{$ifdef CREATE_C_FUNCTIONS}
__djgpp_sigint_mask : word;external name '___djgpp_sigint_mask';
__djgpp_sigint_key : word;external name '___djgpp_sigint_key';
__djgpp_sigquit_mask : word;external name '___djgpp_sigquit_mask';
@ -1244,6 +1239,7 @@ begin
{ This exits, does not return. }
do_faulting_finish_message(djgpp_exception_state_ptr=@fake_exception);
___exit(-1);
__djgpp__traceback_exit:=0;
end;
procedure djgpp_exception_setup;
@ -1426,7 +1422,10 @@ end;
{$endif IN_SYSTEM}
{
$Log$
Revision 1.13 2000-03-10 09:53:17 pierre
Revision 1.14 2000-03-13 19:45:21 pierre
+ exceptions in system is default now
Revision 1.13 2000/03/10 09:53:17 pierre
* some clean up for exceptions in system
Revision 1.12 2000/03/09 09:15:10 pierre

View File

@ -25,6 +25,10 @@ interface
- list of args
- list of env variables (PM) }
{$ifndef NO_EXCEPTIONS_IN_SYSTEM}
{$define EXCEPTIONS_IN_SYSTEM}
{$endif NO_EXCEPTIONS_IN_SYSTEM}
{ include system-independent routine headers }
{$I systemh.inc}
@ -1350,7 +1354,6 @@ end;
{$I thread.inc}
{$endif MT}
{ define EXCEPTIONS_IN_SYSTEM}
{$ifndef RTLLITE}
{$ifdef EXCEPTIONS_IN_SYSTEM}
{$define IN_SYSTEM}
@ -1403,7 +1406,10 @@ Begin
End.
{
$Log$
Revision 1.35 2000-03-09 09:15:10 pierre
Revision 1.36 2000-03-13 19:45:21 pierre
+ exceptions in system is default now
Revision 1.35 2000/03/09 09:15:10 pierre
+ support for djgpp v2.03 (added some new functions that are in v2.03 ofdpmiexcp.c)
+ code to integrate exception support inside the system unit