From c6d2191a0da9f40899da20933f008242f90262e0 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 24 Feb 2014 17:51:58 +0100 Subject: [multiple changes] 2014-02-24 Hristian Kirtchev * sem_prag.adb (Analyze_Global_Item): Emit the variable related checks concerning volatile objects only when SPARK_Mode is on. 2014-02-24 Robert Dewar * sem_ch5.adb (Analyze_Iterator_Specification): use Error_Msg_Ada_2012_Feature. 2014-02-24 Jose Ruiz * s-rident.ads (Profile_Info): For Ravenscar, the restrictions No_Local_Timing_Events and No_Specific_Termination_Handlers must be set, according to the Ravenscar profile definition in D.13(6/3). 2014-02-24 Ed Schonberg * sem_ch6.adb (Analyze_Expression_Function): If this is a completion, freeze return type and its designated type if needed. 2014-02-24 Thomas Quinot * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case 'Address): When moving initialization statements to a freeze entity, keep them under a single node (i.e. do not unwrap expressions with actions), and set the Initialization_Statements attribute again so that processing of a later pragma Import can still remove them. 2014-02-24 Claire Dross * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads, a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename Left/Right to First_To_Previous/Current_To_Last. 2014-02-24 Thomas Quinot * adaint.h (struct file_attributes): New component "error" (__gnat_error_attributes): Accessor for the above. * adaint.c (__gnat_error_attributes): New subprogram (__gnat_stat): Fix returned value (expect errno value) (__gnat_stat_to_attr): Add management of error component (set to stat errno value, except for missing files where it is set to 0, and exists is set to 0). * osint.ads (File_Attributes_Size): Update per change above, also clarify documentation. * s-filatt.ads: New file, binding to file attributes related functions. * Makefile.rtl (s-filatt): New runtime unit. * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back to library function if not available on target). * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram. * s-oscons-tmplt.c (SIZEOF_struct_file_attributes, SIZEOF_struct_dirent_alloc): New constants. * Make-generated.in (s-oscons.ads): Now requires adaint.h. * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes. Perform appropriate error checking if stat fails (do not just ignore existing files if stat fails) * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update dependencies. From-SVN: r208078 --- gcc/ada/adaint.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/ada/adaint.h') diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h index 554d848..28d4c8c 100644 --- a/gcc/ada/adaint.h +++ b/gcc/ada/adaint.h @@ -78,6 +78,11 @@ typedef long OS_Time; */ struct file_attributes { + int error; + /* Errno value returned by stat()/fstat(). If non-zero, other fields should + * be considered as invalid. + */ + unsigned char exists; unsigned char writable; @@ -163,7 +168,8 @@ extern int __gnat_is_writable_file (char *); extern int __gnat_is_readable_file (char *name); extern int __gnat_is_executable_file (char *name); -extern void __gnat_reset_attributes (struct file_attributes* attr); +extern void __gnat_reset_attributes (struct file_attributes *); +extern int __gnat_error_attributes (struct file_attributes *); extern long __gnat_file_length_attr (int, char *, struct file_attributes *); extern OS_Time __gnat_file_time_name_attr (char *, struct file_attributes *); extern OS_Time __gnat_file_time_fd_attr (int, struct file_attributes *); -- cgit v1.1