Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <emc51f6a2f-139b-4697-abbd-aee651abe1d9@84cd4237.com>
Date: Sat, 26 Oct 2024 01:21:23 +0000
From: "Laurent Bercot" <ska-dietlibc@...rnet.org>
To: musl@...ts.openwall.com
Subject: Re[2]: 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 
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 
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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.