Move unsigned limits to a separate table/recognizer and display them
authorwollman <wollman@FreeBSD.org>
Wed, 23 May 2018 02:51:56 +0000 (02:51 +0000)
committerwollman <wollman@FreeBSD.org>
Wed, 23 May 2018 02:51:56 +0000 (02:51 +0000)
commit29fa89bc66ffc0312c0fe549dae898e69b09a90e
treed2539c930fa8d80ff0525e442c704634d0ee53de
parentabeb3096ced352fe4729d7706d9ec1845d4378c3
Move unsigned limits to a separate table/recognizer and display them
using the appropriate (unsigned) format specification.  This prevents
integer overflow when ULLONG_MAX and (on some architectures) ULONG_MAX
are used to initialize an intmax_t and then displayed as the signed
value -1.  (A different approach was suggested in the bug report,
which I did not use.)  If other limits are defined to be unsigned,
they could be moved here.

PR: 164049
Reported by: Marcus Reid
usr.bin/getconf/Makefile
usr.bin/getconf/getconf.c
usr.bin/getconf/getconf.h
usr.bin/getconf/limits.gperf