diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9a3556c6afe0d498211b40ab842487f6f4f21586..dbb8057d9710185fc2c6f6647f4ac94814704d72 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,21 @@ +2009-11-30 Robert Dewar <dewar@adacore.com> + + * g-sha256.ads, s-sehamd.ads, s-sehamd.adb, g-sha512.ads, g-sha224.ads, + g-sha384.ads: Minor reformatting + +2009-11-30 Emmanuel Briot <briot@adacore.com> + + * adaint.h (file_attributes): Reduce size of the structure, so that it + is less costly to store in records. + * makeutl.adb: + (Check_Source_Info_In_ALI): use Full_Source_Name instead of a direct + call to Find_File, since the former provides caching when appropriate, + which limits the number of system calls in some cases. + * osint.ads, prj.ads (Source_Data): do not store directly the timestamp, + but the file attributes since we also need access to the size of the + ALI file to parse it. This gives an opportunity for saving system calls + on Unix systems. + 2009-11-30 Robert Dewar <dewar@adacore.com> * sem_prag.adb, s-sechas.ads, s-sechas.adb: Minor reformatting. diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h index 0412ffbf808daa040568c21f723995fa998701d7..41b6357656f05db7478fb2af9f806916575d2a8b 100644 --- a/gcc/ada/adaint.h +++ b/gcc/ada/adaint.h @@ -74,15 +74,15 @@ typedef long OS_Time; */ struct file_attributes { - short exists; + char exists; - short writable; - short readable; - short executable; + char writable; + char readable; + char executable; - short symbolic_link; - short regular; - short directory; + char symbolic_link; + char regular; + char directory; OS_Time timestamp; long file_length; diff --git a/gcc/ada/g-sha224.ads b/gcc/ada/g-sha224.ads index 25c40396bff6d990e0d079effa961891059a3d6a..9b93a19e4e02a3db9b65d6b424bafe4b15674b2f 100644 --- a/gcc/ada/g-sha224.ads +++ b/gcc/ada/g-sha224.ads @@ -31,6 +31,7 @@ with System.Secure_Hashes.SHA2_Common; with System.Secure_Hashes.SHA2_32; + package GNAT.SHA224 is new System.Secure_Hashes.H (Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words, State_Words => 8, diff --git a/gcc/ada/g-sha256.ads b/gcc/ada/g-sha256.ads index 3588d03abb2cf73cdc0573cc2d7373ebcf577f16..ee8177fa2eb1fb69ec1728783f48d2d80a5e2cde 100644 --- a/gcc/ada/g-sha256.ads +++ b/gcc/ada/g-sha256.ads @@ -31,6 +31,7 @@ with System.Secure_Hashes.SHA2_Common; with System.Secure_Hashes.SHA2_32; + package GNAT.SHA256 is new System.Secure_Hashes.H (Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words, State_Words => 8, diff --git a/gcc/ada/g-sha384.ads b/gcc/ada/g-sha384.ads index 7971a93c3fce5b085af2a06464d2c912db2edda0..4c1b8b5a3264626523d91390fd0a4be29f04f1ea 100644 --- a/gcc/ada/g-sha384.ads +++ b/gcc/ada/g-sha384.ads @@ -31,6 +31,7 @@ with System.Secure_Hashes.SHA2_Common; with System.Secure_Hashes.SHA2_64; + package GNAT.SHA384 is new System.Secure_Hashes.H (Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words, State_Words => 8, diff --git a/gcc/ada/g-sha512.ads b/gcc/ada/g-sha512.ads index 0fc0dde3f5204a92af4adf26322534ed3e9a59ec..c8ebd32f9696c2baa9f0bf03e14bb651248382b9 100644 --- a/gcc/ada/g-sha512.ads +++ b/gcc/ada/g-sha512.ads @@ -31,6 +31,7 @@ with System.Secure_Hashes.SHA2_Common; with System.Secure_Hashes.SHA2_64; + package GNAT.SHA512 is new System.Secure_Hashes.H (Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words, State_Words => 8, diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb index 1f64da3d8c4467f848a97862fc007df1484e5f70..ab00b5065782fcf7c14d29601a976420ea258050 100644 --- a/gcc/ada/makeutl.adb +++ b/gcc/ada/makeutl.adb @@ -272,7 +272,7 @@ package body Makeutl is if not Fname.Is_Internal_File_Name (SD.Sfile) or else (Check_Readonly_Files - and then Find_File (SD.Sfile, Osint.Source) = No_File) + and then Full_Source_Name (SD.Sfile) = No_File) then if Verbose_Mode then Write_Line diff --git a/gcc/ada/osint.ads b/gcc/ada/osint.ads index faeaf109806d6df94fbc21f9a839163798b5bc07..eeba80148aebf54034c5c2194f16ec0a109d2a19 100644 --- a/gcc/ada/osint.ads +++ b/gcc/ada/osint.ads @@ -735,7 +735,7 @@ private -- detected, the file being written is deleted, and a fatal error is -- signalled. - File_Attributes_Size : constant Integer := 50; + File_Attributes_Size : constant Natural := 24; -- This should be big enough to fit a "struct file_attributes" on any -- system. It doesn't matter if it is too big (which avoids the need for -- either mapping the struct exactly or importing the sizeof from C, which diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads index 88f1ecd338118e96b1333cb5ca0599a614adf000..7fd97916ad1f5376bf91486281533cb507be4793 100644 --- a/gcc/ada/prj.ads +++ b/gcc/ada/prj.ads @@ -31,6 +31,7 @@ with Casing; use Casing; with Namet; use Namet; +with Osint; with Scans; use Scans; with Types; use Types; @@ -745,7 +746,7 @@ package Prj is Dep_Path : Path_Name_Type := No_Path; -- Path name of the real dependency file - Dep_TS : Time_Stamp_Type := Empty_Time_Stamp; + Dep_TS : aliased Osint.File_Attributes := Osint.Unknown_Attributes; -- Dependency file time stamp Switches : File_Name_Type := No_File; @@ -789,7 +790,7 @@ package Prj is Dep_Name => No_File, Current_Dep_Path => No_Path, Dep_Path => No_Path, - Dep_TS => Empty_Time_Stamp, + Dep_TS => Osint.Unknown_Attributes, Switches => No_File, Switches_Path => No_Path, Switches_TS => Empty_Time_Stamp, diff --git a/gcc/ada/s-sehamd.adb b/gcc/ada/s-sehamd.adb index 893a172820a53be95fff132a07096889f844ca85..cc04e6a777333e4201cea6da690ea93f27ff2384 100644 --- a/gcc/ada/s-sehamd.adb +++ b/gcc/ada/s-sehamd.adb @@ -35,8 +35,8 @@ package body System.Secure_Hashes.MD5 is use Interfaces; - -- The sixteen values used to rotate the context words. - -- Four for each rounds. Used in procedure Transform. + -- The sixteen values used to rotate the context words. Four for each + -- rounds. Used in procedure Transform. -- Round 1 @@ -67,8 +67,8 @@ package body System.Secure_Hashes.MD5 is S44 : constant := 21; -- The following functions (F, FF, G, GG, H, HH, I and II) are the - -- equivalent of the macros of the same name in the example - -- C implementation in the annex of RFC 1321. + -- equivalent of the macros of the same name in the example C + -- implementation in the annex of RFC 1321. function F (X, Y, Z : Unsigned_32) return Unsigned_32; pragma Inline (F); diff --git a/gcc/ada/s-sehamd.ads b/gcc/ada/s-sehamd.ads index 92d913a015c8131a5cc6a88fa0b1d8ef6ac6e23e..206050fb0ec204ed296fb6443d91bd2bd1cbdf12 100644 --- a/gcc/ada/s-sehamd.ads +++ b/gcc/ada/s-sehamd.ads @@ -46,7 +46,7 @@ package System.Secure_Hashes.MD5 is Hash_Bit_Order => System.Low_Order_First); -- MD5 operates on 32-bit little endian words - Block_Words : constant := 16; + Block_Words : constant := 16; -- Messages are processed in chunks of 16 words procedure Transform