From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 8F6772EA53 for ; Sat, 26 Oct 2024 04:11:55 +0200 (CEST) Received: (qmail 25755 invoked by uid 550); 26 Oct 2024 02:11:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com x-ms-reactions: disallow Received: (qmail 25719 invoked from network); 26 Oct 2024 02:11:49 -0000 Date: Fri, 25 Oct 2024 22:11:41 -0400 From: Rich Felker To: Thorsten Glaser Cc: musl@lists.openwall.com, Alyssa Ross Message-ID: <20241026021141.GZ10433@brightrain.aerifal.cx> References: <878quc7xzy.fsf@alyssa.is> <20241025201011.GY10433@brightrain.aerifal.cx> <874j4zoob8.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Prototypes without implementations On Sat, Oct 26, 2024 at 03:57:15AM +0200, Thorsten Glaser wrote: > On Sat, 26 Oct 2024, Laurent Bercot wrote: > > > I'd rather have libcs omit stub implementations entirely, so that > > applications can test for functionality without having to run anything. > > Stub implementations make tests and integration of replacement > > Fully agreed. It’s easy to make a compile+link test; my autoconf > replacement depends on it (and does that right) but runtime is a > whole other issue. > > I don’t even mind about headers declaring functions that aren’t > there because only a fool tool would look at headers only… though > omitting them when it’s easy to know (e.g. via cpp predefs) it’s > not there is of course better. My leaning would be not to do the ENOSYS thing, not only for this reason, but because doing so might preclude having them with a different signature on a different arch, if that were later needed. I'm not sure how realistic that happening is, but if it's plausible, it might be a good argument for moving the prototypes back to the x86-specific bits headers like I think Alyssa was proposing. OTOH it looks like some other archs already have these syscalls, and that was the motivation for the original change.. so more investigation is probably needed. Rich