summaryrefslogtreecommitdiff
path: root/gcc/ada/s-os_lib.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-20 13:52:08 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-20 13:52:08 +0000
commit32de816bbbe685dfa9c2b491b15579cf379d03e4 (patch)
tree6f9c2f011ad7373733907f5eea8eb01d6244e444 /gcc/ada/s-os_lib.ads
parenteb4f7efad4f3a03ac2f9b8162f7d2179c46fb644 (diff)
downloadgcc-32de816bbbe685dfa9c2b491b15579cf379d03e4.tar.gz
2014-02-20 Vincent Celier <celier@adacore.com>
* errutil.adb (Initialize): Properly initialize entry in table Warnings when warnings are suppressed. 2014-02-20 Robert Dewar <dewar@adacore.com> * s-os_lib.ads: Add warning about non-portability of Rename_File. * sem_util.ads, sem_util.adb (Is_Junk_Name): New function. * sem_warn.adb: Use Is_Junk_Name to suppress some warnings. * gnat_ugn.texi: Document no warnings on junk variable names. * layout.adb: Minor code reorganization (use Ekind_In). * stringt.adb: Move initialization of Null_String_Id to Initialize routine. 2014-02-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Initialize optional Element_Id. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-os_lib.ads')
-rw-r--r--gcc/ada/s-os_lib.ads11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ada/s-os_lib.ads b/gcc/ada/s-os_lib.ads
index 00aebc24e1a..03557b65597 100644
--- a/gcc/ada/s-os_lib.ads
+++ b/gcc/ada/s-os_lib.ads
@@ -301,9 +301,14 @@ package System.OS_Lib is
New_Name : String;
Success : out Boolean);
-- Rename a file. Success is set True or False indicating if the rename is
- -- successful or not. Note that on some Systems (notably Windows), if there
- -- is already an existing file with the name New_Name, that is one of the
- -- conditions that can cause failure.
+ -- successful or not.
+ --
+ -- WARNING: In one very important respect, this function is significantly
+ -- non-portable. If New_Name already exists then on Unix systems, the call
+ -- deletes the existing file, and the call signals success. On Windows, the
+ -- call fails, without doing the rename operation. See also the procedure
+ -- Ada.Directories.Rename, which portably provides the windows semantics,
+ -- i.e. fails if the output file already exists.
-- The following defines the mode for the Copy_File procedure below. Note
-- that "time stamps and other file attributes" in the descriptions below