From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2486 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: SoX & pipe rewinding Date: Fri, 14 Dec 2012 16:17:34 -0600 Message-ID: <1355523454.18402.8@driftwood> References: <20121214134009.GJ20323@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; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1355527700 14757 80.91.229.3 (14 Dec 2012 23:28:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2012 23:28:20 +0000 (UTC) Cc: musl@lists.openwall.com To: musl@lists.openwall.com Original-X-From: musl-return-2487-gllmg-musl=m.gmane.org@lists.openwall.com Sat Dec 15 00:28:29 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 1Tjeg8-0002pP-RP for gllmg-musl@plane.gmane.org; Sat, 15 Dec 2012 00:28:28 +0100 Original-Received: (qmail 17730 invoked by uid 550); 14 Dec 2012 23:28:14 -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 17713 invoked from network); 14 Dec 2012 23:28:11 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:subject:to:cc:in-reply-to:x-mailer:message-id :mime-version:content-type:content-disposition :content-transfer-encoding:x-gm-message-state; bh=cxcZ1fyPRBK8odEu/ybQDcnd5Wszl0lDuMvkvHfiiKY=; b=Q6mjYWb7QBXosptPvF0Z9+bGpBgdu2yqwfNGElW4oQq1OAupUN8IKuwQjo5DzoqLCJ bZ+QNbTz4Md4z6juZUv3r/esQTlVrcF+TVBiflo2MS1/6l8qEpfmpwtMYh1QWUdHf//+ RgX5tam86eb4qHRjYsWeSLlUpMjPKqSl2HKbSC1Q6lfJPLny3OuUV9kjqwpU2T/W3P8b 3faNEDSzBYWitYQHGXO6vURG5ViP964J2G1rvQZqPk3oDQIkiiGdvPWjbCI3O39JL65e hYPFm9nkxdJhOk6k6VODxyqeCfdBH0CKIxyLisKlWAeAlX5YUKl5dtPqi444GAlbDO2v rbUg== In-Reply-To: <20121214134009.GJ20323@brightrain.aerifal.cx> (from dalias@aerifal.cx on Fri Dec 14 07:40:09 2012) X-Mailer: Balsa 2.4.11 Content-Disposition: inline X-Gm-Message-State: ALoCoQnr6cKQCz9VQzIt/xOGF5m6ztHB9yaUeXRxUwndS92x/U9d/PFfcIUFALuUmsW79yPG43yz Xref: news.gmane.org gmane.linux.lib.musl.general:2486 Archived-At: On 12/14/2012 07:40:09 AM, Rich Felker wrote: > 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? Create a wrapper FILE object that passes through most operations but =20 copies incoming data to a ring buffer you can re-read previous data out =20 of. > > 2. Is there any musl specific #define? >=20 > I don't believe so. Which is annoying. Imagine an OS kernel that refused to identify itself because its author =20 didn't want software knowing it was running on it. Because it's PERFECT =20 and knows it's perfect sight unseen, and thus nobody out in the world =20 should ever need to work around its perfection, and anyone who uses it =20 is _required_ not to. > No idea why programmers insist on doing stuff like this rather than > fixing their design issues... It's such a crazy thing to want to do that both posix and ISO C =20 standardize an ungetc() function. Other programmers don't write code the way you would write it. And when =20 you try to force them, you make the result even uglier. For example, if a program really wants to know whether or not it's =20 running against musl right now, a dynamically linked program can do =20 something like "strings /proc/self/exe | grep ld-musl", and just refuse =20 to work staticaly linked. (Yes, this is utterly horrible, but if you =20 refuse to have an #define people can check I just about guarantee you =20 somebody will do this sooner or later. Or worse.) Rob=