aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 16:10:58 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 16:10:58 +0100
commitc5fdd4ad9799cac7701e9ba82901f84a30957082 (patch)
tree01ad137364b62365a4863ad5ac8f9130b5822119 /gcc
parent9cf032ef7dcf113d3ac0db470df9b813198624ad (diff)
downloadgcc-c5fdd4ad9799cac7701e9ba82901f84a30957082.zip
gcc-c5fdd4ad9799cac7701e9ba82901f84a30957082.tar.gz
gcc-c5fdd4ad9799cac7701e9ba82901f84a30957082.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog18
-rw-r--r--gcc/ada/adaint.h14
-rw-r--r--gcc/ada/g-sha224.ads1
-rw-r--r--gcc/ada/g-sha256.ads1
-rw-r--r--gcc/ada/g-sha384.ads1
-rw-r--r--gcc/ada/g-sha512.ads1
-rw-r--r--gcc/ada/makeutl.adb2
-rw-r--r--gcc/ada/osint.ads2
-rw-r--r--gcc/ada/prj.ads5
-rw-r--r--gcc/ada/s-sehamd.adb8
-rw-r--r--gcc/ada/s-sehamd.ads2
11 files changed, 39 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9a3556c..dbb8057d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,23 @@
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.
2009-11-30 Gary Dismukes <dismukes@adacore.com>
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index 0412ffb..41b6357 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 25c4039..9b93a19 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 3588d03..ee8177f 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 7971a93..4c1b8b5 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 0fc0dde..c8ebd32 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 1f64da3..ab00b50 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 faeaf10..eeba801 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 88f1ecd..7fd9791 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 893a172..cc04e6a 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 92d913a..206050f 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