[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:
Arnaud Charlet 2009-11-30 16:10:58 +01:00
parent 9cf032ef7d
commit c5fdd4ad97
11 changed files with 39 additions and 16 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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);