Subject: bin/6681: Wrong #if logic for longjmp protection in mail
To: None <gnats-bugs@gnats.netbsd.org>
From: None <eramer@era-t.ericsson.se>
List: netbsd-bugs
Date: 12/29/1998 21:46:53
>Number:         6681
>Category:       bin
>Synopsis:       Wrong #if logic for longjmp protection in mail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 29 13:05:00 1998
>Last-Modified:
>Originator:     Michael Eriksson
>Organization:
Michael Eriksson <eramer@era-t.ericsson.se>
>Release:        -current of 981226
>Environment:

>Description:

Gcc 2.7.2 checks for longjmp clobbering of stack variables. Because of
an extra (bogus) negation in an #if, usr.bin/mail/tty.c fails to
compile with gcc 2.7.2.

>How-To-Repeat:

Try to compile the mail program with gcc 2.7.2.

>Fix:

--- usr.bin/mail/tty.c.orig	Sun Dec 20 13:17:51 1998
+++ usr.bin/mail/tty.c	Tue Dec 29 14:05:20 1998
@@ -84,7 +84,7 @@
 
 #ifdef __GNUC__
 	/* Avoid longjmp clobbering */
-# if !defined(TIOCSTI) && defined(TIOCEXT)
+# if defined(TIOCSTI) && defined(TIOCEXT)
 	(void) &extproc;
 # endif
 	(void) &saveint;

>Audit-Trail:
>Unformatted: