From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2474 Path: news.gmane.org!not-for-mail From: ojab Newsgroups: gmane.linux.lib.musl.general Subject: Re: SoX & pipe rewinding Date: Fri, 14 Dec 2012 17:51:40 +0400 Message-ID: <50CB2EEC.2040909@ojab.ru> References: <50CB2B38.8070703@ojab.ru> <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=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1355493119 29938 80.91.229.3 (14 Dec 2012 13:51:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2012 13:51:59 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2475-gllmg-musl=m.gmane.org@lists.openwall.com Fri Dec 14 14:52:14 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 1TjVgO-0002FA-3R for gllmg-musl@plane.gmane.org; Fri, 14 Dec 2012 14:52:08 +0100 Original-Received: (qmail 3936 invoked by uid 550); 14 Dec 2012 13:51:55 -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 3928 invoked from network); 14 Dec 2012 13:51:55 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=wpocOZiNBpVnjbMusBF5gaGp2fQfVESzP20u9oXyxQw=; b=LrrsymGcE/VYXFn5IfwQgXKeEcVlYPiypmiS+RXn9SdwXphtHt1QWy6aiX8fT7PnIF LdaXDneE2OMVm1hF/3bhjEZ6uk7sZfJcgWVz7xGMbyCySz5Rmq9y5zPEYozpygJHWwXV wHrZjtEAv/u6/tfZXhS0oNCZeY5N7bQFDx76mPr0jwQH1eMJoeUs0CzUCHVtn4Oa/2NW V6Y26x0+j8xU+aA54sT0Q8sP/FMn96+FXIgttVsXvYHUG1l6BzYWie5Xl2kLAJvRmEUu 37eU9cvDZ5q8u0Fkm1O7xENqhRLteY14gsa6Fkz1sRaaeuGah8UKFcxst+lnIM/RFCkl jTeg== User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Thunderbird/20.0a1 In-Reply-To: <20121214134009.GJ20323@brightrain.aerifal.cx> X-Gm-Message-State: ALoCoQmy6ZrD5As3noGgEi+9A5hbvz42P+zoqr/V7FU/2cYbgyLp5X+xLgAu7997+qlQZ8VXZozo Xref: news.gmane.org gmane.linux.lib.musl.general:2474 Archived-At: On 14.12.2012 17:40, 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? >> >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 > It's completely optional (check the #else part), so question is (2): How we can check for musl and disable pipe rewinding in this case. If there is no musl-specific define, and there is intention not to add one — I'll file a bug in SoX tracker with request to remove an #error. //wbr ojab.