mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: musl@lists.openwall.com, Alyssa Ross <hi@alyssa.is>
Subject: Re: [musl] Prototypes without implementations
Date: Fri, 25 Oct 2024 22:11:41 -0400	[thread overview]
Message-ID: <20241026021141.GZ10433@brightrain.aerifal.cx> (raw)
In-Reply-To: <b3040ab1-e202-31d0-4f0e-42721a363c90@mirbsd.org>

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

  reply	other threads:[~2024-10-26  2:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25 20:01 Alyssa Ross
2024-10-25 20:10 ` Rich Felker
2024-10-25 21:38   ` Alyssa Ross
2024-10-26  1:21     ` Re[2]: " Laurent Bercot
2024-10-26  1:57       ` Thorsten Glaser
2024-10-26  2:11         ` Rich Felker [this message]
2024-10-26  8:26       ` Markus Wichmann
2024-10-26 10:28         ` Re[2]: " Laurent Bercot
2024-10-26 13:22           ` Markus Wichmann
2024-10-26 22:08             ` Thorsten Glaser
2024-10-26 23:03               ` Rich Felker
2024-10-30  9:28                 ` Alyssa Ross
2024-10-30 12:37                   ` enh
2024-10-26 23:35             ` Re[2]: " Laurent Bercot
2024-10-27 22:43             ` Yao Zi
2024-10-26 10:10       ` Robert Clausecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241026021141.GZ10433@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=hi@alyssa.is \
    --cc=musl@lists.openwall.com \
    --cc=tg@mirbsd.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).