OSDN Git Service

(rel_source_subdir): Prune out redundant /subdir/../ to prevent recursion.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Nov 1993 11:01:01 +0000 (11:01 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Nov 1993 11:01:01 +0000 (11:01 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6068 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fixproto

index 5018a46..4ed8070 100755 (executable)
@@ -192,6 +192,11 @@ for code in ALL STD ; do
          do
            new_files_to_check=""
            for file in $files_to_check ; 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
              case " $rel_source_files " in
                *" ${file} "*)
                  # Already seen $file; nothing to do