[multiple changes]
2009-11-30 Thomas Quinot <quinot@adacore.com> * s-crtl.ads, g-stseme.adb, s-fileio.adb (System.CRTL.strerror): Change return type to Interfaces.C.Strings.chars_ptr to eliminate need for dubious unchecked conversion at call sites. * s-errrep.adb, s-errrep.ads, Makefile.rtl (System.Error_Reporting): Remove obsolete, unused runtime unit. * gcc-interface/Make-lang.in: Update dependencies. * gcc-interface/Makefile.in: Remove VMS specialization of s-crtl, not required anymore. 2009-11-30 Vincent Celier <celier@adacore.com> * gnatlink.adb: Delete an eventual existing executable file, in case it is a symbolic link, to avoid modifying the target of the symbolic link. 2009-11-30 Bob Duff <duff@adacore.com> * socket.c: Add accessor functions for struct servent. * g-sothco.ads (Servent): Declare interfaces to C accessor functions for struct servent. * g-socket.adb (To_Service_Entry): Use accessor functions for struct servent. 2009-11-30 Robert Dewar <dewar@adacore.com> * g-arrspl.adb: Minor reformatting * g-dyntab.adb: Add missing pragma Compiler_Unit From-SVN: r154769
This commit is contained in:
parent
3a3173c9d6
commit
1dfddbb4d3
15 changed files with 436 additions and 305 deletions
|
@ -1,3 +1,32 @@
|
|||
2009-11-30 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* s-crtl.ads, g-stseme.adb, s-fileio.adb (System.CRTL.strerror): Change
|
||||
return type to Interfaces.C.Strings.chars_ptr to eliminate need for
|
||||
dubious unchecked conversion at call sites.
|
||||
* s-errrep.adb, s-errrep.ads, Makefile.rtl (System.Error_Reporting):
|
||||
Remove obsolete, unused runtime unit.
|
||||
* gcc-interface/Make-lang.in: Update dependencies.
|
||||
* gcc-interface/Makefile.in: Remove VMS specialization of s-crtl, not
|
||||
required anymore.
|
||||
|
||||
2009-11-30 Vincent Celier <celier@adacore.com>
|
||||
|
||||
* gnatlink.adb: Delete an eventual existing executable file, in case it
|
||||
is a symbolic link, to avoid modifying the target of the symbolic link.
|
||||
|
||||
2009-11-30 Bob Duff <duff@adacore.com>
|
||||
|
||||
* socket.c: Add accessor functions for struct servent.
|
||||
* g-sothco.ads (Servent): Declare interfaces to C accessor functions
|
||||
for struct servent.
|
||||
* g-socket.adb (To_Service_Entry): Use accessor functions for struct
|
||||
servent.
|
||||
|
||||
2009-11-30 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* g-arrspl.adb: Minor reformatting
|
||||
* g-dyntab.adb: Add missing pragma Compiler_Unit
|
||||
|
||||
2009-11-30 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* s-crtl.ads, s-oscons-tmplt.c: Fix support for VMS
|
||||
|
|
|
@ -434,7 +434,6 @@ GNATRTL_NONTASKING_OBJS= \
|
|||
s-crc32$(objext) \
|
||||
s-direio$(objext) \
|
||||
s-dsaser$(objext) \
|
||||
s-errrep$(objext) \
|
||||
s-exctab$(objext) \
|
||||
s-except$(objext) \
|
||||
s-exnint$(objext) \
|
||||
|
|
|
@ -238,10 +238,10 @@ package body GNAT.Array_Split is
|
|||
loop
|
||||
if K > Count_Sep then
|
||||
|
||||
-- No more separators, last slice ends at the end of the source
|
||||
-- string.
|
||||
-- No more separators, last slice ends at end of source string
|
||||
|
||||
Stop := S.Source'Last;
|
||||
|
||||
else
|
||||
Stop := S.Indexes (K) - 1;
|
||||
end if;
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
pragma Compiler_Unit;
|
||||
|
||||
with GNAT.Heap_Sort_G;
|
||||
with System; use System;
|
||||
with System.Memory; use System.Memory;
|
||||
|
@ -64,10 +66,7 @@ package body GNAT.Dynamic_Tables is
|
|||
-- Allocate --
|
||||
--------------
|
||||
|
||||
procedure Allocate
|
||||
(T : in out Instance;
|
||||
Num : Integer := 1)
|
||||
is
|
||||
procedure Allocate (T : in out Instance; Num : Integer := 1) is
|
||||
begin
|
||||
T.P.Last_Val := T.P.Last_Val + Num;
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ package body GNAT.Sockets is
|
|||
function To_Host_Entry (E : Hostent) return Host_Entry_Type;
|
||||
-- Conversion function
|
||||
|
||||
function To_Service_Entry (E : Servent) return Service_Entry_Type;
|
||||
function To_Service_Entry (E : Servent_Access) return Service_Entry_Type;
|
||||
-- Conversion function
|
||||
|
||||
function To_Timeval (Val : Timeval_Duration) return Timeval;
|
||||
|
@ -970,7 +970,7 @@ package body GNAT.Sockets is
|
|||
|
||||
-- Translate from the C format to the API format
|
||||
|
||||
return To_Service_Entry (Res);
|
||||
return To_Service_Entry (Res'Unchecked_Access);
|
||||
end Get_Service_By_Name;
|
||||
|
||||
-------------------------
|
||||
|
@ -996,7 +996,7 @@ package body GNAT.Sockets is
|
|||
|
||||
-- Translate from the C format to the API format
|
||||
|
||||
return To_Service_Entry (Res);
|
||||
return To_Service_Entry (Res'Unchecked_Access);
|
||||
end Get_Service_By_Port;
|
||||
|
||||
---------------------
|
||||
|
@ -2352,17 +2352,17 @@ package body GNAT.Sockets is
|
|||
-- To_Service_Entry --
|
||||
----------------------
|
||||
|
||||
function To_Service_Entry (E : Servent) return Service_Entry_Type is
|
||||
function To_Service_Entry (E : Servent_Access) return Service_Entry_Type is
|
||||
use type C.size_t;
|
||||
|
||||
Official : constant String := C.Strings.Value (E.S_Name);
|
||||
Official : constant String := C.Strings.Value (Servent_S_Name (E));
|
||||
|
||||
Aliases : constant Chars_Ptr_Array :=
|
||||
Chars_Ptr_Pointers.Value (E.S_Aliases);
|
||||
Chars_Ptr_Pointers.Value (Servent_S_Aliases (E));
|
||||
-- S_Aliases points to a list of name aliases. The list is
|
||||
-- terminated by a NULL pointer.
|
||||
|
||||
Protocol : constant String := C.Strings.Value (E.S_Proto);
|
||||
Protocol : constant String := C.Strings.Value (Servent_S_Proto (E));
|
||||
|
||||
Result : Service_Entry_Type (Aliases_Length => Aliases'Length - 1);
|
||||
-- The last element is a null pointer
|
||||
|
@ -2383,7 +2383,7 @@ package body GNAT.Sockets is
|
|||
end loop;
|
||||
|
||||
Result.Port :=
|
||||
Port_Type (Network_To_Short (C.unsigned_short (E.S_Port)));
|
||||
Port_Type (Network_To_Short (C.unsigned_short (Servent_S_Port (E))));
|
||||
|
||||
Result.Protocol := To_Name (Protocol);
|
||||
return Result;
|
||||
|
|
|
@ -212,19 +212,24 @@ package GNAT.Sockets.Thin_Common is
|
|||
C.Strings.Null_Ptr);
|
||||
-- Arrays of C (char *)
|
||||
|
||||
type Servent is record
|
||||
S_Name : C.Strings.chars_ptr;
|
||||
S_Aliases : Chars_Ptr_Pointers.Pointer;
|
||||
S_Port : C.int;
|
||||
S_Proto : C.Strings.chars_ptr;
|
||||
end record;
|
||||
pragma Convention (C, Servent);
|
||||
-- Service entry
|
||||
sizeof_servent : constant C.size_t;
|
||||
pragma Import (C, sizeof_servent, "__gnat_sizeof_servent");
|
||||
type Servent is array (1 .. sizeof_servent) of C.char;
|
||||
for Servent'Alignment use 8;
|
||||
-- Service entry. This is an opaque type used only via the following
|
||||
-- accessor functions, because 'struct servent' has different layouts on
|
||||
-- different platforms.
|
||||
|
||||
type Servent_Access is access all Servent;
|
||||
pragma Convention (C, Servent_Access);
|
||||
-- Access to service entry
|
||||
|
||||
function Servent_S_Name (E : Servent_Access) return C.Strings.chars_ptr;
|
||||
function Servent_S_Aliases (E : Servent_Access)
|
||||
return Chars_Ptr_Pointers.Pointer;
|
||||
function Servent_S_Port (E : Servent_Access) return C.int;
|
||||
function Servent_S_Proto (E : Servent_Access) return C.Strings.chars_ptr;
|
||||
|
||||
------------------
|
||||
-- Host entries --
|
||||
------------------
|
||||
|
@ -335,4 +340,9 @@ private
|
|||
pragma Import (C, Reset_Socket_Set, "__gnat_reset_socket_set");
|
||||
pragma Import (C, C_Ioctl, "__gnat_socket_ioctl");
|
||||
pragma Import (C, Inet_Pton, SOSC.Inet_Pton_Linkname);
|
||||
|
||||
pragma Import (C, Servent_S_Name, "__gnat_servent_s_name");
|
||||
pragma Import (C, Servent_S_Aliases, "__gnat_servent_s_aliases");
|
||||
pragma Import (C, Servent_S_Port, "__gnat_servent_s_port");
|
||||
pragma Import (C, Servent_S_Proto, "__gnat_servent_s_proto");
|
||||
end GNAT.Sockets.Thin_Common;
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
-- since on that platform socket errno values are distinct from the system
|
||||
-- ones: there is a specific variant of this function in g-socthi-mingw.adb.
|
||||
|
||||
with Ada.Unchecked_Conversion;
|
||||
|
||||
with System.CRTL;
|
||||
|
||||
separate (GNAT.Sockets.Thin)
|
||||
|
@ -48,21 +46,9 @@ function Socket_Error_Message
|
|||
(Errno : Integer) return C.Strings.chars_ptr
|
||||
is
|
||||
use type Interfaces.C.Strings.chars_ptr;
|
||||
|
||||
pragma Warnings (Off);
|
||||
function To_Chars_Ptr is
|
||||
new Ada.Unchecked_Conversion
|
||||
(System.Address, Interfaces.C.Strings.chars_ptr);
|
||||
-- On VMS, the compiler warns because System.Address is 64 bits, but
|
||||
-- chars_ptr is 32 bits. It should be safe, though, because strerror
|
||||
-- will return a 32-bit pointer.
|
||||
pragma Warnings (On);
|
||||
|
||||
C_Msg : C.Strings.chars_ptr;
|
||||
C_Msg : constant C.Strings.chars_ptr := System.CRTL.strerror (Errno);
|
||||
|
||||
begin
|
||||
C_Msg := To_Chars_Ptr (System.CRTL.strerror (Errno));
|
||||
|
||||
if C_Msg = C.Strings.Null_Ptr then
|
||||
return Unknown_System_Error;
|
||||
else
|
||||
|
|
|
@ -116,60 +116,226 @@ GNAT1_C_OBJS = ada/b_gnat1.o ada/adadecode.o ada/adaint.o ada/cstreams.o \
|
|||
|
||||
# Object files from Ada sources that are used by gnat1
|
||||
|
||||
GNAT_ADA_OBJS = ada/s-bitops.o ada/ada.o ada/a-charac.o ada/a-chlat1.o ada/a-except.o \
|
||||
ada/a-elchha.o ada/a-ioexce.o \
|
||||
ada/s-memory.o ada/s-carun8.o ada/s-casuti.o ada/s-strcom.o ada/s-strhas.o \
|
||||
ada/s-purexc.o ada/s-htable.o ada/s-traceb.o ada/s-mastop.o ada/ali.o \
|
||||
ada/alloc.o ada/atree.o ada/butil.o ada/casing.o ada/checks.o ada/comperr.o \
|
||||
ada/csets.o ada/cstand.o ada/debug.o ada/debug_a.o ada/einfo.o ada/elists.o \
|
||||
ada/errout.o ada/erroutc.o ada/err_vars.o ada/eval_fat.o ada/exp_attr.o \
|
||||
ada/exp_ch11.o ada/exp_ch12.o ada/exp_ch13.o ada/exp_ch2.o ada/exp_ch3.o \
|
||||
ada/exp_ch4.o ada/exp_ch5.o ada/exp_ch6.o ada/exp_ch7.o ada/exp_ch8.o \
|
||||
ada/exp_ch9.o ada/exp_code.o ada/exp_dbug.o ada/exp_disp.o ada/exp_atag.o \
|
||||
ada/exp_dist.o ada/exp_fixd.o ada/exp_aggr.o ada/exp_imgv.o ada/exp_intr.o \
|
||||
ada/exp_pakd.o ada/exp_prag.o ada/exp_sel.o ada/exp_smem.o ada/exp_strm.o \
|
||||
ada/exp_tss.o ada/exp_util.o ada/exp_vfpt.o ada/expander.o ada/fname.o \
|
||||
ada/fname-uf.o ada/fmap.o ada/freeze.o ada/frontend.o ada/gnat.o \
|
||||
ada/g-byorma.o \
|
||||
ada/g-hesora.o ada/g-htable.o ada/s-os_lib.o \
|
||||
ada/g-speche.o ada/g-spchge.o ada/g-u3spch.o ada/s-string.o \
|
||||
ada/s-utf_32.o ada/s-crc32.o ada/get_targ.o \
|
||||
ada/get_scos.o \
|
||||
ada/gnatvsn.o ada/hlo.o ada/hostparm.o ada/impunit.o ada/interfac.o \
|
||||
ada/itypes.o ada/inline.o ada/krunch.o ada/lib.o ada/layout.o \
|
||||
ada/lib-load.o ada/lib-util.o ada/lib-xref.o ada/lib-writ.o ada/live.o \
|
||||
ada/namet.o ada/namet-sp.o \
|
||||
ada/nlists.o ada/nmake.o ada/opt.o ada/osint.o ada/osint-c.o \
|
||||
ada/output.o \
|
||||
ada/par_sco.o \
|
||||
ada/par.o ada/prep.o ada/prepcomp.o ada/put_scos.o \
|
||||
ada/repinfo.o ada/restrict.o \
|
||||
ada/rident.o ada/rtsfind.o \
|
||||
ada/s-addope.o ada/s-assert.o ada/s-parame.o ada/s-stache.o \
|
||||
ada/s-stalib.o ada/s-imgenu.o ada/s-imenne.o ada/s-stoele.o ada/s-soflin.o \
|
||||
ada/s-except.o ada/s-exctab.o \
|
||||
ada/s-secsta.o ada/s-strops.o ada/s-sopco3.o ada/s-sopco4.o ada/s-sopco5.o \
|
||||
ada/s-traent.o ada/s-wchcnv.o ada/s-wchcon.o ada/s-wchjis.o \
|
||||
ada/s-conca2.o ada/s-conca3.o ada/s-conca4.o ada/s-conca5.o \
|
||||
ada/s-conca6.o ada/s-conca7.o ada/s-conca8.o ada/s-conca9.o \
|
||||
ada/s-unstyp.o ada/scans.o ada/scng.o ada/scn.o ada/sdefault.o ada/sem.o \
|
||||
ada/scos.o \
|
||||
ada/sem_aggr.o ada/sem_attr.o ada/sem_aux.o \
|
||||
ada/sem_cat.o ada/sem_ch10.o ada/sem_ch11.o \
|
||||
ada/sem_ch12.o ada/sem_ch13.o ada/sem_ch2.o ada/sem_ch3.o ada/sem_ch4.o \
|
||||
ada/sem_ch5.o ada/sem_ch6.o ada/sem_ch7.o ada/sem_ch8.o ada/sem_ch9.o \
|
||||
ada/sem_case.o ada/sem_disp.o ada/sem_dist.o ada/sem_elab.o ada/sem_elim.o \
|
||||
ada/sem_eval.o ada/sem_intr.o ada/sem_mech.o ada/sem_prag.o ada/sem_res.o \
|
||||
ada/sem_scil.o ada/sem_smem.o ada/sem_type.o ada/sem_util.o ada/sem_vfpt.o \
|
||||
ada/sem_warn.o ada/sinfo-cn.o ada/sinfo.o ada/sinput.o ada/sinput-d.o \
|
||||
ada/sinput-l.o ada/snames.o ada/sprint.o ada/stand.o ada/stringt.o \
|
||||
ada/style.o ada/styleg.o ada/switch.o ada/switch-c.o \
|
||||
ada/stylesw.o ada/validsw.o ada/system.o ada/table.o ada/targparm.o \
|
||||
ada/tbuild.o ada/tree_gen.o ada/tree_in.o \
|
||||
ada/tree_io.o ada/treepr.o ada/treeprs.o \
|
||||
ada/ttypef.o ada/ttypes.o ada/types.o ada/uintp.o ada/uname.o ada/urealp.o \
|
||||
ada/usage.o ada/widechar.o ada/s-crtl.o ada/seh_init.o ada/targext.o \
|
||||
ada/s-restri.o
|
||||
GNAT_ADA_OBJS = \
|
||||
ada/a-charac.o \
|
||||
ada/a-chlat1.o \
|
||||
ada/a-elchha.o \
|
||||
ada/a-except.o \
|
||||
ada/a-ioexce.o \
|
||||
ada/ada.o \
|
||||
ada/ali.o \
|
||||
ada/alloc.o \
|
||||
ada/atree.o \
|
||||
ada/butil.o \
|
||||
ada/casing.o \
|
||||
ada/checks.o \
|
||||
ada/comperr.o \
|
||||
ada/csets.o \
|
||||
ada/cstand.o \
|
||||
ada/debug.o \
|
||||
ada/debug_a.o \
|
||||
ada/einfo.o \
|
||||
ada/elists.o \
|
||||
ada/err_vars.o \
|
||||
ada/errout.o \
|
||||
ada/erroutc.o \
|
||||
ada/eval_fat.o \
|
||||
ada/exp_aggr.o \
|
||||
ada/exp_atag.o \
|
||||
ada/exp_attr.o \
|
||||
ada/exp_ch11.o \
|
||||
ada/exp_ch12.o \
|
||||
ada/exp_ch13.o \
|
||||
ada/exp_ch2.o \
|
||||
ada/exp_ch3.o \
|
||||
ada/exp_ch4.o \
|
||||
ada/exp_ch5.o \
|
||||
ada/exp_ch6.o \
|
||||
ada/exp_ch7.o \
|
||||
ada/exp_ch8.o \
|
||||
ada/exp_ch9.o \
|
||||
ada/exp_code.o \
|
||||
ada/exp_dbug.o \
|
||||
ada/exp_disp.o \
|
||||
ada/exp_dist.o \
|
||||
ada/exp_fixd.o \
|
||||
ada/exp_imgv.o \
|
||||
ada/exp_intr.o \
|
||||
ada/exp_pakd.o \
|
||||
ada/exp_prag.o \
|
||||
ada/exp_sel.o \
|
||||
ada/exp_smem.o \
|
||||
ada/exp_strm.o \
|
||||
ada/exp_tss.o \
|
||||
ada/exp_util.o \
|
||||
ada/exp_vfpt.o \
|
||||
ada/expander.o \
|
||||
ada/fmap.o \
|
||||
ada/fname-uf.o \
|
||||
ada/fname.o \
|
||||
ada/freeze.o \
|
||||
ada/frontend.o \
|
||||
ada/g-byorma.o \
|
||||
ada/g-hesora.o \
|
||||
ada/g-htable.o \
|
||||
ada/g-spchge.o \
|
||||
ada/g-speche.o \
|
||||
ada/g-u3spch.o \
|
||||
ada/get_scos.o \
|
||||
ada/get_targ.o \
|
||||
ada/gnat.o \
|
||||
ada/gnatvsn.o \
|
||||
ada/hlo.o \
|
||||
ada/hostparm.o \
|
||||
ada/i-c.o \
|
||||
ada/i-cstrin.o \
|
||||
ada/impunit.o \
|
||||
ada/inline.o \
|
||||
ada/instpar.o \
|
||||
ada/interfac.o \
|
||||
ada/itypes.o \
|
||||
ada/krunch.o \
|
||||
ada/layout.o \
|
||||
ada/lib-load.o \
|
||||
ada/lib-util.o \
|
||||
ada/lib-writ.o \
|
||||
ada/lib-xref.o \
|
||||
ada/lib.o \
|
||||
ada/live.o \
|
||||
ada/namet-sp.o \
|
||||
ada/namet.o \
|
||||
ada/nlists.o \
|
||||
ada/nmake.o \
|
||||
ada/opt.o \
|
||||
ada/osint-c.o \
|
||||
ada/osint.o \
|
||||
ada/output.o \
|
||||
ada/par.o \
|
||||
ada/par_sco.o \
|
||||
ada/prep.o \
|
||||
ada/prepcomp.o \
|
||||
ada/put_scos.o \
|
||||
ada/repinfo.o \
|
||||
ada/restrict.o \
|
||||
ada/rident.o \
|
||||
ada/rtsfind.o \
|
||||
ada/s-addope.o \
|
||||
ada/s-assert.o \
|
||||
ada/s-bitops.o \
|
||||
ada/s-carun8.o \
|
||||
ada/s-casuti.o \
|
||||
ada/s-conca2.o \
|
||||
ada/s-conca3.o \
|
||||
ada/s-conca4.o \
|
||||
ada/s-conca5.o \
|
||||
ada/s-conca6.o \
|
||||
ada/s-conca7.o \
|
||||
ada/s-conca8.o \
|
||||
ada/s-conca9.o \
|
||||
ada/s-crc32.o \
|
||||
ada/s-crtl.o \
|
||||
ada/s-except.o \
|
||||
ada/s-exctab.o \
|
||||
ada/s-htable.o \
|
||||
ada/s-imenne.o \
|
||||
ada/s-imgenu.o \
|
||||
ada/s-mastop.o \
|
||||
ada/s-memory.o \
|
||||
ada/s-os_lib.o \
|
||||
ada/s-parame.o \
|
||||
ada/s-purexc.o \
|
||||
ada/s-restri.o \
|
||||
ada/s-secsta.o \
|
||||
ada/s-soflin.o \
|
||||
ada/s-sopco3.o \
|
||||
ada/s-sopco4.o \
|
||||
ada/s-sopco5.o \
|
||||
ada/s-stache.o \
|
||||
ada/s-stalib.o \
|
||||
ada/s-stoele.o \
|
||||
ada/s-strcom.o \
|
||||
ada/s-strhas.o \
|
||||
ada/s-string.o \
|
||||
ada/s-strops.o \
|
||||
ada/s-traceb.o \
|
||||
ada/s-traent.o \
|
||||
ada/s-unstyp.o \
|
||||
ada/s-utf_32.o \
|
||||
ada/s-wchcnv.o \
|
||||
ada/s-wchcon.o \
|
||||
ada/s-wchjis.o \
|
||||
ada/scans.o \
|
||||
ada/scn.o \
|
||||
ada/scng.o \
|
||||
ada/scos.o \
|
||||
ada/sdefault.o \
|
||||
ada/seh_init.o \
|
||||
ada/sem.o \
|
||||
ada/sem_aggr.o \
|
||||
ada/sem_attr.o \
|
||||
ada/sem_aux.o \
|
||||
ada/sem_case.o \
|
||||
ada/sem_cat.o \
|
||||
ada/sem_ch10.o \
|
||||
ada/sem_ch11.o \
|
||||
ada/sem_ch12.o \
|
||||
ada/sem_ch13.o \
|
||||
ada/sem_ch2.o \
|
||||
ada/sem_ch3.o \
|
||||
ada/sem_ch4.o \
|
||||
ada/sem_ch5.o \
|
||||
ada/sem_ch6.o \
|
||||
ada/sem_ch7.o \
|
||||
ada/sem_ch8.o \
|
||||
ada/sem_ch9.o \
|
||||
ada/sem_disp.o \
|
||||
ada/sem_dist.o \
|
||||
ada/sem_elab.o \
|
||||
ada/sem_elim.o \
|
||||
ada/sem_eval.o \
|
||||
ada/sem_intr.o \
|
||||
ada/sem_mech.o \
|
||||
ada/sem_prag.o \
|
||||
ada/sem_res.o \
|
||||
ada/sem_scil.o \
|
||||
ada/sem_smem.o \
|
||||
ada/sem_type.o \
|
||||
ada/sem_util.o \
|
||||
ada/sem_vfpt.o \
|
||||
ada/sem_warn.o \
|
||||
ada/sinfo-cn.o \
|
||||
ada/sinfo.o \
|
||||
ada/sinput-d.o \
|
||||
ada/sinput-l.o \
|
||||
ada/sinput.o \
|
||||
ada/snames.o \
|
||||
ada/sprint.o \
|
||||
ada/stand.o \
|
||||
ada/stringt.o \
|
||||
ada/style.o \
|
||||
ada/styleg.o \
|
||||
ada/stylesw.o \
|
||||
ada/switch-c.o \
|
||||
ada/switch.o \
|
||||
ada/system.o \
|
||||
ada/table.o \
|
||||
ada/targext.o \
|
||||
ada/targparm.o \
|
||||
ada/tbuild.o \
|
||||
ada/tree_gen.o \
|
||||
ada/tree_in.o \
|
||||
ada/tree_io.o \
|
||||
ada/treepr.o \
|
||||
ada/treeprs.o \
|
||||
ada/ttypef.o \
|
||||
ada/ttypes.o \
|
||||
ada/types.o \
|
||||
ada/uintp.o \
|
||||
ada/uname.o \
|
||||
ada/urealp.o \
|
||||
ada/usage.o \
|
||||
ada/validsw.o \
|
||||
ada/widechar.o
|
||||
|
||||
# Object files for gnat executables
|
||||
GNAT1_ADA_OBJS = $(GNAT_ADA_OBJS) ada/back_end.o ada/gnat1drv.o
|
||||
|
@ -224,6 +390,8 @@ GNATBIND_OBJS = \
|
|||
ada/gnatbind.o \
|
||||
ada/gnatvsn.o \
|
||||
ada/hostparm.o \
|
||||
ada/i-c.o \
|
||||
ada/i-cstrin.o \
|
||||
ada/interfac.o \
|
||||
ada/lib.o \
|
||||
ada/namet.o \
|
||||
|
@ -1204,10 +1372,11 @@ ada/back_end.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
|
||||
ada/switch.ads ada/switch-c.ads ada/system.ads ada/s-exctab.ads \
|
||||
ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
|
||||
ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
|
||||
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
|
||||
ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
|
||||
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
|
||||
ada/s-parame.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
|
||||
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
|
||||
ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
|
||||
ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
|
||||
ada/urealp.ads ada/widechar.ads
|
||||
|
||||
ada/bcheck.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/ali.ads ada/ali-util.ads ada/ali-util.adb \
|
||||
|
@ -1267,10 +1436,10 @@ ada/bindusg.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/a-uncdea.ads ada/alloc.ads ada/bindusg.ads ada/bindusg.adb \
|
||||
ada/debug.ads ada/hostparm.ads ada/namet.ads ada/opt.ads ada/osint.ads \
|
||||
ada/output.ads ada/system.ads ada/s-exctab.ads ada/s-memory.ads \
|
||||
ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
|
||||
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
|
||||
ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \
|
||||
ada/unchdeal.ads
|
||||
ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-stoele.ads \
|
||||
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
|
||||
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
|
||||
ada/types.ads ada/unchconv.ads ada/unchdeal.ads
|
||||
|
||||
ada/butil.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/alloc.ads ada/butil.ads ada/butil.adb \
|
||||
|
@ -2185,10 +2354,10 @@ ada/fmap.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/namet.ads \
|
||||
ada/opt.ads ada/osint.ads ada/output.ads ada/system.ads \
|
||||
ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb ada/s-memory.ads \
|
||||
ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-strhas.ads \
|
||||
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
|
||||
ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads \
|
||||
ada/unchconv.ads ada/unchdeal.ads
|
||||
ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-stoele.ads \
|
||||
ada/s-stoele.adb ada/s-strhas.ads ada/s-string.ads ada/s-traent.ads \
|
||||
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
|
||||
ada/tree_io.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads
|
||||
|
||||
ada/fname-uf.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/debug.ads \
|
||||
|
@ -2197,10 +2366,11 @@ ada/fname-uf.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/namet.ads ada/opt.ads ada/osint.ads ada/output.ads ada/rident.ads \
|
||||
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb \
|
||||
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
|
||||
ada/s-stalib.ads ada/s-strhas.ads ada/s-string.ads ada/s-traent.ads \
|
||||
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
|
||||
ada/targparm.ads ada/tree_io.ads ada/types.ads ada/uname.ads \
|
||||
ada/unchconv.ads ada/unchdeal.ads ada/widechar.ads
|
||||
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-strhas.ads \
|
||||
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
|
||||
ada/table.ads ada/table.adb ada/targparm.ads ada/tree_io.ads \
|
||||
ada/types.ads ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
|
||||
ada/widechar.ads
|
||||
|
||||
ada/fname.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/fname.ads \
|
||||
|
@ -2489,9 +2659,10 @@ ada/lib-util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/lib.ads ada/lib-util.ads ada/lib-util.adb ada/namet.ads ada/opt.ads \
|
||||
ada/osint.ads ada/osint-c.ads ada/output.ads ada/system.ads \
|
||||
ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
|
||||
ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
|
||||
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
|
||||
ada/types.ads ada/unchconv.ads ada/unchdeal.ads
|
||||
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
|
||||
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
|
||||
ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \
|
||||
ada/unchdeal.ads
|
||||
|
||||
ada/lib-writ.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/ali.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
|
||||
|
@ -2531,10 +2702,10 @@ ada/lib-xref.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
|
||||
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
|
||||
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
|
||||
ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
|
||||
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
|
||||
ada/types.ads ada/uintp.ads ada/uintp.adb ada/unchconv.ads \
|
||||
ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
|
||||
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
|
||||
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
|
||||
ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
|
||||
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
|
||||
|
||||
ada/lib.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
|
||||
ada/alloc.ads ada/atree.ads ada/atree.adb ada/casing.ads ada/debug.ads \
|
||||
|
@ -2704,10 +2875,11 @@ ada/par_sco.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/snames.ads ada/stand.ads ada/stringt.ads ada/system.ads \
|
||||
ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb ada/s-imenne.ads \
|
||||
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
|
||||
ada/s-strhas.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
|
||||
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
|
||||
ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
|
||||
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
|
||||
ada/s-stoele.ads ada/s-stoele.adb ada/s-strhas.ads ada/s-string.ads \
|
||||
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
|
||||
ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
|
||||
ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \
|
||||
ada/widechar.ads
|
||||
|
||||
ada/prep.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/csets.ads \
|
||||
|
@ -3899,10 +4071,10 @@ ada/sinput-d.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/hostparm.ads ada/namet.ads ada/opt.ads ada/osint.ads \
|
||||
ada/osint-c.ads ada/output.ads ada/sinput.ads ada/sinput-d.ads \
|
||||
ada/sinput-d.adb ada/system.ads ada/s-exctab.ads ada/s-memory.ads \
|
||||
ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
|
||||
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
|
||||
ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \
|
||||
ada/unchdeal.ads
|
||||
ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-stoele.ads \
|
||||
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
|
||||
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
|
||||
ada/types.ads ada/unchconv.ads ada/unchdeal.ads
|
||||
|
||||
ada/sinput-l.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
|
||||
|
@ -4090,10 +4262,11 @@ ada/tree_gen.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/sem_aux.ads ada/sinfo.ads ada/sinput.ads ada/snames.ads \
|
||||
ada/stand.ads ada/stringt.ads ada/system.ads ada/s-exctab.ads \
|
||||
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
|
||||
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
|
||||
ada/table.ads ada/table.adb ada/tree_gen.ads ada/tree_gen.adb \
|
||||
ada/tree_in.ads ada/tree_io.ads ada/types.ads ada/uintp.ads \
|
||||
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
|
||||
ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
|
||||
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
|
||||
ada/tree_gen.ads ada/tree_gen.adb ada/tree_in.ads ada/tree_io.ads \
|
||||
ada/types.ads ada/uintp.ads ada/unchconv.ads ada/unchdeal.ads \
|
||||
ada/urealp.ads
|
||||
|
||||
ada/tree_in.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
||||
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/casing.ads \
|
||||
|
@ -4192,10 +4365,11 @@ ada/usage.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
|
|||
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads \
|
||||
ada/namet.ads ada/opt.ads ada/osint.ads ada/output.ads ada/rident.ads \
|
||||
ada/system.ads ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads \
|
||||
ada/s-parame.ads ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads \
|
||||
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
|
||||
ada/table.adb ada/targparm.ads ada/tree_io.ads ada/types.ads \
|
||||
ada/unchconv.ads ada/unchdeal.ads ada/usage.ads ada/usage.adb
|
||||
ada/s-parame.ads ada/s-rident.ads ada/s-stalib.ads ada/s-stoele.ads \
|
||||
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
|
||||
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
|
||||
ada/tree_io.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads \
|
||||
ada/usage.ads ada/usage.adb
|
||||
|
||||
ada/validsw.o : ada/ada.ads ada/a-unccon.ads ada/a-uncdea.ads \
|
||||
ada/hostparm.ads ada/opt.ads ada/system.ads ada/s-exctab.ads \
|
||||
|
|
|
@ -1503,7 +1503,6 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
|
|||
i-cstrea.adb<i-cstrea-vms.adb \
|
||||
memtrack.adb<memtrack-vms_64.adb \
|
||||
s-auxdec.ads<s-auxdec-vms_64.ads \
|
||||
s-crtl.ads<s-crtl-vms_64.ads \
|
||||
s-inmaop.adb<s-inmaop-vms.adb \
|
||||
s-interr.adb<s-interr-vms.adb \
|
||||
s-intman.adb<s-intman-vms.adb \
|
||||
|
|
|
@ -439,34 +439,14 @@ procedure Gnatlink is
|
|||
Compile_Bind_File := False;
|
||||
|
||||
when 'o' =>
|
||||
if VM_Target = CLI_Target then
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'("/QUIET");
|
||||
|
||||
else
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'(Arg);
|
||||
end if;
|
||||
|
||||
Next_Arg := Next_Arg + 1;
|
||||
|
||||
if Next_Arg > Argument_Count then
|
||||
Exit_With_Error ("Missing argument for -o");
|
||||
end if;
|
||||
|
||||
if VM_Target = CLI_Target then
|
||||
Output_File_Name :=
|
||||
new String'("/OUTPUT=" & Argument (Next_Arg));
|
||||
else
|
||||
Output_File_Name :=
|
||||
new String'(Argument (Next_Arg));
|
||||
end if;
|
||||
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
Output_File_Name;
|
||||
Output_File_Name :=
|
||||
new String'(Executable_Name (Argument (Next_Arg)));
|
||||
|
||||
when 'R' =>
|
||||
Opt.Run_Path_Option := False;
|
||||
|
@ -1728,33 +1708,44 @@ begin
|
|||
Output_File_Name :=
|
||||
new String'(Base_Name (Ali_File_Name.all)
|
||||
& Get_Target_Debuggable_Suffix.all);
|
||||
|
||||
if VM_Target = CLI_Target then
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) := new String'("/QUIET");
|
||||
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) := new String'("/DEBUG");
|
||||
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'("/OUTPUT=" & Output_File_Name.all);
|
||||
|
||||
elsif RTX_RTSS_Kernel_Module_On_Target then
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'("/OUT:" & Output_File_Name.all);
|
||||
|
||||
else
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) := new String'("-o");
|
||||
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'(Output_File_Name.all);
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if VM_Target = CLI_Target then
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) := new String'("/QUIET");
|
||||
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) := new String'("/DEBUG");
|
||||
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'("/OUTPUT=" & Output_File_Name.all);
|
||||
|
||||
elsif RTX_RTSS_Kernel_Module_On_Target then
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'("/OUT:" & Output_File_Name.all);
|
||||
|
||||
else
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) := new String'("-o");
|
||||
|
||||
Linker_Options.Increment_Last;
|
||||
Linker_Options.Table (Linker_Options.Last) :=
|
||||
new String'(Output_File_Name.all);
|
||||
end if;
|
||||
|
||||
-- Delete existing executable, in case it is a symbolic link, to avoid
|
||||
-- modifying the target of the symbolic link.
|
||||
|
||||
declare
|
||||
Dummy : Boolean;
|
||||
pragma Unreferenced (Dummy);
|
||||
|
||||
begin
|
||||
Delete_File (Output_File_Name.all, Dummy);
|
||||
end;
|
||||
|
||||
-- Warn if main program is called "test", as that may be a built-in command
|
||||
-- on Unix. On non-Unix systems executables have a suffix, so the warning
|
||||
-- will not appear. However, do not warn in the case of a cross compiler.
|
||||
|
|
|
@ -31,13 +31,18 @@
|
|||
|
||||
-- This package provides the low level interface to the C runtime library
|
||||
|
||||
with Interfaces.C.Strings;
|
||||
|
||||
with System.Parameters;
|
||||
|
||||
package System.CRTL is
|
||||
pragma Preelaborate;
|
||||
|
||||
subtype chars_ptr is Interfaces.C.Strings.chars_ptr;
|
||||
|
||||
subtype chars is System.Address;
|
||||
-- Pointer to null-terminated array of characters
|
||||
-- Should use Interfaces.C.Strings types instead???
|
||||
|
||||
subtype DIRs is System.Address;
|
||||
-- Corresponds to the C type DIR*
|
||||
|
@ -48,7 +53,7 @@ package System.CRTL is
|
|||
subtype int is Integer;
|
||||
|
||||
type long is range -(2 ** (System.Parameters.long_bits - 1))
|
||||
.. +(2 ** (System.Parameters.long_bits - 1)) - 1;
|
||||
.. +(2 ** (System.Parameters.long_bits - 1)) - 1;
|
||||
|
||||
subtype off_t is Long_Integer;
|
||||
|
||||
|
@ -190,7 +195,7 @@ package System.CRTL is
|
|||
function write (fd : int; buffer : chars; nbytes : int) return int;
|
||||
pragma Import (C, write, "write");
|
||||
|
||||
function strerror (errno : int) return chars;
|
||||
function strerror (errno : int) return chars_ptr;
|
||||
pragma Import (C, strerror, "strerror");
|
||||
|
||||
end System.CRTL;
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
|
||||
-- --
|
||||
-- S Y S T E M . E R R O R _ R E P O R T I N G --
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1995-2006, AdaCore --
|
||||
-- --
|
||||
-- GNARL is free software; you can redistribute it and/or modify it under --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
-- ware Foundation; either version 2, or (at your option) any later ver- --
|
||||
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
|
||||
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
||||
-- for more details. You should have received a copy of the GNU General --
|
||||
-- Public License distributed with GNARL; see file COPYING. If not, write --
|
||||
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
|
||||
-- Boston, MA 02110-1301, USA. --
|
||||
-- --
|
||||
-- As a special exception, if other files instantiate generics from this --
|
||||
-- unit, or you link this unit with other files to produce an executable, --
|
||||
-- this unit does not by itself cause the resulting executable to be --
|
||||
-- covered by the GNU General Public License. This exception does not --
|
||||
-- however invalidate any other reasons why the executable file might be --
|
||||
-- covered by the GNU Public License. --
|
||||
-- --
|
||||
-- GNARL was developed by the GNARL team at Florida State University. --
|
||||
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
-- This package must not depend on anything else, since it may be
|
||||
-- called during elaboration of other packages.
|
||||
|
||||
package body System.Error_Reporting is
|
||||
|
||||
procedure Write (fildes : Integer; buf : System.Address; nbyte : Integer);
|
||||
pragma Import (C, Write, "write");
|
||||
|
||||
procedure Prog_Exit (Status : Integer);
|
||||
pragma No_Return (Prog_Exit);
|
||||
pragma Import (C, Prog_Exit, "exit");
|
||||
|
||||
Shutdown_Message : String := "failed run-time assertion : ";
|
||||
End_Of_Line : String := "" & ASCII.LF;
|
||||
|
||||
--------------
|
||||
-- Shutdown --
|
||||
--------------
|
||||
|
||||
function Shutdown (M : String) return Boolean is
|
||||
begin
|
||||
Write (2, Shutdown_Message'Address, Shutdown_Message'Length);
|
||||
Write (2, M'Address, M'Length);
|
||||
Write (2, End_Of_Line'Address, End_Of_Line'Length);
|
||||
|
||||
-- This call should never return
|
||||
|
||||
Prog_Exit (1);
|
||||
|
||||
-- Return is just to keep Ada happy (return required)
|
||||
|
||||
return False;
|
||||
end Shutdown;
|
||||
|
||||
end System.Error_Reporting;
|
|
@ -1,45 +0,0 @@
|
|||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
|
||||
-- --
|
||||
-- S Y S T E M . E R R O R _ R E P O R T I N G --
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1995-2006, AdaCore --
|
||||
-- --
|
||||
-- GNARL is free software; you can redistribute it and/or modify it under --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
-- ware Foundation; either version 2, or (at your option) any later ver- --
|
||||
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
|
||||
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
||||
-- for more details. You should have received a copy of the GNU General --
|
||||
-- Public License distributed with GNARL; see file COPYING. If not, write --
|
||||
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
|
||||
-- Boston, MA 02110-1301, USA. --
|
||||
-- --
|
||||
-- As a special exception, if other files instantiate generics from this --
|
||||
-- unit, or you link this unit with other files to produce an executable, --
|
||||
-- this unit does not by itself cause the resulting executable to be --
|
||||
-- covered by the GNU General Public License. This exception does not --
|
||||
-- however invalidate any other reasons why the executable file might be --
|
||||
-- covered by the GNU Public License. --
|
||||
-- --
|
||||
-- GNARL was developed by the GNARL team at Florida State University. --
|
||||
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
-- This package must not depend on anything else, since it may be
|
||||
-- called during elaboration of other packages.
|
||||
|
||||
package System.Error_Reporting is
|
||||
pragma Preelaborate;
|
||||
|
||||
function Shutdown (M : String) return Boolean;
|
||||
-- Perform emergency shutdown of the entire program. Msg is an error
|
||||
-- message to be printed to the console. This is to be used only for
|
||||
-- nonrecoverable errors.
|
||||
|
||||
end System.Error_Reporting;
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
with Ada.Finalization; use Ada.Finalization;
|
||||
with Ada.IO_Exceptions; use Ada.IO_Exceptions;
|
||||
with Ada.Unchecked_Conversion;
|
||||
|
||||
with Interfaces.C;
|
||||
with Interfaces.C.Strings; use Interfaces.C.Strings;
|
||||
|
@ -375,16 +374,7 @@ package body System.File_IO is
|
|||
-------------------
|
||||
|
||||
function Errno_Message (Errno : Integer := OS_Lib.Errno) return String is
|
||||
pragma Warnings (Off);
|
||||
function To_Chars_Ptr is
|
||||
new Ada.Unchecked_Conversion (System.Address, chars_ptr);
|
||||
-- On VMS, the compiler warns because System.Address is 64 bits, but
|
||||
-- chars_ptr is 32 bits. It should be safe, though, because strerror
|
||||
-- will return a 32-bit pointer.
|
||||
pragma Warnings (On);
|
||||
|
||||
Message : constant chars_ptr :=
|
||||
To_Chars_Ptr (CRTL.strerror (Errno));
|
||||
Message : constant chars_ptr := CRTL.strerror (Errno);
|
||||
|
||||
begin
|
||||
if Message = Null_Ptr then
|
||||
|
|
|
@ -59,6 +59,9 @@
|
|||
#include <string.h>
|
||||
/* Required for memcpy() */
|
||||
|
||||
extern const size_t __gnat_sizeof_servent = sizeof(struct servent);
|
||||
/* For passing the size of servent to Ada code. */
|
||||
|
||||
extern void __gnat_disable_sigpipe (int fd);
|
||||
extern void __gnat_disable_all_sigpipes (void);
|
||||
extern int __gnat_create_signalling_fds (int *fds);
|
||||
|
@ -74,6 +77,10 @@ extern void __gnat_remove_socket_from_set (fd_set *, int);
|
|||
extern void __gnat_reset_socket_set (fd_set *);
|
||||
extern int __gnat_get_h_errno (void);
|
||||
extern int __gnat_socket_ioctl (int, int, int *);
|
||||
extern char * __gnat_servent_s_name (struct servent *);
|
||||
extern char ** __gnat_servent_s_aliases (struct servent *);
|
||||
extern int __gnat_servent_s_port (struct servent *);
|
||||
extern char * __gnat_servent_s_proto (struct servent *);
|
||||
#if defined (__vxworks) || defined (_WIN32)
|
||||
extern int __gnat_inet_pton (int, const char *, void *);
|
||||
#endif
|
||||
|
@ -488,6 +495,61 @@ __gnat_inet_pton (int af, const char *src, void *dst) {
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Accessor functions for struct servent.
|
||||
*
|
||||
* These are needed because servent has different representations on different
|
||||
* platforms, and we don't want to deal with that on the Ada side. For example,
|
||||
* on Linux, we have (see /usr/include netdb.h):
|
||||
*
|
||||
* struct servent
|
||||
* {
|
||||
* char *s_name;
|
||||
* char **s_aliases;
|
||||
* int s_port;
|
||||
* char *s_proto;
|
||||
* };
|
||||
*
|
||||
* and on Windows (see mingw's socket.h):
|
||||
*
|
||||
* struct servent {
|
||||
* char *s_name;
|
||||
* char **s_aliases;
|
||||
* #ifdef _WIN64
|
||||
* char *s_proto;
|
||||
* short s_port;
|
||||
* #else
|
||||
* short s_port;
|
||||
* char *s_proto;
|
||||
* #endif
|
||||
* };
|
||||
*/
|
||||
|
||||
char *
|
||||
__gnat_servent_s_name (struct servent * s)
|
||||
{
|
||||
return s->s_name;
|
||||
}
|
||||
|
||||
char **
|
||||
__gnat_servent_s_aliases (struct servent * s)
|
||||
{
|
||||
return s->s_aliases;
|
||||
}
|
||||
|
||||
int
|
||||
__gnat_servent_s_port (struct servent * s)
|
||||
{
|
||||
return s->s_port;
|
||||
}
|
||||
|
||||
char *
|
||||
__gnat_servent_s_proto (struct servent * s)
|
||||
{
|
||||
return s->s_proto;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
# warning Sockets are not supported on this platform
|
||||
#endif /* defined(HAVE_SOCKETS) */
|
||||
|
|
Loading…
Add table
Reference in a new issue