2004-07-23 Ulrich Drepper <drepper@redhat.com>
* posix/bits/posix1_lim.h: Fix values for _POSIX_CHILD_MAX and
_POSIX_OPEN_MAX. Add _POSIX_HOST_NAME_MAX, _POSIX_SYMLINK_MAX,
_POSIX_SYMLOOP_MAX, and _POSIX_RE_DUP_MAX.
Reported by Andrew Josey.
* include/features.h: Document _POSIX_C_SOURCE == 200112L.
* grp/grp.h: Define gid_t if __USE_XOPEN2K is defined.
* pwd/pwd.h: Define uid_t and gid_t if __USE_XOPEN2K is defined.
* io/sys/stat.h: Define dev_t, gid_t, ino_t, mode_t, nlink_t,
off_t, time_t, and uid_t if __USE_XOPEN2K is defined.
* signal/signal.h: Define pid_t if __USE_XOPEN2K is defined.
* posix/unistd.h: Define gid_t, off_t, pid_t, uid_t, and
useconds_t if __USE_XOPEN2K is defined.
* io/utime.h: Define time_t if __USE_XOPEN2K is defined.
* libio/stdio.h: Declare fseeko and ftello if __USE_XOPEN2K is defined.
2003-06-15 Ulrich Drepper <drepper@redhat.com>
Fix cancellation point handling wrt exception based cleanup.
* io/Makefile: Compile fcntl.c, poll.c, and lockf.c with exceptions.
* misc/Makefile: Compile pselect.c, readv.c, writev.c, and usleep.c
with exceptions.
* posix/Makefile: Compile pread.c, pread64.c, pwrite.c, pwrite64.c,
sleep.c, wait.c, waitid.c, and waitpid.c with exceptions.
* rt/Makefile: Compile aio_suspend.c and clock_nanosleep.c with
exceptions.
* signal/Makefile: Compile sigpause.c, sigsuspend.c, sigtimedwait.c,
sigwait.c, and sigwaitinfo.c with exceptions.
* stdlib/Makefile: Compile system.c with exceptions.
* sysvipc/Makefile: Compile msgrcv.c and msgsnd.c with exceptions.
* termios/Makefile: Compile tcdrain.c with exceptions.
* sysdeps/generic/lockf.c: Add comment explaining the cancellation
situation.
* sysdeps/generic/pselect.c: Likewise.
* sysdeps/posix/sigpause.c: Likewise.
* sysdeps/posix/system.c: Likewise.
* sysdeps/posix/waitid.c: Likewise.
* sysdeps/unix/sysv/linux/sleep.c: Likewise.
* sysdeps/unix/sysv/linux/usleep.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Major rewrite of
INTERNAL_SYSCALL to not use push inside asm statement so that
unwind info is correct around the syscall.
* sysdeps/unix/clock_nanosleep.c: Add cancellation support.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise.
Check for the result overflowing off_t and fail with EOVERFLOW.
* libio/ioftell.c (_IO_ftell): Likewise.
* libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
* login/logwtmp.c (logwtmp): If sizeof ut_tv != sizeof struct timeval,
use a temporary timeval on the stack for gettimeofday and copy it.
* login/logout.c (logout): Likewise.
Reported by Steven Munroe <sjmunroe@us.ibm.com>.
* sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs):
Use __SWORD_TYPE instead of int for member types.
(struct statfs64): Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/statfs.h: New file.
* sysdeps/unix/sysv/linux/s390/bits/statfs.h: New file.
* sysdeps/unix/sysv/linux/ia64/bits/statfs.h: File removed.
* sysdeps/unix/sysv/linux/sparc/bits/statfs.h: File removed.
* sysdeps/unix/sysv/linux/x86_64/bits/statfs.h: File removed.
* sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: Moved to ...
* sysdeps/unix/sysv/linux/bits/statvfs.h: ... here.
(ST_NODIRATIME): Restore fixed value of 2048.
* sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: File removed.
* sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: File removed.
Rearranged <bits/types.h> definitions to reduce duplication.
* sysdeps/generic/bits/types.h: Rewritten, using macros from
<bits/wordsize.h> and new header <bits/typesizes.h>.
* posix/Makefile (headers): Add bits/typesizes.h here.
* sysdeps/generic/bits/typesizes.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
* sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
* sysdeps/mach/hurd/bits/typesizes.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/ia64/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/mips/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/s390/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/sparc/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/x86_64/bits/types.h: File removed.
* posix/sys/types.h [__USE_POSIX199506 || __USE_UNIX98]: Include
<bits/pthreadtypes.h> here, not in <bits/types.h>.
* signal/signal.h: Likewise.
* streams/stropts.h: Include <bits/xtitypes.h>.
* streams/Makefile (headers): Add bits/xtitypes.h here.
* sysdeps/generic/bits/xtitypes.h: New file.
* sysdeps/s390/bits/xtitypes.h: New file.
* sysdeps/ia64/bits/xtitypes.h: New file.
* sysdeps/x86_64/bits/xtitypes.h: New file.
* sysvipc/Makefile (headers): Add bits/ipctypes.h here.
* sysdeps/generic/bits/ipctypes.h: New file.
* sysdeps/mips/bits/ipctypes.h: New file.
* sysdeps/gnu/bits/shm.h: Include <bits/ipctypes.h>.
* sysdeps/gnu/bits/msq.h: Likewise.
* sysvipc/sys/ipc.h: Likewise.
2002-10-22 Roland McGrath <roland@redhat.com>
* sysdeps/generic/libc-tls.c (_dl_tls_static_used): New variable.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New member
`_dl_tls_static_used'.
(TLS_STATIC_MIN): New macro.
* elf/dl-reloc.c [USE_TLS] (allocate_static_tls): New function.
(CHECK_STATIC_TLS): Use it.
2002-10-09 Ulrich Drepper <drepper@redhat.com>
* Versions.def (libc): Add GLIBC_2.3.1.
(libpthread): Add GLIBC_2.3.1.
* include/signal.h: Add libc_hidden_proto for __sigwait, __sigwaitinfo,
and __sigtimedwait.
* signal/Versions: Add __sigtimedwait, __sigwait, and __sigwaitinfo.
* sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Add
libc_hidden_def.
* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise.
* sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
* include/sys/msg.h: Declare __libc_msgrcv and __libc_msgsnd.
* sysdeps/unix/sysv/linux/msgrcv.c (__msgrcv): Rename to __libc_msgrcv
and make old name an alias.
* sysdeps/unix/sysv/linux/msgsnd.c (__msgsnd): Rename to __libc_msgsnd
and make old name an alias.
* sysvipc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_msgrcv and
__libc_msgsnd.
* include/sys/uio.h: Declare __libc_readv and __libc_writev.
* misc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_readv and
__libc_writev.
* sysdeps/generic/readv.c (__readv): Rename to __libc_readv and make
old name an alias.
* sysdeps/posix/readv.c: Likewise
* sysdeps/unix/sysv/aix/readv.c: Likewise.
* sysdeps/unix/sysv/linux/readv.c: Likewise.
* sysdeps/generic/writev.c (__writev): Rename to __libc_writev and make
old name an alias.
* sysdeps/posix/writev.c: Likewise
* sysdeps/unix/sysv/aix/writev.c: Likewise.
* sysdeps/unix/sysv/linux/writev.c: Likewise.
* include/sys/wait.h: Declare __waitid.
* posix/Versions (libc) [GLIBC_PRIVATE]: Add __waitid.
* sysdeps/generic/waitid.c (waitid): Rename to __waitid and make old
name an alias.
* sysdeps/posix/waitid.c: Likewise.
* sysdeps/unix/sysv/aix/waitid.c: Likewise.
* sysdeps/unix/sysv/linux/syscalls.list: Add creat syscall.
2002-10-07 Jakub Jelinek <jakub@redhat.com>
* include/alloca.h (__libc_use_alloca, __libc_alloca_cutoff): New
prototypes.
(__MAX_ALLOCA_CUTOFF): Define.
Include allocalim.h.
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r,
_nss_dns_gethostbyaddr_r): Use alloca or malloc to allocate
host_buffer depending on __libc_use_alloca.
* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r,
_nss_dns_getnetbyaddr_r): Use alloca or malloc to allocate
net_buffer depending on __libc_use_alloca.
* resolv/res_query.c (res_nquery): Use alloca or malloc to allocate
buf depending on __libc_use_alloca.
* resolv/gethnamaddr.c (gethostbyname2, gethostbyaddr): Likewise.
* stdio-common/vfprintf.c (vfprintf): Use __libc_use_alloca
instead of hardcoded constants.
Pass proper size argument to alloca and compute end for wide char
version.
* stdio-common/printf_fp.c (__printf_fp): Use __libc_use_alloca
instead of hardcoded constants.
* string/strcoll.c (strcoll): Likewise.
* string/strxfrm.c (strxfrm): Likewise.
* sysdeps/posix/readv.c (__readv): Likewise.
* sysdeps/posix/writev.c (__writev): Likewise.
* sysdeps/generic/allocalim.h: New file.
* include/signal.h: No libc_hidden_proto for raise,
__libc_current_sigrtmin, __libc_current_sigrtmax.
These need to be overridden by linuxthreads.
* sysdeps/posix/raise.c: Reverted.
* sysdeps/generic/raise.c: Reverted.
* signal/allocrtsig.c: Reverted.
name to find codeset name (if any) and normalize it. If the
normalized name differs, look up only that in the archive.
* locale/programs/locarchive.c (add_locale_to_archive): If the name
contains a codeset, normalize the codeset store only the normalized
name in the archive. If not, add an alias containing the locale's
normalized codeset name. Apply codeset name normalization when
matching entries in the alias file.
* locale/programs/locarchive.c (delete_locales_from_archive): Don't
decrement HEAD->namehash_used here.
(add_locale): Only need to insert name string when name_offset != 0.
* locale/programs/localedef.c (options): Add -A/--alias-file.
(alias_file): New variable.
(parse_opt): Grok -A, set that.
* locale/programs/localedef.h: Declare it.
* locale/programs/locarchive.c (insert_name): New function, broken out
of ...
(add_locale_to_archive): ... here. Call that.
(add_alias): New function.
(add_locale): New static function, add_locale_to_archive renamed.
(add_locale_to_archive): Call that and use add_alias to add an alias
for the name with codeset if the given name lacks it.
(enlarge_archive): Call add_locale instead of add_locale_to_archive.
* locale/Makefile (routines): Add loadarchive.
* locale/loadarchive.c: New file, started from code by Ulrich Drepper.
(_nl_load_locale_from_archive): New function.
* locale/localeinfo.h: Declare it.
* locale/findlocale.c (_nl_find_locale): If using default locale path,
try _nl_load_locale_from_archive first.
* locale/loadlocale.c (_nl_intern_locale_data): New function,
broken out of _nl_load_locale.
(_nl_load_locale): Call that.
* locale/localeinfo.h: Declare it.
(struct locale_data): Replace member `mmaped' with `alloc', an enum.
(struct locale_data): Remove unused member `options'.
* locale/findlocale.c (_nl_remove_locale): Update uses.
* locale/loadlocale.c (_nl_load_locale, _nl_unload_locale): Likewise.
* locale/C-collate.c: Update initializer.
* locale/C-identification.c: Likewise.
* locale/C-measurement.c: Likewise.
* locale/C-telephone.c: Likewise.
* locale/C-address.c: Likewise.
* locale/C-name.c: Likewise.
* locale/C-paper.c: Likewise.
* locale/C-time.c: Likewise.
* locale/C-numeric.c: Likewise.
* locale/C-monetary.c: Likewise.
* locale/C-messages.c : Likewise.
* locale/C-ctype.c: Likewise.
* locale/hashval.h [! LONGBITS]: Include <limits.h> here and
use CHAR_BIT instead of BITSPERBYTE.
* locale/localeinfo.h (_nl_find_locale, _nl_load_locale,
_nl_unload_locale): Add `internal_function attribute_hidden' to decls.
* locale/findlocale.c (_nl_find_locale): Add internal_function to defn.
(_nl_remove_locale): Likewise.
* locale/loadlocale.c (_nl_load_locale, _nl_unload_locale): Likewise.
* locale/findlocale.c (_nl_default_locale_path): New variable.
(_nl_find_locale): If LOCALE_PATH is null, default to that.
* locale/localeinfo.h: Declare it.
* locale/setlocale.c (setlocale): Use _nl_default_locale_path
in place of LOCALEDIR. If no LOCPATH, pass null to _nl_find_locale.
* locale/newlocale.c (__newlocale): Likewise.
* misc/err.c (vwarnx, vwarn): Fix typos in libc_hidden_def uses.
* inet/rexec.c (rexec_af): Add libc_hidden_def.
* sysdeps/generic/morecore.c: Likewise.
* signal/allocrtsig.c (__libc_current_sigrtmin): Likewise.
(__libc_current_sigrtmax): Likewise.
2002-08-08 Roland McGrath <roland@redhat.com>
* locale/loadlocale.c (_nl_load_locale): Don't use MAP_INHERIT.
* catgets/open_catalog.c (__open_catalog): Likewise.
* locale/programs/locarchive.c (INITIAL_NUM_NAMES): Renamed
from typo INITIAL_NUM_NANES.
(create_archive): Update use.
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
2000-08-12 Andreas Jaeger <aj@suse.de>
* include/features.h (__STDC_ISO_10646__): Define.
Reported by Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>.
* include/features.h (__USE_ISOC99): Define for _XOPEN_SOURCE >= 600.
* locale/langinfo.h: Define YESSTR and NOSTR also for XPG4 (but not
for revision 6 and up).
* posix/sys/types.h: Define __need_timer_t and __need_clockid_t before
including <time.h>.
* time/time.h: Allow __need_timer_t and __need_clockid_t to be defined
to get definitions of just these types.
* signal/signal.h: Define thread signal handling functions also for
POSIX95.
* sysdeps/unix/sysv/linux/bits/types.h: Define thread types also for
POSIX95.
* sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/types.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise.
* sysvipc/sys/shm.h: Define pid_t for XPG.
* wcsmbs/wchar.h: Make the various wide char string and stream
functions available for the respective XPG versions.