summaryrefslogtreecommitdiff
path: root/gcc/fixproto
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-11-11 11:01:01 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-11-11 11:01:01 +0000
commitc014b59f14e7fe4397ae93f05a13eb24408c1456 (patch)
tree429a119b2e74c991210ab19d710f89569abb4281 /gcc/fixproto
parent59c7b0c29d618a45b8b6e027d050bfeacbc4cb1d (diff)
downloadgcc-c014b59f14e7fe4397ae93f05a13eb24408c1456.tar.gz
(rel_source_subdir): Prune out redundant /subdir/../ to prevent recursion.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6068 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixproto')
-rwxr-xr-xgcc/fixproto5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fixproto b/gcc/fixproto
index 5018a4642f3..4ed80709d79 100755
--- a/gcc/fixproto
+++ b/gcc/fixproto
@@ -192,6 +192,11 @@ for code in ALL STD ; do
do
new_files_to_check=""
for file in $files_to_check ; do
+ xxfile=`echo $file | sed -e 's|/\([^/\.][^/\.]*\)/\.\./|/|'`
+ # Just in case we have edited out a symbolic link
+ if [ -f $src_dir_std/$file -a -f $src_dir_std/$xxfile ] ; then
+ file=$xxfile
+ fi
case " $rel_source_files " in
*" ${file} "*)
# Already seen $file; nothing to do