CVS commit: [netbsd-11] src
"Martin Husemann" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module Name: src Committed By: martin Date: Thu May 7 15:43:06 UTC 2026 Modified Files: src/include [netbsd-11]: time.h src/lib/libc/gen [netbsd-11]: sysconf.3 sysctl.c src/lib/libc/time [netbsd-11]: localtime.c src/share/man/man7 [netbsd-11]: sysctl.7 Log Message: Pull up following revision(s) (requested by kre in ticket #267): lib/libc/gen/sysctl.c: revision 1.40 lib/libc/gen/sysconf.3: revision 1.58 share/man/man7/sysctl.7: revision 1.172 lib/libc/time/localtime.c: revision 1.154 include/time.h: revision 1.57 PR lib/60219 -- Fix sysconf(_SC_TZNAME_MAX) That value is supposed to be the minimum value allowed for the maximum length of a timezone abbreviation. It cannot be something larger than is allowed for that (and NAME_MAX has nothing to do with it) It defines the max lengths allowed for the words in TZ=Frankenstein-7Monster-6[transition rules] in old style POSIX TZ variable settings - the POSIX required minimum value is 6 (so "Frankenstein" would not fit in a minimalist POSIX implementation). For now, sync the values between libc/sysctl() and libc/localtime() via a new _TZNAME_MAXIMUM definition in <time.h> and use that for both purposes (as a possible default anyway for localtime() - there the default value used will always be at least 254, and building with - -DTZNAME_MAXIMUM=N can override that value with anything larger than _TZNAME_MAXIMUM if desired). While here fix as many instances of the "max number of types" (which should be "max number of bytes") string in related contexts that I could find - there might perhaps be more. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.56.2.1 src/include/time.h cvs rdiff -u -r1.57 -r1.57.4.1 src/lib/libc/gen/sysconf.3 cvs rdiff -u -r1.38.10.1 -r1.38.10.2 src/lib/libc/gen/sysctl.c cvs rdiff -u -r1.147 -r1.147.2.1 src/lib/libc/time/localtime.c cvs rdiff -u -r1.167.4.1 -r1.167.4.2 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.