The code /usr/src/usr.bin/getconf/limits.gperf doesn't correctly handle unsigned constants. Since it uses an intmax_t for all included variables, any value larger than INTMAX_MAX is printed incorrectly. So, on my machine it prints -1 for ULLONG_MAX when it should print: 18446744073709551615 (defined in <machine/_limits.h> to be 0xffffffffffffffffULL) if the desktop calculator isn't fooling me Fix: I could submit a patch if there's a minimal guarantee that I won't lose my time... How-To-Repeat: getconf ULLONG_MAX
In article <mit.lcs.mail.freebsd-bugs/200709170733.l8H7XRmS067276@www.freebsd.org> you write: >The code /usr/src/usr.bin/getconf/limits.gperf doesn't correctly handle >unsigned constants. It is not clear to me that the POSIX specification allows it to "correctly handle unsigned constants". XCU6 page 516 lines 18634ff: Otherwise, if the specified variable is defined on the system, its value shall be written in the following format: "%d\n", <value> The description of "%d\n" in XBD6 chapter 5 ("File Format Notation") clearly requires it to output <value> as a signed integer. This fits with the definition of the sysconf() function as returning a signed long. Having said that, supporting these non-sysconf() limits such as these is a FreeBSD extension and we need not be bound by POSIX when (and only when) querying non-POSIX values. -GAWollman -- Garrett A. Wollman | The real tragedy of human existence is not that we are wollman@csail.mit.edu| nasty by nature, but that a cruel structural asymmetry Opinions not those | grants to rare events of meanness such power to shape of MIT or CSAIL. | our history. - S.J. Gould, Ten Thousand Acts of Kindness
Responsible Changed From-To: freebsd-bugs->freebsd-standards Over to the standards folks as they may want to opine on the issue Garrett raised with this change request.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped