aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-06-12 12:16:11 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-06-12 12:16:11 +0200
commit05a0a2ead1f4ecdf5cf5e59ab0abeba7c04dfa44 (patch)
treee2941c4348334dfec9994e52793183c6d5699a10 /gcc/ada
parent93901a431ff1050faddba401484ee8cc9c553e90 (diff)
downloadgcc-05a0a2ead1f4ecdf5cf5e59ab0abeba7c04dfa44.zip
gcc-05a0a2ead1f4ecdf5cf5e59ab0abeba7c04dfa44.tar.gz
gcc-05a0a2ead1f4ecdf5cf5e59ab0abeba7c04dfa44.tar.bz2
[multiple changes]
2012-06-12 Robert Dewar <dewar@adacore.com> * lib-xref.ads: Minor reformatting. 2012-06-12 Pascal Obry <obry@adacore.com> * a-direct.adb (Delete_File): Delete symbolic links silently instead of raising the Name_Error exception when the symbolic link is pointing to a non existent file. From-SVN: r188440
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/a-direct.adb12
-rw-r--r--gcc/ada/lib-xref.ads2
3 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 42f3653..d65c794 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,15 @@
2012-06-12 Robert Dewar <dewar@adacore.com>
+ * lib-xref.ads: Minor reformatting.
+
+2012-06-12 Pascal Obry <obry@adacore.com>
+
+ * a-direct.adb (Delete_File): Delete symbolic links silently
+ instead of raising the Name_Error exception when the symbolic
+ link is pointing to a non existent file.
+
+2012-06-12 Robert Dewar <dewar@adacore.com>
+
* xref_lib.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
2012-06-12 Javier Miranda <miranda@adacore.com>
diff --git a/gcc/ada/a-direct.adb b/gcc/ada/a-direct.adb
index 903440b..61de323 100644
--- a/gcc/ada/a-direct.adb
+++ b/gcc/ada/a-direct.adb
@@ -31,20 +31,20 @@
with Ada.Calendar; use Ada.Calendar;
with Ada.Calendar.Formatting; use Ada.Calendar.Formatting;
+with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Directories.Validity; use Ada.Directories.Validity;
-with Ada.Strings.Maps; use Ada.Strings.Maps;
with Ada.Strings.Fixed;
+with Ada.Strings.Maps; use Ada.Strings.Maps;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
-with Ada.Characters.Handling; use Ada.Characters.Handling;
+with System; use System;
with System.CRTL; use System.CRTL;
+with System.File_IO; use System.File_IO;
with System.OS_Constants; use System.OS_Constants;
with System.OS_Lib; use System.OS_Lib;
with System.Regexp; use System.Regexp;
-with System.File_IO; use System.File_IO;
-with System; use System;
package body Ada.Directories is
@@ -561,7 +561,9 @@ package body Ada.Directories is
if not Is_Valid_Path_Name (Name) then
raise Name_Error with "invalid path name """ & Name & '"';
- elsif not Is_Regular_File (Name) then
+ elsif not Is_Regular_File (Name)
+ and then not Is_Symbolic_Link (Name)
+ then
raise Name_Error with "file """ & Name & """ does not exist";
else
diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads
index c0fd316..faf715a 100644
--- a/gcc/ada/lib-xref.ads
+++ b/gcc/ada/lib-xref.ads
@@ -366,7 +366,7 @@ package Lib.Xref is
-- of the current file.
-- a reference (e.g. a call) at line 8 column 4 of the
- -- of the current file.
+ -- current file.
-- the END line of the body has an explicit reference to
-- the name of the procedure at line 12, column 13.