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=-2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,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 847622FE65 for ; Sat, 26 Oct 2024 10:26:31 +0200 (CEST) Received: (qmail 26166 invoked by uid 550); 26 Oct 2024 08:26:27 -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 26129 invoked from network); 26 Oct 2024 08:26:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1729931178; x=1730535978; i=nullplan@gmx.net; bh=lf01RP/nu8bf4p86hHPaMHuvtnp69UHujTgMscpA8qk=; h=X-UI-Sender-Class:Date:From:To:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=MRxCz/2h1YFsVGfryZWUiruzuBYgd3IbvjwmUY0M+bCKUAJ3Qb/QdDuS7kEx6luF UaHP84zgxsvuD+1fZ0dit07z+vnEKc9CA/SfOq4c2a/INH+nduL0Z055R6Qyn0veC GwX9fvrtbRDfkHB6wz7sYW1TNrMhKkUgLGPHaD1c8zZJPU2RskTTebzyCc1H/7vhx 27TiuUOvHZkbfM4dNgpvuQP15IcDY+ZwHNPHWPn+olQ+tQDNNmp3XM7iS157A7MbV nuIqdslLtJNRoEaBMLvNRaVYRvjetrC9pLE/oIImJr5iUYU8Ic9qS5ZhMAGyyjGlA rr69j9ykkAMUHydWoA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Sat, 26 Oct 2024 10:26:16 +0200 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: References: <878quc7xzy.fsf@alyssa.is> <20241025201011.GY10433@brightrain.aerifal.cx> <874j4zoob8.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:/IQuWiUwtjBw0gG4xIIl3ERkCDhZsSbuASbUE1BZjPg8TR5clpl mrI1I8c2PDl0PrD25hK7vJG8KfPiMYmcJu3tRHfFuhbMqx1b+uBb6ngNf37mx+/VN75Dzlw P/r27xoUB0hO3OGty/8RS/vZzWUBX3OeNDolOlJOLVBzHC8oVqMlfrYcUzFzwCgj/TDmkAZ NJHQJWyxZ9WvNKO6xXpiA== UI-OutboundReport: notjunk:1;M01:P0:b3cszgP6aKo=;82T9bOYKXXVmqR7nB2ngsrYP3L1 YaYM69PvqT0/BFQEEGcEyrkSYtidHRVbw1+rOZVh1ndEfDY07jN89EI4m564KhxHdVhOfdZuy XO9pvSXMC7y6+EENflp70h/7mQZZo0FSzIK+fvVt2p4F2qsiC61gQLLr8yjNUjwNT8tjRh6Gl IjPp/RKPBvwITEONPQ0/3A7eHr2bJVdzQOpdZ9mBWWQ1PBidroWy0KzvfqYa9Kp10VhqzgKkq z+RxHUkOaJgh1eCa2LYLfuzS29StIinLlM99eogoU1VJSn4tMUXxzNBl4LTZxukZ4UMZZ7avy igvmMu3za7fA7ov4imn2JYDzpnruA5vS2z0ikgaWGmpE72f2tJnfrqqYlc6tzMT9zYsfGpcHP +w0qBr5fTWMZuHrYBc4qic93eJMFr8JmqWlYoqoRw4kXRJd9lKU8fmPRsGkzuxNSdNIE1bBmP nMjc1pKn91NkNQwAkQkOV4oUDNX0S2rqSgd1rbIRva1ZqeBRYsQHt+2bV0qcWt1jjWL8dNwdv N117zFcUgNJ6Qo4yj3zafOQDYGie7PXoEunXyq0JXdocq0ImRf/35yYD6BT0ZeNMcRBLa4Ysu +UnBZcGRHmcgmf+7XE1mxQm8ly5tj1Sj7KcqSV14b67h1UT/Fmcbt2uXFPI2mPC0wHU8DwpqR TNcSAfnsRoZFBwJQbldVo++dezTD3xJFrX6Sfikb/qWhGe49UZReYXoChfcBTSa3egLPoTCLK m7ATcl6Y10Apty728cfFkiEOKCjavUSXJuYnKweOpIG/4BZyby9q5EgsAnY9ZeAjoxks1+gBQ YgRpFB9xzvoX19B2PsZdCifA== Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Prototypes without implementations Am Sat, Oct 26, 2024 at 01:21:23AM +0000 schrieb Laurent Bercot: > 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 cross-compiling= . > I don't understand the remainder of the thread as it is now, because normally we consider the above behavior to be insanity. Just because a function exists in the lib does not mean it will succeed at run-time. This is already the case with functions like getrandom() or pselect(). Even if you could run run-time tests, just because it succeeds at configure time does not mean it succeeds at any later date. And conversely, just because it fails at configure time does not mean it cannot succeed. Writing your software in the above manner is therefore not sensible. Especially since the functions talked about here are system calls that on some architectures have been stubbed out in the kernel, so the run-time behavior depends on run-time kernel version. But maybe the system calls talked about here are ultra-special in some way. Ciao, Markus