libc/stdtime: Set errno to EOVERFLOW when there is an overflow.This fixes various issues such as gmtime() returning NULL on anout-of-bounds time_t but not setting errno, as POSIX requires.Also,
libc/stdtime: Set errno to EOVERFLOW when there is an overflow.This fixes various issues such as gmtime() returning NULL on anout-of-bounds time_t but not setting errno, as POSIX requires.Also, in ctime() and ctime_r(), check the result of localtime()before passing it to asctime{,_r}().See:https://github.com/eggert/tz/commit/4d306b3a17ce5ce0b33a73a90dc713d3601ea89a
show more ...
Fix "macro neither callable nor escaped" mandoc warnings in the manpages.Some of these were affecting the output.
libc: Remove libc checks around manual pages from the Makefile.inc's.Handle this better by setting NOMAN for libc_rtld.
libc: Fix a number of .PATH related issues in the Makefiles.* Adjust a couple of .PATHs in libc's Makefiles so that libc_rtld can reuse them.* Remove non-existent .PATHs.
libc: Reduce <pthread.h> exposure.
libc/getdate: Add getdate_err to the Symbol.map too.Seems lang/clisp picks up getdate().Reported-by: zrj
libc: Bring in getdate() from NetBSD for POSIX conformance.
Revert "libc: Bring in getdate() from NetBSD for POSIX conformance."This reverts commit 28bfdfe646cc75375bb9065f47aca011952469ef.I need to work a bit more on this first.
libc/locale: Limit visibility in private headers for tools. The localedef(1) requires just a few struct lc_*_t layouts from private lib/libc/locale/ headers in order to convert source definitions.
libc/locale: Limit visibility in private headers for tools. The localedef(1) requires just a few struct lc_*_t layouts from private lib/libc/locale/ headers in order to convert source definitions. It is desired that it uses as minimal as possible amount of internal header information, since localedef(1) is also in BTOOLS group. Same could be done to zic(8) and pwd_mkdb(8). * Use __LIBC guard to limit visibility in libc internal headers. * Poison xlocale_private.h to warn early that internals were used. Another issue is that localedef(1) and zic(8) are not recompiled on libc changes and require full BTOOLS recompile. Converting both of them to hostprog would solve this, however there are invoke issues. No function change.
libc: Use quotation marks around {un-,}namespace.h (private header).
libc: Document offtime(), timelocal(), and timeoff().Taken-from: NetBSD
Use .Fn for function names in some manual pages.
libc/stdtime: Remove some #ifdef checks for TM_{GMTOFF,ZONE}.We don't override those and use the defaults from private.h.While here, clean up the CFLAGS of zdump(8) and zic(8). Most of thisisn't
libc/stdtime: Remove some #ifdef checks for TM_{GMTOFF,ZONE}.We don't override those and use the defaults from private.h.While here, clean up the CFLAGS of zdump(8) and zic(8). Most of thisisn't needed.
libc/stdtime: Avoid signed overflow in mktime.Fixes runtime issue with gcc80 -O2 constant folding. We need to use__generic() macro to properly detect and set LONG_MIN/LONG_MAX here.
libc: Move to a format for specifying MLINKS that's less hard on the eyes.We do it like this in other places of the tree already and will eventuallymove to this everywhere.
Add missing restrict qualifiers to various manual pages.
Add missing restrict qualifiers in POSIX function definitions/declarations.This creates no further -Wrestrict warnings with gcc80 in buildworld.
libc/stdtime: Use style(9) comments in strftime.c
xlocale: Few style(9) fixes.
libc/strptime: Handle ISO 8601 time zone formats in %z.Formats of +hh:mm +hh Z are now also accepted to previous +hhmm.
libc/strptime: Fix "%Y %W %w %H:%M:%S".Also throw in the fix for "12:34:56 2016 30 0", "%H:%M:%S %Y %W %w".Correct partial format reads are still not supported.
strptime.3: Sync with FreeBSD.
libc/strptime: Attempt to fix up %U and %W.Thera are still few issues left.Taken-from: FreeBSD
libc/strptime: Add support for %t and %n per POSIX.Only skip space for %e and fail on unknown specifiers.Also remove magic year 1900 constants.Taken-from: FreeBSD
1234