From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 94BBD3858C52; Sat, 14 May 2022 23:05:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94BBD3858C52 From: "cquike at arcor dot de" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cquike at arcor dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2022 23:05:25 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29147 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=3D14102&action=3Ded= it 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 limit= s.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 headin= gs ``Maximum Values'' and ``Minimum Values'' in the description of the header". Quoting the reference book "Advanced Programming in the UNIX environment": "Those minimum values do not change from one system to anothe= r. They specify the most restrictive values for these features". I realized first with the _POSIX_PIPE_BUF constant. According to POSIX.1-20= 18 (https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html) t= he 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 t= he 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=