[multiple changes]
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. From-SVN: r154817
This commit is contained in:
parent
9cf032ef7d
commit
c5fdd4ad97
@ -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>
|
2009-11-30 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
* sem_prag.adb, s-sechas.ads, s-sechas.adb: Minor reformatting.
|
* sem_prag.adb, s-sechas.ads, s-sechas.adb: Minor reformatting.
|
||||||
|
@ -74,15 +74,15 @@ typedef long OS_Time;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
struct file_attributes {
|
struct file_attributes {
|
||||||
short exists;
|
char exists;
|
||||||
|
|
||||||
short writable;
|
char writable;
|
||||||
short readable;
|
char readable;
|
||||||
short executable;
|
char executable;
|
||||||
|
|
||||||
short symbolic_link;
|
char symbolic_link;
|
||||||
short regular;
|
char regular;
|
||||||
short directory;
|
char directory;
|
||||||
|
|
||||||
OS_Time timestamp;
|
OS_Time timestamp;
|
||||||
long file_length;
|
long file_length;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
with System.Secure_Hashes.SHA2_Common;
|
with System.Secure_Hashes.SHA2_Common;
|
||||||
with System.Secure_Hashes.SHA2_32;
|
with System.Secure_Hashes.SHA2_32;
|
||||||
|
|
||||||
package GNAT.SHA224 is new System.Secure_Hashes.H
|
package GNAT.SHA224 is new System.Secure_Hashes.H
|
||||||
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
||||||
State_Words => 8,
|
State_Words => 8,
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
with System.Secure_Hashes.SHA2_Common;
|
with System.Secure_Hashes.SHA2_Common;
|
||||||
with System.Secure_Hashes.SHA2_32;
|
with System.Secure_Hashes.SHA2_32;
|
||||||
|
|
||||||
package GNAT.SHA256 is new System.Secure_Hashes.H
|
package GNAT.SHA256 is new System.Secure_Hashes.H
|
||||||
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
||||||
State_Words => 8,
|
State_Words => 8,
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
with System.Secure_Hashes.SHA2_Common;
|
with System.Secure_Hashes.SHA2_Common;
|
||||||
with System.Secure_Hashes.SHA2_64;
|
with System.Secure_Hashes.SHA2_64;
|
||||||
|
|
||||||
package GNAT.SHA384 is new System.Secure_Hashes.H
|
package GNAT.SHA384 is new System.Secure_Hashes.H
|
||||||
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
||||||
State_Words => 8,
|
State_Words => 8,
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
with System.Secure_Hashes.SHA2_Common;
|
with System.Secure_Hashes.SHA2_Common;
|
||||||
with System.Secure_Hashes.SHA2_64;
|
with System.Secure_Hashes.SHA2_64;
|
||||||
|
|
||||||
package GNAT.SHA512 is new System.Secure_Hashes.H
|
package GNAT.SHA512 is new System.Secure_Hashes.H
|
||||||
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
(Block_Words => System.Secure_Hashes.SHA2_Common.Block_Words,
|
||||||
State_Words => 8,
|
State_Words => 8,
|
||||||
|
@ -272,7 +272,7 @@ package body Makeutl is
|
|||||||
if not Fname.Is_Internal_File_Name (SD.Sfile)
|
if not Fname.Is_Internal_File_Name (SD.Sfile)
|
||||||
or else
|
or else
|
||||||
(Check_Readonly_Files
|
(Check_Readonly_Files
|
||||||
and then Find_File (SD.Sfile, Osint.Source) = No_File)
|
and then Full_Source_Name (SD.Sfile) = No_File)
|
||||||
then
|
then
|
||||||
if Verbose_Mode then
|
if Verbose_Mode then
|
||||||
Write_Line
|
Write_Line
|
||||||
|
@ -735,7 +735,7 @@ private
|
|||||||
-- detected, the file being written is deleted, and a fatal error is
|
-- detected, the file being written is deleted, and a fatal error is
|
||||||
-- signalled.
|
-- 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
|
-- 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
|
-- 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
|
-- either mapping the struct exactly or importing the sizeof from C, which
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
with Casing; use Casing;
|
with Casing; use Casing;
|
||||||
with Namet; use Namet;
|
with Namet; use Namet;
|
||||||
|
with Osint;
|
||||||
with Scans; use Scans;
|
with Scans; use Scans;
|
||||||
with Types; use Types;
|
with Types; use Types;
|
||||||
|
|
||||||
@ -745,7 +746,7 @@ package Prj is
|
|||||||
Dep_Path : Path_Name_Type := No_Path;
|
Dep_Path : Path_Name_Type := No_Path;
|
||||||
-- Path name of the real dependency file
|
-- 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
|
-- Dependency file time stamp
|
||||||
|
|
||||||
Switches : File_Name_Type := No_File;
|
Switches : File_Name_Type := No_File;
|
||||||
@ -789,7 +790,7 @@ package Prj is
|
|||||||
Dep_Name => No_File,
|
Dep_Name => No_File,
|
||||||
Current_Dep_Path => No_Path,
|
Current_Dep_Path => No_Path,
|
||||||
Dep_Path => No_Path,
|
Dep_Path => No_Path,
|
||||||
Dep_TS => Empty_Time_Stamp,
|
Dep_TS => Osint.Unknown_Attributes,
|
||||||
Switches => No_File,
|
Switches => No_File,
|
||||||
Switches_Path => No_Path,
|
Switches_Path => No_Path,
|
||||||
Switches_TS => Empty_Time_Stamp,
|
Switches_TS => Empty_Time_Stamp,
|
||||||
|
@ -35,8 +35,8 @@ package body System.Secure_Hashes.MD5 is
|
|||||||
|
|
||||||
use Interfaces;
|
use Interfaces;
|
||||||
|
|
||||||
-- The sixteen values used to rotate the context words.
|
-- The sixteen values used to rotate the context words. Four for each
|
||||||
-- Four for each rounds. Used in procedure Transform.
|
-- rounds. Used in procedure Transform.
|
||||||
|
|
||||||
-- Round 1
|
-- Round 1
|
||||||
|
|
||||||
@ -67,8 +67,8 @@ package body System.Secure_Hashes.MD5 is
|
|||||||
S44 : constant := 21;
|
S44 : constant := 21;
|
||||||
|
|
||||||
-- The following functions (F, FF, G, GG, H, HH, I and II) are the
|
-- 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
|
-- equivalent of the macros of the same name in the example C
|
||||||
-- C implementation in the annex of RFC 1321.
|
-- implementation in the annex of RFC 1321.
|
||||||
|
|
||||||
function F (X, Y, Z : Unsigned_32) return Unsigned_32;
|
function F (X, Y, Z : Unsigned_32) return Unsigned_32;
|
||||||
pragma Inline (F);
|
pragma Inline (F);
|
||||||
|
Loading…
Reference in New Issue
Block a user