2004-08-11 Ulrich Drepper <drepper@redhat.com>
* time/tzset.c (tzset_internal): Add new parameter which is
nonzero if called through tzset. Use TZDEFAULT name including
name comparison if the new parameter is zero. This means implicit
tzset calls will not cause files to be opened and read by tzfile.c
all the time.
2004-08-11 Jakub Jelinek <jakub@redhat.com>
* time/tzfile.c (__tzfile_read): Free transitions only if it will
not be reused.
Update.
2004-08-09 Ulrich Drepper <drepper@redhat.com>
* time/tzset.c (tzset_internal): If TZ is not set do not compare
old and new tz value since it might be /etc/localtime in both
cases although the file changed. [BZ #154]
Patch by Christian Franke <franke@computer.org>.
* time/tzfile.c (__tzfile_read): Determine dev/ino of file.
Compare with values of previously opened file. Don't do anything
is they match.
* time/difftime.c (__difftime): New renamed. Make old name alias.
Use __difftime in recursive call.
* sysdeps/powerpc/fpu/bits/mathinline.h: Add __signbitf and
2004-03-19 Ulrich Drepper <drepper@redhat.com>
* time/tzfile.c (__tzfile_default): Correct setting of rule_stdoff
and rule_dstoff after reading the posixrules file.
2004-03-14 Ulrich Drepper <drepper@redhat.com>
Make the non-_l functions wrappers around the _l functions.
* include/monetary.h: Declare __vstrmon_l.
* include/string.h: Add libc_hidden_proto for __strcoll_l and
__strxfrm_l.
* include/time.h: Define ptime_locale_status. Declare
__strptime_internal.
* include/wchar.h: Add libc_hidden_proto for __wcscoll_l and
__wcsxfrm_l.
* stdlib/strfmon.c: Move the code to strfmon_l.c. Add little
wrapper around __vstrfmon_l.
* stdlib/strfmon_l.c: Add real implementation. Split into new
function __vstrfmon_l to allow calling it from strfmon.
* stdlib/strtod.c: Move real code to strtod_l.c and add wrapper.
* stdlib/strtod_l.c: Add real implementation.
* stdlib/strtof.c: Adjust to changed strtod.c.
* stdlib/strtof_l.c: Include strtod_l.c now.
* stdlib/strtold.c: New file.
* stdlib/strtold_l.c: Removed.
* string/strcoll.c: Move real code to strcoll_l.c: Add wrapper.
* string/strcoll_l.c: Add real implementation.
* string/strxfrm.c: Move real code to strxfrm_l.c: Add wrapper.
* string/strxfrm_l.c: Add real implementation.
* sysdeps/generic/strtol.c: Move real implementation to strtol_l.c.
Add wrappers.
* sysdeps/generic/strtol_l.c: Add real implementation.
* sysdeps/generic/strtold.c: Removed.
* sysdeps/generic/strtold_l.c: New file.
* sysdeps/generic/strtoll_l.c: Include strtol_l.c now. Adjust
#defines.
* sysdeps/generic/strtoul_l.c: Likewise.
* sysdeps/generic/strtoull_l.c: Likewise.
* sysdeps/generic/wcstol_l.c: Likewise.
* sysdeps/generic/wcstoll_l.c: Likewise.
* sysdeps/generic/wcstoul_l.c: Likewise.
* sysdeps/generic/wcstoull_l.c: Likewise.
* sysdeps/ieee754/ldbl-128/strtold.c: Removed.
* sysdeps/ieee754/ldbl-128/strtold_l.c: New file.
* sysdeps/ieee754/ldbl-96/strtold.c: Removed.
* sysdeps/ieee754/ldbl-96/strtold_l.c: New file.
* sysdeps/m68k/strtold.c: Removed.
* sysdeps/m68k/strtold_l.c: New file.
* time/strftime.c: Move real code to strftime_l.c. Add wrapper.
* time/strftime_l.c: Add real implementation.
* time/strptime.c: Move real code to strptime_l.c. Add wrapper.
* time/strptime_l.c: Add real implementation.
* time/wcsftime.c: Simplify since only wrappers are defined in
strftime.c.
* time/wcsftime_l.c: Include strftime_l.c.
* wcsmbs/wcscoll.c: Simplify since the file is not used by wcscoll_l.c
anymore.
* wcsmbs/wcscoll_l.c: Include strcoll_l.c.
* wcsmbs/wcsxfrm.c: Simplify since the file is not used by wcsxfrm_l.c
anymore.
* wcsmbs/wcsxfrm_l.c: Include strxfrm_l.c.
* wcsmbs/wcstod.c: Prepare to include new strtod.c.
* wcsmbs/wcstod_l.c: Include strtod_l.c.
* wcsmbs/wcstof.c: Prepare to include new strtof.c.
* wcsmbs/wcstof_l.c: Include strtof_l.c.
* wcsmbs/wcstold.c: Prepare to include new strtold.c.
* wcsmbs/wcstold_l.c: Include strtold_l.c.
* locale/uselocale.c: Use _NL_CURRENT_LOCALE instead of __libc_tsd_get.
* sysdeps/generic/strcasecmp.c: Optimize a bit. It's better to get
a reference to the current locale and then use the _l functions.
* sysdeps/generic/strncase.c: Likewise.
* time/mktime.c (verify): New macro.
(time_t_is_integer, twos_complement_arithmetic,
right_shift_propagates_sign, base_year_is_a_multiple_of_100,
C99_integer_division): Document these longstanding assumptions in the
code, and verify them at compile-time.
Remove. All uses changed to __localtime_r.
(__localtime_r) [!defined _LIBC]: New macro. Include "time_r.h" to
get its implementation.
Fix compile-command to allow for TIME_R_POSIX.
* time/strftime.c (my_strftime_gmtime_r, my_strftime_localtime_r):
Remove. All uses changed to __localtime_r and __gmtime_r.
(__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
Include "time_r.h" to get their implementations.
* time/timegm.c: Allow use in GNU applications outside glibc.
[defined HAVE_CONFIG_H]: Include <config.h>.
[!defined _LIBC]: Include "timegm.h", <time_r.h>.
Define __gmtime_r, and declare __mktime_internal.
(timegm): Define via a prototype, since we can safely assume C89 now.
* time/mktime.c (check_result): Use less-confusing report format.
"long" -> "long int", as per usual GNU style.
(main): Likewise.
Don't loop if the iteration overflows time_t.
Allow a negative step in the iteration.
* time/mktime.c: Assume freestanding C89 or better.
(HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove;
assume they're 1.
(__P): Remove; not used.
(CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
(mktime, not_equal_tm, print_tm, check_result, main): Use prototypes.
Prototypes use const * where appropriate.
(main) [DEBUG]: Fix typo in testing code uncovered by above changes,
which caused the testing code to dump core on some hosts.
More cancellation handling fixups.
* sysdeps/unix/sysv/linux/not-cancel.h: Add waitpid_not_cancel.
* sysdeps/generic/not-cancel.h: Likewise.
* catgets/open_catalog.c: Use not-cancelable syscalls.
* time/Makefile (CFLAGS-getdate.c): Add -fexceptions.
* sysdeps/unix/sysv/linux/llseek.c: Must not be cancelable.
* sysdeps/unix/syscalls.list: Don't mark lseek as cancelable.
* dlfcn/dlfcn.h: Mark dlopen with __THROW again.
* io/fcntl.h: Don't mark posix_fallocate with __THROW.
* libio/fileops.c: Use not-cancelable syscalls for fclose.
* libio/iopopen.c: Use no-cancelable syscalls.
* libio/stdio.h: Mark popen and pclose with __THROW again.
* misc/Makefile (CFLAGS-syslog.c): Add -fexceptions.
* misc/syslog.c: Fix locking and cancellation cleanup handling.
* posix/unistd.h: Mark ttyname and ttyname_r again with __THROW.
* stdio-common/Makefile (CFLAGS-tmpfile.c, CFLAGS-tmpfile64.c,
CFLAGS-tempname.c): Add -fexceptions.
* stdlib/Makefile (CFLAGS-mkstemp.c): Add -fexceptions.
* string/string.h: Mark strerror and strerror_r with _THROW again.
* sysdeps/generic/unwind.inc: New file. Copied from gcc.
* sysdeps/generic/unwind-dw2.c: Update from gcc version. Remove
#ifs since we now need all the code compiled.
* sysdeps/posix/spawni.c: Use close_not_cancel instead of close.
* sysdeps/unix/closedir.c: Use not-cancelable syscalls.
* sysdeps/unix/opendir.c: Likewise.
2003-05-29 Jim Meyering <jim@meyering.net>
* time/strftime.c (my_strftime) [!defined _NL_CURRENT
&& HAVE_STRFTIME]: Use underlying_strftime for %r.
Suggested by Daniel Yacob <locales@geez.org>.
2002-12-31 Ulrich Drepper <drepper@redhat.com>
* string/string-inlines.c: Define __memcpy_g and __strchr_g macros
to avoid using the exported symbols. Define aliases with the
original names separately.
* include/time.h: Add libc_hidden_proto for __strftime_l.
* include/wchar.h: Add libc_hidden_proto for __wcsftime_l.
* time/strftime.c: Always use libc_hidden_def if _LIBC.
* libio/libioP.h: Add libc_hidden_proto for _IO_file_open.
* libio/fileops.c: Add libc_hidden_def for _IO_file_open.
* malloc/mtrace.c: Add libc_hidden_proto and libc_hidden_def for
tr_break.
* csu/Makefile (routines): Add dso_handle.
* csu/dso_handle.c: New file.
2002-12-30 Jakub Jelinek <jakub@redhat.com>
* forward.c: Make all functions available by default again. It
caused too much trouble.
* internals.h (struct pthread_functions): Rename ptr_pthread_exit
and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
ptr___pthread_attr_init_2_*.
* pthread.c (pthread_functions): Adjust.
2002-08-28 Ulrich Drepper <drepper@redhat.com>
* include/wchar.h: Declare __mbsrtowcs_l.
* wcsmbs/Makefile (routines): Add mbsrtowcs_l.
* wcsmbs/mbsrtowcs.c: Add support for compilation with
USE_IN_EXTENDED_LOCALE_MODEL.
* wcsmbs/mbsrtowcs_l: New file.
* wcsmbs/wcsmbsload.c (__wcsmbs_to_wc): Renamed from to_wc. Don't
define as static. Change all uses.
(__wcsmbs_getfct): Renamed from getfct. Don't define as static.
Change all callers.
* wcsmbs/wcsmbsload.h: Declare __wcsmbs_to_wc and __wcsmbs_getfct.
* time/strftime.c: When translating for the extended locale model
use the _l functions.
* time/Makefile (tests): Add tst-ftime_l.
* time/tst-ftime_l.c: New file.
instead, taking an extra __locale_t argument.
* time/Makefile (routines): Add strptime_l.
* time/strptime_l.c: New file.
* time/strftime.c [USE_IN_EXTENDED_LOCALE_MODEL]: Define __strftime_l
or __wcsftime_l instead, taking an extra __locale_t argument.
2002-08-04 Ulrich Drepper <drepper@redhat.com>
* stdio-common/psignal.c: Declare _sys_siglist_internal. Use USEINT
to access _sys_siglist.
* string/strsignal.c: Likewise.
* sysdeps/generic/siglist.c: Add _sys_siglist_internal alias.
* sysdeps/gnu/siglist.c: Likewise.
* sysdeps/unix/siglist.c: Likewise.
* sysdeps/unix/sysv/linux/arm/siglist.c: Likewise.
* libio/fileops.c: Add missing INTUSEs for _IO_file_jumps.
* libio/wfileops.c: Add missing INTUSE for _IO_file_close.
* intl/dcigettext.c: Define _nl_default_dirname_internal as hidden
alias and use it.
* intl/bindtextdom.c: Use _nl_default_dirname_internal.
* include/netinet/in.h: Add declaration of in6addr_loopback_internal.
* inet/in6_addr.c: Add INTVARDEF for in6addr_loopback.
* sysdeps/posix/getaddrinfo.c: Use INTUSE for in6addr_loopback access.
* include/time.h: Add libc_hidden_proto for __gmtime_r.
* time/gmtime.c (__gmtime_r): Add libc_hidden_def.
* iconv/Versions: Replace __gconv_alias_db, __gconv_modules_db,
and __gconv_cache with __gconv_get_alias_db, __gconv_get_modules_db,
and __gconv_get_cache respectively.
* iconv/gconv_cache.c (gconv_cache): Renamed for __gconv_cache and
defined static. Change all users.
(__gconv_get_cache): New function.
* iconv/gconv_db.c (__gconv_get_modules_db): New function.
(__gconv_get_alias_db): New function.
* iconv/gconv_int.h (__gconv_alias_db): Declare as hidden.
(__conv_modules_db): Likewise.
Add prototypes for __gconv_get_cache, __gconv_get_modules_db,
and __gconv_get_alias_db.
* iconv/iconv_prog.c: Use the new functions instead of accessing the
variables.
* include/stdlib.h: Add prototype and libc_hidden_proto for
__default_morecore.
* sysdeps/generic/morecore.c: Include <stdlib.h>.
* malloc/obstack.c: Remove fputs macro.
* malloc/mtrace.c: Remove fopen macro.
* stdlib/canonicalize.c (canonicalize): Rename to __realpath and
don't define static. Remove old __realpath function. TC1 of
POSIX 2001 will allow the second parameter to be NULL.
* stdlib/test-canon.c: Comment out test for NULL as second
parameter of realpath.
* time/offtime.c (__offtime): Set errno if overflow is detected.
2002-04-15 Bruno Haible <bruno@clisp.org>
* iconvdata/armscii-8.c (BODY for FROM_LOOP): Fix array access.
(BODY for TO_LOOP): Likewise.
* iconvdata/tcvn5712-1.c (from_ucs4): Map U+0309 to 0xB1.
* iconvdata/tst-table.sh: Add support for encodings which contain
precomposed Unicode characters, known to the iconv converter in both
directions but not listed in the charmap.
* iconvdata/IBM856.irreversible: New file.
* iconvdata/IBM922.irreversible: New file.
* iconvdata/IBM1132.irreversible: New file.
* iconvdata/IBM1133.irreversible: New file.
* iconvdata/IBM1160.irreversible: New file.
* iconvdata/IBM1161.irreversible: New file.
* iconvdata/IBM1163.irreversible: New file.
* iconvdata/IBM1164.irreversible: New file.
* iconvdata/ARMSCII-8.irreversible: New file.
* iconvdata/TCVN5712-1.precomposed: New file.
* iconvdata/tst-tables.sh: Add IBM856, IBM922, IBM1124, IBM1129,
IBM1160, IBM1161, IBM1132, IBM1133, IBM1162, IBM1163, IBM1164,
ARMSCII-8, TCVN5712-1.
* iconvdata/Makefile (distribute): Add IBM856.irreversible,
IBM922.irreversible, IBM1132.irreversible, IBM1133.irreversible,
IBM1160.irreversible, IBM1161.irreversible, IBM1163.irreversible,
IBM1164.irreversible, ARMSCII-8.irreversible, TCVN5712-1.precomposed.
2002-04-17 Jakub Jelinek <jakub@redhat.com>
* time/tst-mktime.c: Include <stdlib.h>. Use %d, not %ld format
for EVENING69. Include offsets in TZ environment variable.