From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2473 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: SoX & pipe rewinding Date: Fri, 14 Dec 2012 08:40:09 -0500 Message-ID: <20121214134009.GJ20323@brightrain.aerifal.cx> References: <50CB2B38.8070703@ojab.ru> 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: ger.gmane.org 1355492424 23130 80.91.229.3 (14 Dec 2012 13:40:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2012 13:40:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2474-gllmg-musl=m.gmane.org@lists.openwall.com Fri Dec 14 14:40:38 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 1TjVVD-0007X2-W9 for gllmg-musl@plane.gmane.org; Fri, 14 Dec 2012 14:40:36 +0100 Original-Received: (qmail 31780 invoked by uid 550); 14 Dec 2012 13:40:23 -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 31772 invoked from network); 14 Dec 2012 13:40:22 -0000 Content-Disposition: inline In-Reply-To: <50CB2B38.8070703@ojab.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2473 Archived-At: On Fri, Dec 14, 2012 at 05:35:52PM +0400, ojab wrote: > Hi list, > SoX use some kind of hackery for pipe rewinding (see the attached > file). So I have two questions: > 1. If something like that possible using musl? > 2. Is there any musl specific #define? I don't believe so. Not only does this hack depend on knowing the internals of FILE (which are intentionally opaque on musl); it also depends on the assumption that the data is still present in the buffer after it's consumed, which is invalid in general. No idea why programmers insist on doing stuff like this rather than fixing their design issues... Rich