diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-29 14:37:47 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-29 14:37:47 +0000 |
commit | 74f4e9cabfdd34f73ac875aee86528da4db5f588 (patch) | |
tree | 96e7cff9bff407ddd4bf83ecf523ff267e7bdd1a /gcc | |
parent | cda17ef4a56b54f1c897dab2ccbbf385deef9919 (diff) | |
download | gcc-74f4e9cabfdd34f73ac875aee86528da4db5f588.tar.gz |
2013-01-29 Ben Brosgol <brosgol@adacore.com>
* gnat_rm.texi: Fixed typos. Minor edits.
2013-01-29 Bob Duff <duff@adacore.com>
* a-convec.adb: Minor reformatting.
2013-01-29 Pascal Obry <obry@adacore.com>
* tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
directory.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195548 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/ada/a-convec.adb | 6 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 9 | ||||
-rw-r--r-- | gcc/ada/tempdir.adb | 53 | ||||
-rw-r--r-- | gcc/ada/tempdir.ads | 8 |
5 files changed, 60 insertions, 29 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 73ddbfb5711..ec58e95cb8f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2013-01-29 Ben Brosgol <brosgol@adacore.com> + + * gnat_rm.texi: Fixed typos. Minor edits. + +2013-01-29 Bob Duff <duff@adacore.com> + + * a-convec.adb: Minor reformatting. + +2013-01-29 Pascal Obry <obry@adacore.com> + + * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp + directory. + 2013-01-29 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb index 6282301dd33..a67c156c2bc 100644 --- a/gcc/ada/a-convec.adb +++ b/gcc/ada/a-convec.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -582,8 +582,8 @@ package body Ada.Containers.Vectors is C := Capacity; else - raise Capacity_Error - with "Requested capacity is less than Source length"; + raise Capacity_Error with + "Requested capacity is less than Source length"; end if; return Target : Vector do diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 15d1901c8d4..bdad3f62a81 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -2893,7 +2893,7 @@ implementation_kind ::= By_Entry | By_Protected_Procedure | By_Any This is an Ada 2012 representation pragma which applies to protected, task and synchronized interface primitives. The use of pragma Implemented provides a way to impose a static requirement on the overriding operation by adhering -to one of the three implementation kids: entry, protected procedure or any of +to one of the three implementation kinds: entry, protected procedure or any of the above. This pragma is available in all earlier versions of Ada as an implementation-defined pragma. @@ -3237,7 +3237,7 @@ of the same name). It is also available as an implementation-defined pragma in all earlier versions. It specifies that the designated object or all objects of the designated type must be independently addressable. This means that separate tasks can safely -manipulate such objects. For example, if two comonents of a record are +manipulate such objects. For example, if two components of a record are independent, then two separate tasks may access these two components. This may place constraints on the representation of the object (for instance prohibiting @@ -3257,9 +3257,10 @@ pragma Independent_Components (Local_NAME); This pragma is standard in Ada 2012 mode (which also provides an aspect of the same name). It is also available as an implementation-defined pragma in all earlier versions. It specifies that the components of the -designated object or all objects of the designated type must be +designated object, or the components of each object of the designated +type, must be independently addressable. This means that separate tasks can safely -manipulate separate components in the composite object. this may place +manipulate separate components in the composite object. This may place constraints on the representation of the object (for instance prohibiting tight packing). diff --git a/gcc/ada/tempdir.adb b/gcc/ada/tempdir.adb index b4433075080..7da1ef2d040 100644 --- a/gcc/ada/tempdir.adb +++ b/gcc/ada/tempdir.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,8 +35,7 @@ package body Tempdir is Tmpdir : constant String := "TMPDIR"; Gnutmpdir : constant String := "GNUTMPDIR"; - No_Dir : aliased String := ""; - Temp_Dir : String_Access := No_Dir'Access; + Temp_Dir : String_Access := new String'(""); ---------------------- -- Create_Temp_File -- @@ -46,7 +45,7 @@ package body Tempdir is (FD : out File_Descriptor; Name : out Path_Name_Type) is - File_Name : String_Access; + File_Name : String_Access; Current_Dir : constant String := Get_Current_Dir; function Directory return String; @@ -60,7 +59,6 @@ package body Tempdir is begin if Temp_Dir'Length /= 0 then return Temp_Dir.all; - else return Current_Dir; end if; @@ -102,7 +100,6 @@ package body Tempdir is Path_Name : constant String := Normalize_Pathname (Directory & Directory_Separator & File_Name.all); - begin Name_Len := Path_Name'Length; Name_Buffer (1 .. Name_Len) := Path_Name; @@ -112,35 +109,49 @@ package body Tempdir is end if; end Create_Temp_File; --- Start of elaboration for package Tempdir + ------------------ + -- Use_Temp_Dir -- + ------------------ -begin - declare + procedure Use_Temp_Dir (Status : Boolean) is Dir : String_Access; begin - -- On VMS, if GNUTMPDIR is defined, use it + if Status then - if OpenVMS then - Dir := Getenv (Gnutmpdir); + -- On VMS, if GNUTMPDIR is defined, use it - -- Otherwise, if GNUTMPDIR is not defined, try TMPDIR + if OpenVMS then + Dir := Getenv (Gnutmpdir); - if Dir'Length = 0 then + -- Otherwise, if GNUTMPDIR is not defined, try TMPDIR + + if Dir'Length = 0 then + Dir := Getenv (Tmpdir); + end if; + + else Dir := Getenv (Tmpdir); end if; - - else - Dir := Getenv (Tmpdir); end if; - if Dir'Length > 0 and then - Is_Absolute_Path (Dir.all) and then - Is_Directory (Dir.all) + Free (Temp_Dir); + + if Dir /= null + and then Dir'Length > 0 + and then Is_Absolute_Path (Dir.all) + and then Is_Directory (Dir.all) then Temp_Dir := new String'(Normalize_Pathname (Dir.all)); + else + Temp_Dir := new String'(""); end if; Free (Dir); - end; + end Use_Temp_Dir; + +-- Start of elaboration for package Tempdir + +begin + Use_Temp_Dir (Status => True); end Tempdir; diff --git a/gcc/ada/tempdir.ads b/gcc/ada/tempdir.ads index 7ab1b5aff86..bf8ab266642 100644 --- a/gcc/ada/tempdir.ads +++ b/gcc/ada/tempdir.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -44,4 +44,10 @@ package Tempdir is -- directory. If temporary file cannot be created, FD gets the value -- Invalid_FD and Name gets the value No_Name. + procedure Use_Temp_Dir (Status : Boolean); + -- Specify if the temp file should be created in the system temporary + -- directory as specified by the corresponding environment variables. If + -- Status is False, the temp files will be created into the current working + -- directory. + end Tempdir; |