public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs/c-torture.exp/.cexp and 14 char limit
@ 1997-12-05  1:13 Philippe De Muyter
  1997-12-06  9:00 ` Jeffrey A Law
  1998-01-19  2:06 ` Jeffrey A Law
  0 siblings, 2 replies; 7+ messages in thread
From: Philippe De Muyter @ 1997-12-05  1:13 UTC (permalink / raw)
  To: egcs mailing list

Please include the following patch in the egcs source tree.
Without it, c-torture.exp tries to execute some C programs as Expect programs :)


Fri Dec  5 09:52:54 1997  Philippe De Muyter  <phdm@macqel.be>

	* lib/c-torture.exp (c-torture, c-torture-execute): Avoid confusing
 	.c files as .cexp files on 14-char limited filesystems.

--- ./lib/c-torture.exp	Fri Dec  5 09:47:40 1997
+++ ./lib/c-torture.exp	Fri Dec  5 00:38:05 1997
@@ -135,11 +135,15 @@
 
     # Check for alternate driver.
     if [file exists [file rootname $src].cexp] {
-	verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
-	set done_p 0
-	catch "set done_p \[source [file rootname $src].cexp\]"
-	if { $done_p } {
-	    return
+	# Avoid false positive when working on a 14-char fs and src has 14 char.
+	catch "exec cmp $src \[file rootname $src\].cexp" exec_output
+	    if ![string match "" $exec_output] then {
+	    verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
+	    set done_p 0
+	    catch "set done_p \[source [file rootname $src].cexp\]"
+	    if { $done_p } {
+		return
+	    }
 	}
     }
    
@@ -290,13 +294,17 @@
 
     # Check for alternate driver.
     if [file exists [file rootname $src].cexp] {
-	verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
-	set done_p 0
-	catch "set done_p \[source [file rootname $src].cexp\]"
-	if { $done_p } {
-	    return
+	# Avoid false positive when working on a 14-char fs and src has 14 char.
+	catch "exec cmp $src \[file rootname $src\].cexp" exec_output
+	    if ![string match "" $exec_output] then {
+		verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
+		set done_p 0
+		catch "set done_p \[source [file rootname $src].cexp\]"
+		if { $done_p } {
+		    return
+		}
+	    }
 	}
-    }
    
     # Look for a loop within the source code - if we don't find one,
     # don't pass -funroll[-all]-loops.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-01-19  2:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-05  1:13 egcs/c-torture.exp/.cexp and 14 char limit Philippe De Muyter
1997-12-06  9:00 ` Jeffrey A Law
1997-12-06 14:13   ` Philippe De Muyter
1997-12-07 20:11     ` Jeffrey A Law
1997-12-08  4:13       ` Philippe De Muyter
1997-12-16 14:02       ` Philippe De Muyter
1998-01-19  2:06 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).