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 D5F952FC5F for ; Sat, 26 Oct 2024 03:21:43 +0200 (CEST) Received: (qmail 3664 invoked by uid 550); 26 Oct 2024 01:21:37 -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 3628 invoked from network); 26 Oct 2024 01:21:37 -0000 From: "Laurent Bercot" To: musl@lists.openwall.com Date: Sat, 26 Oct 2024 01:21:23 +0000 Message-Id: In-Reply-To: <874j4zoob8.fsf@alyssa.is> References: <878quc7xzy.fsf@alyssa.is> <20241025201011.GY10433@brightrain.aerifal.cx> <874j4zoob8.fsf@alyssa.is> User-Agent: eM_Client/10.0.3530.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re[2]: [musl] Prototypes without implementations >I think ENOSYS is probably the way to go, especially since (via the >kernel) that's already happening on some architectures. Note that providing ENOSYS implementations makes cross-compiling=20 harder. When the libc provides no implementation, a sysdep test can compile and link a program using the API, and conclude that the functionality doesn't exist when the link fails. This works when cross-compiling. When the libc provides an ENOSYS implementation, the link will succeed, and a sysdep test needs to *run* a program to check that the functionality works correctly. This is not possible when=20 cross-compiling. 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 implementations more difficult. (And not even only for cross builds. Looking at you, musl's utmp functions.) -- Laurent