summaryrefslogtreecommitdiffstats
path: root/gcc/ada/g-socket.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 10:07:32 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 10:07:32 +0000
commit9cdffbc8e4a21e2ebd91c33264a250b3d0328129 (patch)
tree7bec3cf8139da8c3fc9ab89202f6b0894c50fe0e /gcc/ada/g-socket.adb
parent92d7a451bc1093930f14896b59bf02d61843d5b6 (diff)
downloadppe42-gcc-9cdffbc8e4a21e2ebd91c33264a250b3d0328129.tar.gz
ppe42-gcc-9cdffbc8e4a21e2ebd91c33264a250b3d0328129.zip
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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r--gcc/ada/g-socket.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index 5cf623a1602..062baf768ef 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -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;
OpenPOWER on IntegriCloud