delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/05/05/14:27:48

Message-ID: <39130EA2.D42C42CC@softhome.net>
Date: Fri, 05 May 2000 21:10:42 +0300
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.72 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: gcc-patches AT gcc DOT gnu DOT org
CC: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Fixproto fix
Reply-To: djgpp-workers AT delorie DOT com

Currently fixproto script does not understand DOS style absolute
paths with drive letters. This leads to paths like d:/gcc/obj/c:/djgpp/include
which are incorrect and cause infinite recursion while fixproto'ing
limits.h.

This patch rewrites absolute path checks to make them like in another
script, ylwrap.

(Andris, is it useful in anyway for your 2.95.2 port?)

2000-05-05 Laurynas Biveinis <lauras AT softhome DOT net>

	* fixproto: Recognize DOS paths with drive letters as absolute paths.

--- cvs/gcc/gcc/fixproto	Mon Apr 17 17:40:04 2000
+++ gcc/gcc/fixproto	Fri May  5 20:52:42 2000
@@ -90,11 +90,14 @@
 # "standard" ANSI/POSIX files listed in $std_files are processed.
 src_dir_std=$3
 
-if [ `expr $rel_target_dir : '\(.\)'` != '/' ] ; then
-  abs_target_dir=$original_dir/$rel_target_dir
-else
-  abs_target_dir=$rel_target_dir
-fi
+case $rel_target_dir in
+  /* | [A-Za-z]:[\\/]*)
+     abs_target_dir=$rel_target_dir
+     ;;
+  *)
+     abs_target_dir=$original_dir/$rel_target_dir
+     ;;
+esac
 
 # Determine whether this system has symbolic links.
 if ln -s X $rel_target_dir/ShouldNotExist 2>/dev/null; then
@@ -118,11 +121,14 @@
 
 if [ `echo $* | wc -w` != 0 ] ; then
   for rel_source_dir in $src_dir_all $src_dir_std; do
-    if [ `expr $rel_source_dir : '\(.\)'` != '/' ] ; then
-      abs_source_dir=$original_dir/$rel_source_dir
-    else
-      abs_source_dir=$rel_source_dir
-    fi
+     case $rel_source_dir in
+       /* | [A-Za-z]:[\\/]*)
+         abs_source_dir=$rel_source_dir
+         ;;
+       *)
+         abs_source_dir=$original_dir/$rel_source_dir
+         ;;
+     esac
     include_path="$include_path -I$abs_source_dir"
   done
 fi
@@ -175,11 +181,14 @@
       ;;
   esac
 
-  if [ `expr $rel_source_dir : '\(.\)'` != '/' ] ; then
-    abs_source_dir=$original_dir/$rel_source_dir
-  else
-    abs_source_dir=$rel_source_dir
-  fi
+  case $rel_source_dir in
+    /* | [A-Za-z]:[\\/]*)
+       abs_source_dir=$rel_source_dir
+       ;;
+    *)
+       abs_source_dir=$original_dir/$rel_source_dir
+       ;;
+  esac
 
   if [ \! -d $abs_source_dir ] ; then
     echo $progname\: warning\: no such directory\: \`$rel_source_dir\'

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019