* lib/mktime.c (__mktime_internal) [!_LIBC]: Double the number of
probes. Although this isn’t guaranteed to suffice, it should be
good enough for practical applications, and fixing the problem
in general would require access to the underlying tz state lock
which would be hard to do.
---
ChangeLog
* lib/mktime.c (convert_time): Reorder args.
(__tz_convert): New macro. All convert_time callers changed to use it.
---
ChangeLog| 6 ++
lib/mktime.c | 14 --
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e5d5b10d37..6d8a1a52b3 10
* lib/timegm.c (__timegm64): Omit now-unnecessary initialization
of tm_isdst. Anyway, the initialization was always wrong, since
timegm should not modify *TMP when it fails.
---
ChangeLog| 5 +
lib/timegm.c | 1 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/C
Shifting an 'unsigned char' value left by 24 bits is undefined behaviour,
if that value happens to be >= 128. (Because the 'unsigned char' value
gets zero-extended to an 'int' first, and left-shift on signed integer types
is undefined if it changes the sign.)
2024-10-04 Bruno Haible
i
Here's a refactoring of that code, reducing implicit code duplication.
2024-10-04 Bruno Haible
bcp47: Refactor.
* lib/bcp47.c (SCRIPT_*): New macros.
(default_script_in_territory, default_script_for_language2,
default_script_for_language3): New functions.
Paul Eggert wrote:
> + AC_CACHE_CHECK([spelling of daylight variable],
> +[gl_cv_var___daylight],
> +[for gl_cv_var___daylight in __daylight daylight _daylight 0; do
On FreeBSD 14, this configure test produces
checking spelling of daylight variable... 0
All existing unit tests succeed
Paul Eggert wrote:
> +A future C standard is planned to require this behavior; see
> +``@url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3322.pdf,
Do you happen to know whether this proposal has already been approved?
If yes, I would ask the clang people to change their UBSAN, so that
we ca
Problem reported by Florian Weimer via a proposed glibc patch in:
https://sourceware.org/pipermail/libc-alpha/2024-October/160310.html
* lib/mktime.c (__mktime_internal): Ignore any tm_isdst request
if the timezone never observes DST, as is the case for timegm.
* m4/mktime.m4 (gl_PREREQ_MKTIME): De
* config/srclist.txt: Omit time/timegm.c and time/mktime-internal.h
for now, until we can sync glibc from Gnulib.
* lib/mktime-internal.h, lib/timegm.c: Revert autoupdate, going
back to the recent Gnulib-specific version.
---
ChangeLog | 8
config/srclist.txt| 4 ++--
lib/