From 148c744a1789b29b3c3c32b45ea3be913fef6a52 Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Fri, 1 Aug 2014 08:10:34 +0000 Subject: adaint.h, adaint.c (__gnat_file_length): Returns an __int64. 2014-08-01 Pascal Obry * 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 --- gcc/ada/osint.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/ada/osint.adb') 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; --------------------- -- cgit v1.1