From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1536 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Priorities for next release? Date: Sat, 11 Aug 2012 16:56:33 -0400 Message-ID: <20120811205633.GM27715@brightrain.aerifal.cx> References: <20120810191254.GA13232@brightrain.aerifal.cx> <20120811195649.GK27715@brightrain.aerifal.cx> <20120811205128.GL27715@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1344718552 24589 80.91.229.3 (11 Aug 2012 20:55:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2012 20:55:52 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1537-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 11 22:55:51 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T0Iin-0002nb-4V for gllmg-musl@plane.gmane.org; Sat, 11 Aug 2012 22:55:45 +0200 Original-Received: (qmail 13664 invoked by uid 550); 11 Aug 2012 20:55:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 13656 invoked from network); 11 Aug 2012 20:55:43 -0000 Content-Disposition: inline In-Reply-To: <20120811205128.GL27715@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1536 Archived-At: On Sat, Aug 11, 2012 at 04:51:28PM -0400, Rich Felker wrote: > > I'm sending fgetln.c (+my diff), but please check it... > > btw. it based on /usr.bin/make/util.c from OpenBSD: > > If we add fgetln, I'd like a much higher quality of implementation. > It's not clear from the past documentation I've read for this function > that it's allowed to use a shared static buffer for all FILEs, and > even if it were, I find that really ugly. Instead, simply returning a Indeed, even the man page you included states that the returned buffer becomes invalid after the next I/O operation on stream, not after a call to fgetln on a different stream. Thus I think the implementation fails to conform to the contract documented in the man page.. Rich