summaryrefslogtreecommitdiff
path: root/gcc/ada/g-stseme.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-stseme.adb
parent92d7a451bc1093930f14896b59bf02d61843d5b6 (diff)
downloadgcc-9cdffbc8e4a21e2ebd91c33264a250b3d0328129.tar.gz
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-stseme.adb')
-rw-r--r--gcc/ada/g-stseme.adb16
1 files changed, 1 insertions, 15 deletions
diff --git a/gcc/ada/g-stseme.adb b/gcc/ada/g-stseme.adb
index 4b1720fb216..c47adc8be35 100644
--- a/gcc/ada/g-stseme.adb
+++ b/gcc/ada/g-stseme.adb
@@ -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