NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/60219 CVS commit: src
The following reply was made to PR lib/60219; it has been noted by GNATS.
From: "Robert Elz" <kre%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/60219 CVS commit: src
Date: Fri, 1 May 2026 07:19:46 +0000
Module Name: src
Committed By: kre
Date: Fri May 1 07:19:45 UTC 2026
Modified Files:
src/include: time.h
src/lib/libc/gen: sysconf.3 sysctl.c
src/lib/libc/time: localtime.c
src/share/man/man7: sysctl.7
Log Message:
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.
XXX pullup -11 (at least)
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/include/time.h
cvs rdiff -u -r1.57 -r1.58 src/lib/libc/gen/sysconf.3
cvs rdiff -u -r1.39 -r1.40 src/lib/libc/gen/sysctl.c
cvs rdiff -u -r1.153 -r1.154 src/lib/libc/time/localtime.c
cvs rdiff -u -r1.171 -r1.172 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.
Home |
Main Index |
Thread Index |
Old Index