public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/22099] getconf help info
Date: Wed, 17 Apr 2024 17:11:21 +0000 [thread overview]
Message-ID: <bug-22099-131-07LQ2yhLKT@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-22099-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22099
--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Eric Blake from comment #4)
> Output according to the POSIX recommendation would be:
>
> $ getconf -a | head -n2
> LINK_MAX: 127
> _POSIX_LINK_MAX: 127
>
> the whitespace can be arbitrary, but as none of the category names can
> include a colon, and since a colon is unlikely in the contents of a confstr
> value (although some values are blank), it would make it more obvious that
> the following subset of the output represents exactly 8 of the many known
> keys:
>
> $ getconf -a | grep -C4 POSIX_V7_WIDTH
> POSIX_V7_ILP32_OFF32_CFLAGS: -m32
> POSIX_V7_ILP32_OFF32_LDFLAGS: -m32
> POSIX_V7_ILP32_OFF32_LIBS:
> POSIX_V7_ILP32_OFF32_LINTFLAGS:
> _POSIX_V7_WIDTH_RESTRICTED_ENVS: POSIX_V7_ILP32_OFF32
> POSIX_V7_ILP32_OFFBIG
> POSIX_V7_LP64_OFF64
[…]
I must say that this is pretty wild as a means to disambiguate the output. Why
not add proper string quoting if we change the output format? Or at least use :
as a separator instead of newline if the value contains newlines.
Note that on many systems, the *values* for PATH already contain colons.
We can restrict whatever POSIX mandates to POSIXLY_CORRECT mode, I suppose, so
I don't have a strong opinion about this. To fix this without quoting, we can
add a new output mode that lists all variables, one per line, but not their
values.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2024-04-17 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-22099-131@http.sourceware.org/bugzilla/>
2024-04-08 15:30 ` eblake at redhat dot com
2024-04-11 15:14 ` eblake at redhat dot com
2024-04-13 18:35 ` fweimer at redhat dot com
2024-04-15 12:34 ` eblake at redhat dot com
2024-04-15 12:46 ` eblake at redhat dot com
2024-04-17 17:11 ` fweimer at redhat dot com [this message]
2024-04-17 19:25 ` eblake at redhat dot com
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=bug-22099-131-07LQ2yhLKT@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).