From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1017 Path: news.gmane.org!not-for-mail From: John Spencer Newsgroups: gmane.linux.lib.musl.general Subject: Re: printf POSIX compliance Date: Fri, 08 Jun 2012 18:46:36 +0200 Message-ID: <4FD22C6C.5040704@barfooze.de> References: <20120608144423.GN163@brightrain.aerifal.cx> <20120608145519.GP163@brightrain.aerifal.cx> <20120608150618.GB17860@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1339173495 3376 80.91.229.3 (8 Jun 2012 16:38:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jun 2012 16:38:15 +0000 (UTC) Cc: Szabolcs Nagy , rrt@sc3d.org To: musl@lists.openwall.com Original-X-From: musl-return-1018-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 08 18:38:11 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 1Sd2C4-0000a1-Ug for gllmg-musl@plane.gmane.org; Fri, 08 Jun 2012 18:37:49 +0200 Original-Received: (qmail 7551 invoked by uid 550); 8 Jun 2012 16:37:48 -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 7539 invoked from network); 8 Jun 2012 16:37:48 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0 In-Reply-To: <20120608150618.GB17860@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:1017 Archived-At: On 06/08/2012 05:06 PM, Szabolcs Nagy wrote: > > i've just checked m4 and it uses freadseek and closein > > both functions are from gnulib and depend on freadahead > > so m4 will use freadahead independently of the printf issue > closein.c reads: " Most programs can get by with close_stdout. close_stdin is only needed when a program wants to guarantee that partially read input from seekable stdin is not consumed, for any subsequent clients. For example, POSIX requires that these two commands behave alike: (sed -ne 1q; cat) < file tail -n 1 file " this is bogus, according to Rich: "all files are closed when a process terminates normally/calls exit. if you want to report write failures, just fflush(stdout) before exit and check the return value" to make this stuff happening, they manipulate the libc-internal FILE struct, which is even more bogus. gnulib is simply a huge pile of junk...