From: Szabolcs Nagy <nsz@port70.net>
To: Rich Felker <dalias@libc.org>
Cc: Ariadne Conill <ariadne@dereferenced.org>,
musl@lists.openwall.com, Drew DeVault <sir@cmpwn.com>
Subject: Re: [musl] [PATCH v2] riscv64: correct struct __ucontext name
Date: Sun, 6 Dec 2020 18:32:34 +0100 [thread overview]
Message-ID: <20201206173234.GT1370092@port70.net> (raw)
In-Reply-To: <20201206171930.GG534@brightrain.aerifal.cx>
* Rich Felker <dalias@libc.org> [2020-12-06 12:19:30 -0500]:
> On Sun, Dec 06, 2020 at 05:10:25PM +0000, Ariadne Conill wrote:
> > Bummer. In that case, I suggest musl use the same struct tag consistently. It
> > should probably be struct ucontext_t for consistency with glibc.
>
> I don't recall the original reason it was inconsitent with glibc here.
glibc changed the declaration 3 years ago (breaking c++ abi)
before that it was not posix conform so musl could not be
consistent with it.
see "Rename struct ucontext tag" in
https://sourceware.org/bugzilla/show_bug.cgi?id=21457
> Note that signal.h has (which is probably wrong and should be
> removed):
>
> #ifdef _GNU_SOURCE
> #define __ucontext ucontext
> #endif
>
> so that the tag gets renamed if _GNU_SOURCE is defined. Maybe at one
> point glibc called it "struct ucontext", which was a namespace
> violation since it's not in a reserved namespace, and we used
> __ucontext to get the freedom to rename it and expose that only in a
> _GNU_SOURCE context.
>
> Whatever the reason, though, the struct tags is C++ABI and should not
> be changed. The rv64 inconsitency was unintentional and hopefully is
> not yet widely used enough for anyone to care that it's being fixed
> now (in theory could mess up linking C++ libs with ucontext_t in their
> public interface surface).
>
> Note that none of this is visible to applications that aren't doing
> anything horribly wrong. Neither "struct ucontext_t" nor "struct
> __ucontext" (nor "struct ucontext", which it looks like we were
> wrongly trying to support) is API.
>
> Rich
prev parent reply other threads:[~2020-12-06 17:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 18:10 Drew DeVault
2020-12-06 8:51 ` Szabolcs Nagy
2020-12-06 12:49 ` Drew DeVault
2020-12-06 16:55 ` Ariadne Conill
2020-12-06 17:06 ` Rich Felker
2020-12-06 17:10 ` Ariadne Conill
2020-12-06 17:19 ` Rich Felker
2020-12-06 17:32 ` Szabolcs Nagy [this message]
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=20201206173234.GT1370092@port70.net \
--to=nsz@port70.net \
--cc=ariadne@dereferenced.org \
--cc=dalias@libc.org \
--cc=musl@lists.openwall.com \
--cc=sir@cmpwn.com \
/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).