From nobody@FreeBSD.ORG  Mon Oct  2 03:28:22 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 31B8237B502; Mon,  2 Oct 2000 03:28:22 -0700 (PDT)
Message-Id: <20001002102822.31B8237B502@hub.freebsd.org>
Date: Mon,  2 Oct 2000 03:28:22 -0700 (PDT)
From: barak_enat@yahoo.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: libedit does not #include <fcntl.h> causing some code in read.c to be ifdef'd out
X-Send-Pr-Version: www-1.0

>Number:         21697
>Category:       misc
>Synopsis:       libedit does not #include <fcntl.h> causing some code in read.c to be ifdef'd out
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 02 03:30:01 PDT 2000
>Closed-Date:    Mon Oct 2 15:08:04 PDT 2000
>Last-Modified:  Mon Oct 02 15:08:26 PDT 2000
>Originator:     Barak Enat
>Release:        
>Organization:
>Environment:
>Description:
in libedit the file read.c include some code to handle the case of stdin becoming NON blocking. this is done in the function read__fixio.
however, the # if defined(F_SETFL) && defined(O_NDELAY) line is evaluated to false preventing this code from compiling. this is because Cis missing from the compilation.


>How-To-Repeat:
to see the problem run sh -E, and then execute a program that sets STDIN to NB mode. when the program terminates, sh keeps beeping, since libedit doesn't return STDIN to blocking mode.

>Fix:
fix the compilation to have
#include <fcntl.h>


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Mon Oct 2 15:08:04 PDT 2000 
State-Changed-Why:  
Fixed in -current - thanks. 
I'll MFC in a week. 

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