diff options
author | Pascal Obry <obry@adacore.com> | 2014-08-01 08:10:34 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 10:10:34 +0200 |
commit | 148c744a1789b29b3c3c32b45ea3be913fef6a52 (patch) | |
tree | 6d947b509c5720962bfcba5c62b900bab43882a0 /gcc/ada/osint.adb | |
parent | 479f90598ae5c20aa042e4700a98f273c8094496 (diff) | |
download | gcc-148c744a1789b29b3c3c32b45ea3be913fef6a52.zip gcc-148c744a1789b29b3c3c32b45ea3be913fef6a52.tar.gz gcc-148c744a1789b29b3c3c32b45ea3be913fef6a52.tar.bz2 |
adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
2014-08-01 Pascal Obry <obry@adacore.com>
* adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
(__gnat_named_file_length): Likewise.
(__gnat_file_length_attr): Likewise.
* a-direct.adb (C_Size): Use size_t as returned type.
* osint.adb (File_Length): Adjust spec for Internal routine
(returns size_t).
* s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
(System.CRTL): With claused moved to spec.
* s-os_lib.ads (System.CRTL): With clause moved to here.
From-SVN: r213412
Diffstat (limited to 'gcc/ada/osint.adb')
-rw-r--r-- | gcc/ada/osint.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb index 0c15982..159501d 100644 --- a/gcc/ada/osint.adb +++ b/gcc/ada/osint.adb @@ -1076,10 +1076,13 @@ package body Osint is function Internal (F : Integer; N : C_File_Name; - A : System.Address) return Long_Integer; + A : System.Address) return size_t; pragma Import (C, Internal, "__gnat_file_length_attr"); begin - return Internal (-1, Name, Attr.all'Address); + -- The conversion from size_t to Long_Integer is ok here as this + -- routine is only to be used by the compiler and we do not expect + -- a unit to be larger than a 32bit integer. + return Long_Integer (Internal (-1, Name, Attr.all'Address)); end File_Length; --------------------- |