with Ada.Exceptions; use Ada.Exceptions;
with GNAT.Command_Line; use GNAT.Command_Line;
+with GNAT.Ctrl_C;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.OS_Lib; use GNAT.OS_Lib;
-- is not always explicit and considering it is important when -f and -a
-- are used.
- type Sigint_Handler is access procedure;
- pragma Convention (C, Sigint_Handler);
-
- procedure Install_Int_Handler (Handler : Sigint_Handler);
- pragma Import (C, Install_Int_Handler, "__gnat_install_int_handler");
- -- Called by Gnatmake to install the SIGINT handler below
-
procedure Sigint_Intercepted;
- pragma Convention (C, Sigint_Intercepted);
pragma No_Return (Sigint_Intercepted);
-- Called when the program is interrupted by Ctrl-C to delete the
-- temporary mapping files and configuration pragmas files.
pragma Warnings (Off, Discard);
begin
- Install_Int_Handler (Sigint_Intercepted'Access);
+ GNAT.Ctrl_C.Install_Handler (Sigint_Intercepted'Access);
Do_Compile_Step := True;
Do_Bind_Step := True;