Changes affecting code
localtime no longer mishandles America/Anchorage after 2037.
(Thanks to Bradley White for reporting the bug.)
The localtime module allows the variables 'timezone', 'daylight',
and 'altzone' to be in common storage shared with other modules,
and declares them in case the system <time.h> does not.
(Problems reported by Kees Dekker.)
On platforms with tm_zone, strftime.c now assumes it is not NULL.
This simplifies the code and is consistent with zdump.c.
(Problem reported by Christos Zoulas.)
Changes affecting documentation
The tzfile man page now documents that transition times denote the
starts (not the ends) of the corresponding time periods.
(Ambiguity reported by Bill Seymour.)
Provide LC_GLOBAL_LOCALE in a way that works with all locale functions.
Merge constant data used by the initial global locale and the C locale.
Drop function call layer for _current_locale() and directly return the
locale reference, not a pointer to it. Use protected access for global
variables, so that libc references can avoid the GOT overhead.
- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)
approved by core@
- While here, add all the rest of gnu extensions: %g, %G, %u.
- Fix long standing bug where %Z would not work because "private.h" was
not included. (Hi Brian!)
I think this is enough to get rescue_tiny to fit again.
While there fix some bugs:
- %y failed to subtract 1900 from tm_year
- %p (am/pm) only worked at the end of the string
- %E% was treated at %% (ie match a % character)
regression test being added....
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.
The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems. On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems. However, we leave the isascii()
untouched for now, so as not to change the current behavior.
- make string comparisons case-insensitive
- add description of whitespace in the format string
- note that %t and %n match no whitespace as well as some whitespace
- change wording of standard to say "includes all requirements of"
instead of "conforms to" XPG4 as our %y is extended beyond XPG4
- %C and %y can be used in conjunction properly, though %y can have its
old behaviour if used without %C
- %I formats hous 0..11 with 0 representing "12"; this is correct both
with and without am/pm (%p rule fixed to compensate)
- %j fixed for range [0..365] in struct tm
- %m fixed for range [0..11] in struct tm
- %S fixed for range [0..61] in struct tm