diff options
author | Thomas Quinot <quinot@adacore.com> | 2014-02-24 16:54:41 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-24 17:54:41 +0100 |
commit | 3e5b1f324798b549d61995939bf09e1728bacb95 (patch) | |
tree | 7da7de3843015498f4fd50b583ef216d74825c10 /gcc/ada/s-crtl.ads | |
parent | c6d2191a0da9f40899da20933f008242f90262e0 (diff) | |
download | gcc-3e5b1f324798b549d61995939bf09e1728bacb95.zip gcc-3e5b1f324798b549d61995939bf09e1728bacb95.tar.gz gcc-3e5b1f324798b549d61995939bf09e1728bacb95.tar.bz2 |
s-fileio.adb (Errno_Message): Remove, use shared version from s-os_lib instead.
2014-02-24 Thomas Quinot <quinot@adacore.com>
* s-fileio.adb (Errno_Message): Remove, use shared version from
s-os_lib instead.
* s-crtrun.ads, Makefile.rtl: Remove now unused unit.
* g-stseme (Socket_Error_Message): Reimplement in terms of new
s-os_lib function.
* g-socthi.ads, g-socthi.adb: Change profile of
Socket_Error_Message to return String to allow the above.
* g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
* g-socthi-vxworks.ads: Update to account for the above profile
change.
* a-tags.adb: Use strlen builtin binding provided by s-crtl.
* s-crtl.ads (strncpy): New procedure.
* s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
Use import from s-crtl.
* a-envvar.adb, osint.adb: Use imports of C runtime functions
from s-crtl instead of re-importing locally.
From-SVN: r208079
Diffstat (limited to 'gcc/ada/s-crtl.ads')
-rw-r--r-- | gcc/ada/s-crtl.ads | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ada/s-crtl.ads b/gcc/ada/s-crtl.ads index 8e8aa2d7..cde3dd1 100644 --- a/gcc/ada/s-crtl.ads +++ b/gcc/ada/s-crtl.ads @@ -67,13 +67,26 @@ package System.CRTL is pragma Convention (C, Filename_Encoding); -- Describes the filename's encoding - function atoi (A : System.Address) return Integer; - pragma Import (C, atoi, "atoi"); + -------------------- + -- GCC intrinsics -- + -------------------- + + -- The following functions are imported with convention Intrinsic so that + -- we take advantage of back-end builtins if present (else we fall back + -- to C library functions by the same names). function strlen (A : System.Address) return size_t; pragma Import (Intrinsic, strlen, "strlen"); - -- Import with convention Intrinsic so that we take advantage of the GCC - -- builtin where available (and fall back to the library function if not). + + procedure strncpy (dest, src : System.Address; n : size_t); + pragma Import (Intrinsic, strncpy, "strncpy"); + + ------------------------------- + -- Other C runtime functions -- + ------------------------------- + + function atoi (A : System.Address) return Integer; + pragma Import (C, atoi, "atoi"); procedure clearerr (stream : FILEs); pragma Import (C, clearerr, "clearerr"); |