From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6486 Path: news.gmane.org!not-for-mail From: Timo Teras Newsgroups: gmane.linux.lib.musl.general Subject: Re: Nonstandard functions with callbacks Date: Tue, 11 Nov 2014 15:56:33 +0200 Message-ID: <20141111155633.25865b1a@vostro> References: <20141111045046.GA25461@brightrain.aerifal.cx> <20141111092253.15b592df@vostro> <20141111134653.GH22465@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 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1415714255 26542 80.91.229.3 (11 Nov 2014 13:57:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2014 13:57:35 +0000 (UTC) Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-6499-gllmg-musl=m.gmane.org@lists.openwall.com Tue Nov 11 14:57:28 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XoBwk-0005Pk-2p for gllmg-musl@m.gmane.org; Tue, 11 Nov 2014 14:57:26 +0100 Original-Received: (qmail 16079 invoked by uid 550); 11 Nov 2014 13:57:24 -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 16065 invoked from network); 11 Nov 2014 13:57:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Hc4CnsGQbEu02CY7oF/UR0JX8AjyRnWhFrUwYjqN8Q8=; b=r0lrWDKpuFZTaT6Lrn9FEdvTUZiznmBh+jm/NirVRfMi4GnNiXqBthIw/EQ29o7BpK 4CwIBgDq7sWzlvn7WEP1BNxaE3dxv1M9zpkgfX7/VmfZ7W6BGq0qlYuUBRUp16Dg3sCt h5RrA8IWrPek4h2+R4CAszdZzKvhAYwjFDCXUb2W9hWfonlnojeoZ4REcqExrGGsnIZd oZwPlUP8PdLfTToDa/0BCsQecwaS4G1U7EQnT18+Qz54W6EUHo8vB67Wmm2ReeEPgf2V HOFfaVtVO0dB44BoEfMvluqC4juGfHll8/LAj9R7/hCL+j3VpJKEgBuRUDEZ26Xv504x jc2w== X-Received: by 10.112.136.164 with SMTP id qb4mr36621038lbb.62.1415714233082; Tue, 11 Nov 2014 05:57:13 -0800 (PST) Original-Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= In-Reply-To: <20141111134653.GH22465@brightrain.aerifal.cx> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-alpine-linux-musl) Xref: news.gmane.org gmane.linux.lib.musl.general:6486 Archived-At: On Tue, 11 Nov 2014 08:46:53 -0500 Rich Felker wrote: > While of course I can't make the decision for you, I'd really > encourage distros not to add to or change the public API in musl in > ways that are not expected to ever make it upstream. The result is > application binaries that have an undocumented dependency on your > distro-specific version of musl and that won't work elsewhere, which > is not so much of an issue for your own distro binaries, but is a > potential gotcha for anyone compiling their own binaries on your dist > and expecting them to work on other musl-based systems. Up to now I've > been trying to reduce and hopefully eliminate the Alpine patches to > musl that affect public interfaces and I think we're almost there. Yes, we are not doing hasty decisions. So it's on hold for the time being. I filed bug against Asterisk to see what happens. They are supposed supporting Solaris and Mingw, which both lack this functionality. It seems to have broken on Asterisk 13. Well TLS will not work without that, but in Asterisk 13 they broke regular non-TLS tcp connections... > Have you looked at what other programs do as a fallback when there's > no fopencookie? I don't think it's possible to match the API 100% with > this approach (seeking won't work, for instance), but it seems > possible to do a fallback implementation based on pthread_create and > socketpair that doesn't depend on implementation internals of stdio, > so that it could go into the application or a shim library. No. This is not simple. The read and write callbacks take timer value from cookie, and they block up until specific timeout. So yeah, it goes basically even weirder. They modify semantics of fread() and fwrite() which is kinda nasty. Either way it's a can of worms. So we are stopping for a moment and re-evaluating options. /Timo