From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Rich Felker <dalias@libc.org>
Cc: Thorsten Glaser <tg@mirbsd.de>, musl@lists.openwall.com
Subject: Re: getpass() feature test macro
Date: Thu, 10 Jul 2025 17:56:54 +0200 [thread overview]
Message-ID: <20250710175654.1013755f@windsurf> (raw)
In-Reply-To: <20250710155417.GV1827@brightrain.aerifal.cx>
Hello Rich,
On Thu, 10 Jul 2025 11:54:18 -0400
Rich Felker <dalias@libc.org> wrote:
> > Hm, thanks but it still isn't clear to me. If the issue is in the gcr
> > code base, which needs to define another feature macro, I'd like to
> > have some compelling evidence that the code is incorrect and needs to
> > define some other feature macro to use getpass().
>
> It's not so much "needs to define another feature macro" as "don't use
> feature test macros to request strict POSIX if that's not what you
> want".
>
> It's vaguely possible that this code was written to conform to SUSv2
> (_XOPEN_SOURCE=500 or _POSIX_C_SOURCE=199506L), in which case that's
> valid but just not a standard we support because it's so outdated. But
> more likely, it's just written to the haphazard "use whatever random
> stuff" principle, in which the right thing to do is not define any of
> these FTMs.
Thanks, but I'm still confused. As it is today, gcr only defines
_XOPEN_SOURCE and due to that, cannot access getpass() prototype when
building against musl, causing a build failure. What is the solution
that you suggest? *Not* defining any FTM will certainly not fix this,
as musl only exposes the getpass() prototype if either _DEFAULT_SOURCE
or _BSD_SOURCE is defined.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
next prev parent reply other threads:[~2025-07-10 15:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 21:52 [musl] getpass() feature test macro Thomas Petazzoni
2025-07-09 22:20 ` Thorsten Glaser
2025-07-09 23:56 ` [musl] " Rich Felker
2025-07-10 7:55 ` Thomas Petazzoni
2025-07-10 15:54 ` Rich Felker
2025-07-10 15:56 ` Thomas Petazzoni [this message]
2025-07-10 16:01 ` Rich Felker
2025-07-10 16:13 ` Thomas Petazzoni
2025-07-10 16:40 ` Rich Felker
2025-07-11 19:16 ` Thorsten Glaser
2025-07-11 0:46 ` [musl] " Haelwenn (lanodan) Monnier
2025-07-11 0:58 ` Haelwenn (lanodan) Monnier
2025-07-11 1:18 ` A. Wilcox
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=20250710175654.1013755f@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=dalias@libc.org \
--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).