From nobody  Sat Nov 14 01:25:19 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id BAA27737;
          Sat, 14 Nov 1998 01:25:19 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199811140925.BAA27737@hub.freebsd.org>
Date: Sat, 14 Nov 1998 01:25:19 -0800 (PST)
From: tah@d1.dion.ne.jp
To: freebsd-gnats-submit@freebsd.org
Subject: other macro name that has same number is used.
X-Send-Pr-Version: www-1.0

>Number:         8681
>Category:       bin
>Synopsis:       other macro name that has same number is used.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 14 01:30:01 PST 1998
>Closed-Date:    Fri Jun 9 14:39:01 CDT 2000
>Last-Modified:  Fri Jun 09 14:39:47 CDT 2000
>Originator:     koyama takahiro
>Release:        2.2.6-RELEASE
>Organization:
>Environment:
maybe all version.
>Description:
at /usr/src/usr.bin/wall/ttymsg.c
macro O_NONBLOCK instead of F_SETFD is used as command for fcntl(2).

>How-To-Repeat:
nothing.

>Fix:
--- ttymsg.c.orig       Fri May 27 21:33:27 1994
+++ ttymsg.c    Sat Nov 14 16:03:14 1998
@@ -116,7 +116,7 @@
                        continue;
                }
                if (errno == EWOULDBLOCK) {
-                       int cpid, off = 0;
+                       int cpid;

                        if (forked) {
                                (void) close(fd);
@@ -139,7 +139,7 @@
                        (void) signal(SIGTERM, SIG_DFL); /* XXX */
                        (void) sigsetmask(0);
                        (void) alarm((u_int)tmout);
-                       (void) fcntl(fd, O_NONBLOCK, &off);
+                       (void) fcntl(fd, F_SETFL, 0);   /* clear O_NONBLOCK */
                        continue;
                }
                /*

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ghelmer 
State-Changed-When: Fri Jun 9 14:39:01 CDT 2000 
State-Changed-Why:  
Committed (ttymsg.c rev 1.5), thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8681 
>Unformatted:
