public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cquike at arcor dot de" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug libc/29147] New: Wrong values for symbolic constants defined in limits.h Date: Sat, 14 May 2022 23:05:24 +0000 [thread overview] Message-ID: <bug-29147-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29147 Bug ID: 29147 Summary: Wrong values for symbolic constants defined in limits.h Product: glibc Version: 2.34 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: cquike at arcor dot de CC: drepper.fsp at gmail dot com Target Milestone: --- Created attachment 14102 --> https://sourceware.org/bugzilla/attachment.cgi?id=14102&action=edit Potential patch I am trying to understand the output of some of the values in getconf and I came to the conclusion that a number of symbolic constants defined in limits.h are not properly printed by getconf utility. According to POSIX.1-2018 (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/getconf.html), the getconf utility shall print "the symbolic constants listed under the headings ``Maximum Values'' and ``Minimum Values'' in the description of the <limits.h> header". Quoting the reference book "Advanced Programming in the UNIX environment": "Those minimum values do not change from one system to another. They specify the most restrictive values for these features". I realized first with the _POSIX_PIPE_BUF constant. According to POSIX.1-2018 (https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html) the value must be 512. However, on a Fedora 35 machine: # getconf -a | grep _POSIX_PIPE_BUF _POSIX_PIPE_BUF 4096 Looking at the sources it seems that _POSIX_PIPE_BUF (the minimum value for _any_ POSIX implementation) is using pathconf(_PC_PIPE_BUF, ...) which is the value for _this_ specific implementation. I have jot down a potential patch that fixes the problem (albeit only for _POSIX_PIPE_BUF, not for the rest of the constants in limits.h) and have attached it here. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-05-14 23:05 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-14 23:05 cquike at arcor dot de [this message] 2022-05-14 23:05 ` [Bug libc/29147] getconf: " cquike at arcor dot de 2022-05-14 23:12 ` cquike at arcor dot de 2022-05-18 19:47 ` adhemerval.zanella at linaro dot org 2022-05-23 20:02 ` cquike at arcor dot de 2022-05-23 20:47 ` adhemerval.zanella at linaro dot org 2022-05-24 0:57 ` cquike at arcor dot de 2022-05-24 7:49 ` schwab@linux-m68k.org 2022-05-26 17:22 ` adhemerval.zanella at linaro dot org 2022-05-27 14:31 ` adhemerval.zanella at linaro dot org 2022-07-29 22:10 ` cquike at arcor dot de
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-29147-131@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: linkBe 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).