Commit Graph

93 Commits

Author SHA1 Message Date
Florian Weimer bbebe83a28 locale: Remove cleanup function pointer from struct __localedata
We can call the cleanup functions directly from _nl_unload_locale
if we pass the category to it.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2022-05-23 11:06:31 +02:00
Paul Eggert 581c785bf3 Update copyright dates with scripts/update-copyrights
I used these shell commands:

../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")

and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 7061 files FOO.

I then removed trailing white space from math/tgmath.h,
support/tst-support-open-dev-null-range.c, and
sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following
obscure pre-commit check failure diagnostics from Savannah.  I don't
know why I run into these diagnostics whereas others evidently do not.

remote: *** 912-#endif
remote: *** 913:
remote: *** 914-
remote: *** error: lines with trailing whitespace found
...
remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
2022-01-01 11:40:24 -08:00
Paul Eggert 2b778ceb40 Update copyright dates with scripts/update-copyrights
I used these shell commands:

../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")

and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master
2021-01-02 12:17:34 -08:00
Joseph Myers 5c3b0374eb Do not use array parameter to new_composite_name (bug 26726)
Among the warnings causing a glibc build with GCC 11 to fail is one
for a call new_composite_name in setlocale.c.  The newnames argument
is declared as an array with __LC_LAST elements, but when the category
argument is not LC_ALL, it actually only has one element.  Since the
number of elements depends on the first argument to the function, it
seems clearer to declare the argument as a pointer.

Tested with build-many-glibcs.py for arm-linux-gnueabi, where this
allows the build to get further.

Reviewed-by: DJ Delorie <dj@redhat.com>
2020-10-30 21:39:12 +00:00
Joseph Myers d614a75396 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Paul Eggert 5a82c74822 Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:

sed -ri '
  s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
  s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
  $(find $(git ls-files) -prune -type f \
      ! -name '*.po' \
      ! -name 'ChangeLog*' \
      ! -path COPYING ! -path COPYING.LIB \
      ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
      ! -path manual/texinfo.tex ! -path scripts/config.guess \
      ! -path scripts/config.sub ! -path scripts/install-sh \
      ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
      ! -path INSTALL ! -path  locale/programs/charmap-kw.h \
      ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
      ! '(' -name configure \
            -execdir test -f configure.ac -o -f configure.in ';' ')' \
      ! '(' -name preconfigure \
            -execdir test -f preconfigure.ac ';' ')' \
      -print)

and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:

  chmod a+x sysdeps/unix/sysv/linux/riscv/configure
  # Omit irrelevant whitespace and comment-only changes,
  # perhaps from a slightly-different Autoconf version.
  git checkout -f \
    sysdeps/csky/configure \
    sysdeps/hppa/configure \
    sysdeps/riscv/configure \
    sysdeps/unix/sysv/linux/csky/configure
  # Omit changes that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
  git checkout -f \
    sysdeps/powerpc/powerpc64/ppc-mcount.S \
    sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
  # Omit change that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
  git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 02:43:31 -07:00
Florian Weimer de18a7061c locale: Avoid zero-length array in _nl_category_names [BZ #24962]
The union wrapper is unnecessary because C allows to read any object
as a sequence of chars.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2019-09-05 22:16:58 +02:00
Joseph Myers a04549c194 Break more lines before not after operators.
This patch makes further coding style fixes where code was breaking
lines after an operator, contrary to the GNU Coding Standards.  As
with the previous patch, it is limited to files following a reasonable
approximation to GNU style already, and is not exhaustive; more such
issues remain to be fixed.

Tested for x86_64, and with build-many-glibcs.py.

	* dirent/dirent.h [!_DIRENT_HAVE_D_NAMLEN
	&& _DIRENT_HAVE_D_RECLEN] (_D_ALLOC_NAMLEN): Break lines before
	rather than after operators.
	* elf/cache.c (print_cache): Likewise.
	* gshadow/fgetsgent_r.c (__fgetsgent_r): Likewise.
	* htl/pt-getattr.c (__pthread_getattr_np): Likewise.
	* hurd/hurdinit.c (_hurd_setproc): Likewise.
	* hurd/hurdkill.c (_hurd_sig_post): Likewise.
	* hurd/hurdlookup.c (__file_name_lookup_under): Likewise.
	* hurd/hurdsig.c (_hurd_internal_post_signal): Likewise.
	(reauth_proc): Likewise.
	* hurd/lookup-at.c (__file_name_lookup_at): Likewise.
	(__file_name_split_at): Likewise.
	(__directory_name_split_at): Likewise.
	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
	* hurd/port2fd.c (_hurd_port2fd): Likewise.
	* iconv/gconv_dl.c (do_print): Likewise.
	* inet/netinet/in.h (struct sockaddr_in): Likewise.
	* libio/wstrops.c (_IO_wstr_seekoff): Likewise.
	* locale/setlocale.c (new_composite_name): Likewise.
	* malloc/memusagestat.c (main): Likewise.
	* misc/fstab.c (fstab_convert): Likewise.
	* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
	Likewise.
	* nss/nss_compat/compat-grp.c (getgrent_next_nss): Likewise.
	(getgrent_next_file): Likewise.
	(internal_getgrnam_r): Likewise.
	(internal_getgrgid_r): Likewise.
	* nss/nss_compat/compat-initgroups.c (getgrent_next_nss):
	Likewise.
	(internal_getgrent_r): Likewise.
	* nss/nss_compat/compat-pwd.c (getpwent_next_nss_netgr): Likewise.
	(getpwent_next_nss): Likewise.
	(getpwent_next_file): Likewise.
	(internal_getpwnam_r): Likewise.
	(internal_getpwuid_r): Likewise.
	* nss/nss_compat/compat-spwd.c (getspent_next_nss_netgr):
	Likewise.
	(getspent_next_nss): Likewise.
	(internal_getspnam_r): Likewise.
	* pwd/fgetpwent_r.c (__fgetpwent_r): Likewise.
	* shadow/fgetspent_r.c (__fgetspent_r): Likewise.
	* string/strchr.c (STRCHR): Likewise.
	* string/strchrnul.c (STRCHRNUL): Likewise.
	* sysdeps/aarch64/fpu/fpu_control.h (_FPU_FPCR_IEEE): Likewise.
	* sysdeps/aarch64/sfp-machine.h (_FP_CHOOSENAN): Likewise.
	* sysdeps/csky/dl-machine.h (elf_machine_rela): Likewise.
	* sysdeps/generic/memcopy.h (PAGE_COPY_FWD_MAYBE): Likewise.
	* sysdeps/generic/symbol-hacks.h (__stack_chk_fail_local):
	Likewise.
	* sysdeps/gnu/netinet/ip_icmp.h (ICMP_INFOTYPE): Likewise.
	* sysdeps/gnu/updwtmp.c (TRANSFORM_UTMP_FILE_NAME): Likewise.
	* sysdeps/gnu/utmp_file.c (TRANSFORM_UTMP_FILE_NAME): Likewise.
	* sysdeps/hppa/jmpbuf-unwind.h (_JMPBUF_UNWINDS): Likewise.
	* sysdeps/mach/hurd/bits/stat.h (S_ISPARE): Likewise.
	* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): Likewise.
	(open_file): Likewise.
	* sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c
	(pthread_mutexattr_setprotocol): Likewise.
	* sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise.
	* sysdeps/mach/hurd/mmap.c (__mmap): Likewise.
	* sysdeps/mach/hurd/ptrace.c (ptrace): Likewise.
	* sysdeps/mach/hurd/spawni.c (__spawni): Likewise.
	* sysdeps/microblaze/dl-machine.h (elf_machine_type_class):
	Likewise.
	(elf_machine_rela): Likewise.
	* sysdeps/mips/mips32/sfp-machine.h (_FP_CHOOSENAN): Likewise.
	* sysdeps/mips/mips64/sfp-machine.h (_FP_CHOOSENAN): Likewise.
	* sysdeps/mips/sys/asm.h (multiple #if conditionals): Likewise.
	* sysdeps/posix/rename.c (rename): Likewise.
	* sysdeps/powerpc/novmx-sigjmp.c (__novmx__sigjmp_save): Likewise.
	* sysdeps/powerpc/sigjmp.c (__vmx__sigjmp_save): Likewise.
	* sysdeps/s390/fpu/fenv_libc.h (FPC_VALID_MASK): Likewise.
	* sysdeps/s390/utf8-utf16-z9.c (gconv_end): Likewise.
	* sysdeps/unix/grantpt.c (grantpt): Likewise.
	* sysdeps/unix/sysv/linux/a.out.h (N_TXTOFF): Likewise.
	* sysdeps/unix/sysv/linux/updwtmp.c (TRANSFORM_UTMP_FILE_NAME):
	Likewise.
	* sysdeps/unix/sysv/linux/utmp_file.c (TRANSFORM_UTMP_FILE_NAME):
	Likewise.
	* sysdeps/x86/cpu-features.c (get_common_indices): Likewise.
	* time/tzfile.c (__tzfile_compute): Likewise.
2019-02-25 13:19:19 +00:00
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Wilco Dijkstra ae65d4f3c3 Remove the str(n)dup inlines from string/bits/string2.h. Although inlining
calls with constant strings shows a small (~10%) performance gain, strdup is
typically used in error reporting code, so not performance critical.
Remove the now unused __need_malloc_and_calloc related defines from stdlib.h.

Rename existing uses of str(n)dup to __str(n)dup so it no longer needs to be
redirected to a builtin.  Also building GLIBC with -Os now no longer shows
localplt or linkname space failures (partial fix for BZ #15105 and BZ #19463).

        [BZ #15105]
        [BZ #19463]
        * elf/dl-cache.c (_dl_load_cache_lookup): Use __strdup.
        * inet/rcmd.c (rcmd_af): Likewise.
        * inet/rexec.c   (rexec_af): Likewise.
        * intl/dcigettext.c (_LIBC): Likewise.
        * intl/finddomain.c (_nl_find_domain): Use strdup expansion.
        * locale/loadarchive.c (_nl_load_locale_from_archive): Use __strdup.
        * locale/setlocale.c (setlocale): Likewise.
        * posix/spawn_faction_addopen.c
        (posix_spawn_file_actions_addopen): Likewise.
        * stdlib/putenv.c (putenv): Use __strndup.
        * sunrpc/svc_simple.c (__registerrpc): Use __strdup.
        * sysdeps/posix/getaddrinfo.c (gaih_inet): Use __strdup/__strndup.
        * include/stdlib.h (__need_malloc_and_calloc): Remove uses.
        (__Need_M_And_C) Remove define/undef.
        * stdlib/stdlib.h (__need_malloc_and_calloc): Remove uses.
        (__malloc_and_calloc_defined): Remove define.
        * string/bits/string2.h (__strdup): Remove define.
        (strdup): Likewise.
        (__strndup): Likewise.
        (strndup): Likewise.
2017-03-13 18:45:42 +00:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Joseph Myers ec999b8e5e Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).
It was noted in
<https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the
bits/*.h naming scheme should only be used for installed headers.
This patch renames bits/libc-lock.h to plain libc-lock.h and
bits/libc-lockP.h to plain libc-lockP.h to follow that convention.

Note that I don't know where libc-lockP.h comes from for Hurd (the
Hurd libc-lock.h includes libc-lockP.h, but the only libc-lockP.h in
the glibc source tree is for NPTL) - some unmerged patch? - but I
updated the #include in the Hurd libc-lock.h anyway.

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	[BZ #14912]
	* bits/libc-lock.h: Move to ...
	* sysdeps/generic/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	* sysdeps/mach/hurd/bits/libc-lock.h: Move to ...
	* sysdeps/mach/hurd/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	[_LIBC]: Include <libc-lockP.h> instead of <bits/libc-lockP.h>.
	* sysdeps/mach/bits/libc-lock.h: Move to ...
	* sysdeps/mach/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	* sysdeps/nptl/bits/libc-lock.h: Move to ...
	* sysdeps/nptl/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	* sysdeps/nptl/bits/libc-lockP.h: Move to ...
	* sysdeps/nptl/libc-lockP.h: ...here.
	(_BITS_LIBC_LOCKP_H): Rename macro to _LIBC_LOCKP_H.
	* crypt/crypt_util.c: Include <libc-lock.h> instead of
	<bits/libc-lock.h>.
	* dirent/scandir-tail.c: Likewise.
	* dlfcn/dlerror.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-writev.h: Likewise.
	* elf/rtld.c: Likewise.
	* grp/fgetgrent.c: Likewise.
	* gshadow/fgetsgent.c: Likewise.
	* gshadow/sgetsgent.c: Likewise.
	* iconv/gconv_conf.c: Likewise.
	* iconv/gconv_db.c: Likewise.
	* iconv/gconv_dl.c: Likewise.
	* iconv/gconv_int.h: Likewise.
	* iconv/gconv_trans.c: Likewise.
	* include/link.h: Likewise.
	* inet/getnameinfo.c: Likewise.
	* inet/getnetgrent.c: Likewise.
	* inet/getnetgrent_r.c: Likewise.
	* intl/bindtextdom.c: Likewise.
	* intl/dcigettext.c: Likewise.
	* intl/finddomain.c: Likewise.
	* intl/gettextP.h: Likewise.
	* intl/loadmsgcat.c: Likewise.
	* intl/localealias.c: Likewise.
	* intl/textdomain.c: Likewise.
	* libidn/idn-stub.c: Likewise.
	* libio/libioP.h: Likewise.
	* locale/duplocale.c: Likewise.
	* locale/freelocale.c: Likewise.
	* locale/newlocale.c: Likewise.
	* locale/setlocale.c: Likewise.
	* login/getutent_r.c: Likewise.
	* login/getutid_r.c: Likewise.
	* login/getutline_r.c: Likewise.
	* login/utmp-private.h: Likewise.
	* login/utmpname.c: Likewise.
	* malloc/mtrace.c: Likewise.
	* misc/efgcvt.c: Likewise.
	* misc/error.c: Likewise.
	* misc/fstab.c: Likewise.
	* misc/getpass.c: Likewise.
	* misc/mntent.c: Likewise.
	* misc/syslog.c: Likewise.
	* nis/nis_call.c: Likewise.
	* nis/nis_callback.c: Likewise.
	* nis/nss-default.c: Likewise.
	* nis/nss_compat/compat-grp.c: Likewise.
	* nis/nss_compat/compat-initgroups.c: Likewise.
	* nis/nss_compat/compat-pwd.c: Likewise.
	* nis/nss_compat/compat-spwd.c: Likewise.
	* nis/nss_nis/nis-alias.c: Likewise.
	* nis/nss_nis/nis-ethers.c: Likewise.
	* nis/nss_nis/nis-grp.c: Likewise.
	* nis/nss_nis/nis-hosts.c: Likewise.
	* nis/nss_nis/nis-network.c: Likewise.
	* nis/nss_nis/nis-proto.c: Likewise.
	* nis/nss_nis/nis-pwd.c: Likewise.
	* nis/nss_nis/nis-rpc.c: Likewise.
	* nis/nss_nis/nis-service.c: Likewise.
	* nis/nss_nis/nis-spwd.c: Likewise.
	* nis/nss_nisplus/nisplus-alias.c: Likewise.
	* nis/nss_nisplus/nisplus-ethers.c: Likewise.
	* nis/nss_nisplus/nisplus-grp.c: Likewise.
	* nis/nss_nisplus/nisplus-hosts.c: Likewise.
	* nis/nss_nisplus/nisplus-initgroups.c: Likewise.
	* nis/nss_nisplus/nisplus-network.c: Likewise.
	* nis/nss_nisplus/nisplus-proto.c: Likewise.
	* nis/nss_nisplus/nisplus-pwd.c: Likewise.
	* nis/nss_nisplus/nisplus-rpc.c: Likewise.
	* nis/nss_nisplus/nisplus-service.c: Likewise.
	* nis/nss_nisplus/nisplus-spwd.c: Likewise.
	* nis/ypclnt.c: Likewise.
	* nptl/libc_pthread_init.c: Likewise.
	* nss/getXXbyYY.c: Likewise.
	* nss/getXXent.c: Likewise.
	* nss/getXXent_r.c: Likewise.
	* nss/nss_db/db-XXX.c: Likewise.
	* nss/nss_db/db-netgrp.c: Likewise.
	* nss/nss_db/nss_db.h: Likewise.
	* nss/nss_files/files-XXX.c: Likewise.
	* nss/nss_files/files-alias.c: Likewise.
	* nss/nsswitch.c: Likewise.
	* posix/regex_internal.h: Likewise.
	* posix/wordexp.c: Likewise.
	* pwd/fgetpwent.c: Likewise.
	* resolv/res_hconf.c: Likewise.
	* resolv/res_libc.c: Likewise.
	* shadow/fgetspent.c: Likewise.
	* shadow/lckpwdf.c: Likewise.
	* shadow/sgetspent.c: Likewise.
	* socket/opensock.c: Likewise.
	* stdio-common/reg-modifier.c: Likewise.
	* stdio-common/reg-printf.c: Likewise.
	* stdio-common/reg-type.c: Likewise.
	* stdio-common/vfprintf.c: Likewise.
	* stdio-common/vfscanf.c: Likewise.
	* stdlib/abort.c: Likewise.
	* stdlib/cxa_atexit.c: Likewise.
	* stdlib/fmtmsg.c: Likewise.
	* stdlib/random.c: Likewise.
	* stdlib/setenv.c: Likewise.
	* string/strsignal.c: Likewise.
	* sunrpc/auth_none.c: Likewise.
	* sunrpc/bindrsvprt.c: Likewise.
	* sunrpc/create_xid.c: Likewise.
	* sunrpc/key_call.c: Likewise.
	* sunrpc/rpc_thread.c: Likewise.
	* sysdeps/arm/backtrace.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/generic/stdio-lock.h: Likewise.
	* sysdeps/generic/unwind-dw2-fde.c: Likewise.
	* sysdeps/i386/backtrace.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Likewise.
	* sysdeps/m68k/backtrace.c: Likewise.
	* sysdeps/mach/hurd/cthreads.c: Likewise.
	* sysdeps/mach/hurd/dirstream.h: Likewise.
	* sysdeps/mach/hurd/malloc-machine.h: Likewise.
	* sysdeps/nptl/malloc-machine.h: Likewise.
	* sysdeps/nptl/stdio-lock.h: Likewise.
	* sysdeps/posix/dirstream.h: Likewise.
	* sysdeps/posix/getaddrinfo.c: Likewise.
	* sysdeps/posix/system.c: Likewise.
	* sysdeps/pthread/aio_suspend.c: Likewise.
	* sysdeps/s390/s390-32/backtrace.c: Likewise.
	* sysdeps/s390/s390-64/backtrace.c: Likewise.
	* sysdeps/unix/sysv/linux/check_pf.c: Likewise.
	* sysdeps/unix/sysv/linux/if_index.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c: Likewise.
	* sysdeps/unix/sysv/linux/shm-directory.c: Likewise.
	* sysdeps/unix/sysv/linux/system.c: Likewise.
	* sysdeps/x86_64/backtrace.c: Likewise.
	* time/alt_digit.c: Likewise.
	* time/era.c: Likewise.
	* time/tzset.c: Likewise.
	* wcsmbs/wcsmbsload.c: Likewise.
	* nptl/tst-initializers1.c (do_test): Refer to <libc-lock.h>
	instead of <bits/libc-lock.h> in comment.
2015-09-08 21:11:03 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Florian Weimer d183645616 setlocale: Use the heap for the copy of the locale argument
This avoids alloca calls with potentially large arguments.
2014-07-10 16:29:34 +02:00
Ondřej Bílka a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Reuben Thomas 9cd8330240 Fix typo in setlocale.c. Fixes BZ #15764 2013-10-12 14:32:09 +02:00
Roland McGrath f1d70dad53 Remove lots of inline keywords. 2013-02-07 14:44:18 -08:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper cc9e536dac Fix handling of LC_CTYPE in locale name handling 2011-05-21 02:06:45 -04:00
Richard Henderson 6e9331df8b Finish locale_data -> __locale_data transition.
The transition that was begun here
f095bb7204
was not complete.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2010-03-26 09:21:34 -07:00
Ulrich Drepper f095bb7204 Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
2010-01-09 10:56:41 -08:00
Ulrich Drepper 2e79213a36 * locale/setlocale.c (setname): Remove inline to avoid compiler
warning.
2008-07-20 17:11:28 +00:00
Ulrich Drepper 9f558b8051 * locale/setlocale.c (setlocale): Take the setlocale lock earlier. 2008-07-20 08:49:18 +00:00
Ulrich Drepper 9a69db292a [BZ #5443]
2008-03-30  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5443]
	* intl/dcigettext.c (__dcigettext): Get reader lock for locale data
	before looking for translation.
	* locale/duplocale.c: Transform __libc_setlocale_lock into rwlock.
	* locale/freelocale.c: Likewise.
	* locale/newlocale.c: Likewise.
	* locale/setlocale.c: Likewise.
	Based partially on a patch by ryo@np.css.fujitsu.com.
2008-03-31 00:38:06 +00:00
Ulrich Drepper 9446614c28 * locale/setlocale.c: Change _nl_category_names into a string.
Add new _nl_category_name_idxs.  Change all users.
	* locale/localeinfo.h: Adjust declaration of _nl_category_names.
	Declare _nl_category_name_idxs.
	* locale/findlocale.c: Adjust for _nl_category_names change.
	* locale/loadlocale.c: Likewise.
	* locale/newlocale.c: Likewise.
	* intl/dcigettext.c: Likewise.
2006-05-15 18:36:28 +00:00
Roland McGrath e77fa91897 * locale/setlocale.c: Comment typo. 2005-03-23 03:02:03 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper 7c11c4a146 (do_release_all): Add __libc_freeres_fn_section. 2004-08-04 21:58:10 +00:00
Ulrich Drepper a31f867a42 Update.
* locale/setlocale.c (setlocale): Avoid duplicating locale names
	if we can reuse old strings.
2003-12-31 22:46:53 +00:00
Ulrich Drepper dd9423a67a Update.
2003-06-11  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c (queue_stack): Always inline.
	* ptreadhP.h (__do_cancel): Likewise.
2003-06-11 21:57:23 +00:00
Roland McGrath c877418f2e * include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):
New macros.
	* elf/dl-close.c (free_mem): Use libc_freeres_fn macro, remove
	text_set_element.
	* elf/dl-libc.c (free_mem): Likewise.
	* iconv/gconv_conf.c (free_mem): Likewise.
	* iconv/gconv_db.c (free_mem): Likewise.
	* iconv/gconv_dl.c (free_mem): Likewise.
	* iconv/gconv_cache.c (free_mem): Likewise.
	* intl/finddomain.c (free_mem): Likewise.
	* intl/dcigettext.c (free_mem): Likewise.
	* locale/setlocale.c (free_mem): Likewise.
	* misc/fstab.c (fstab_free): Likewise.
	* nss/nsswitch.c (free_mem): Likewise.
	* posix/regcomp.c (free_mem): Likewise.
	* resolv/gai_misc.c (free_res): Likewise.
	* stdlib/fmtmsg.c (free_mem): Likewise.
	* sunrpc/clnt_perr.c (free_mem): Likewise.
	* sysdeps/generic/setenv.c (free_mem): Likewise.
	* sysdeps/unix/sysv/linux/shm_open.c (freeit): Likewise.
	* sysdeps/pthread/aio_misc.c (free_res): Likewise.
	* time/tzset.c (free_mem): Likewise.
	* malloc/mtrace.c (release_libc_mem): Add __libc_freeres_fn_section.
	* locale/loadarchive.c (_nl_archive_subfreeres): Likewise.
	* malloc/set-freeres.c (__libc_freeres): Likewise.

	* login/getutent.c: Include stdlib.h instead of stddef.h.
	(buffer): Change into pointer to utmp, add libc_freeres_ptr.
	(__getutent): Allocate buffer the first time it is run.
	* login/getutid.c: Include stdlib.h instead of stddef.h.
	(buffer): Change into pointer to utmp, add libc_freeres_ptr.
	(__getutid): Allocate buffer the first time it is run.
	* login/getutline.c: Include stdlib.h instead of stddef.h.
	(buffer): Change into pointer to utmp, add libc_freeres_ptr.
	(__getutline): Allocate buffer the first time it is run.
	* malloc/mtrace.c (malloc_trace_buffer): Change into char *.
	(mtrace): Allocate malloc_trace_buffer.
	* resolv/nsap_addr.c (inet_nsap_ntoa): Decrease size of tmpbuf.
	* resolv/ns_print.c (ns_sprintrrf): Decrease size of t.
	* string/strerror.c: Include libintl.h and errno.h.
	(buf): New variable.
	(strerror): Only allocate buffer if actually needed (unknown error).
	* time/tzfile.c (transitions): Add libc_freeres_ptr.
	(freeres): Remove.

2002-10-25  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h (libc_freeres_ptr): New macro.
	* malloc/set-freeres.c (__libc_freeres_ptrs): Define using
	symbol_set_define.
	(__libc_freeres): Free all pointers in that section.
	* Makerules (build-shlib): Add $(LDSEDCMD-$(@F:lib%.so=%).so) to sed
	commands when creating .lds script.
	(LDSEDCMD-c.so): New variable.
	* inet/rcmd.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
	(rcmd_af): Use strdup to allocate ahostbuf.
	* inet/rexec.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
	(rexec_af): Use strdup to allocate ahostbuf.
	* stdio-common/reg-printf.c (printf_funcs): Remove.
	(__printf_arginfo_table): Change into printf_arginfo_function **.
	Add libc_freeres_ptr.
	(__register_printf_function): Allocate __printf_arginfo_table
	and __printf_function_table the first time it is called.
	* stdio-common/printf-parse.h (__printf_arginfo_table): Change into
	printf_arginfo_function **.
	(parse_one_spec): Add __builtin_expect.
	* grp/fgetgrent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* inet/getnetgrent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* intl/localealias.c (libc_freeres_ptr): Define if !_LIBC.
	(string_space, map): Add libc_freeres_ptr.
	(free_mem): Remove.
	* misc/efgcvt.c (FCVT_BUFPTR): Add libc_freeres_ptr.
	(free_mem): Remove.
	* misc/mntent.c (getmntent_buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* crypt/md5-crypt.c (libc_freeres_ptr): Define if !_LIBC.
	(buffer): Add libc_freeres_ptr.
	(free_mem): Remove for _LIBC.
	* nss/getXXbyYY.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* nss/getXXent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* pwd/fgetpwent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* resolv/res_hconf.c (ifaddrs): Add libc_freeres_ptr.
	(free_mem): Remove.
	* shadow/fgetspent.c (buffer): Add libc_freeres_ptr.
	(free_mem): Remove.
	* sysdeps/posix/ttyname.c (getttyname_name): Add libc_freeres_ptr.
	(free_mem): Remove.
	* sysdeps/unix/sysv/linux/getsysstats.c (mount_proc): Add
	libc_freeres_ptr.
	(free_mem): Remove.
	* sysdeps/unix/sysv/linux/ttyname.c (getttyname_name, ttyname_buf): Add
	libc_freeres_ptr.
	(free_mem): Remove.

2002-10-30  Jakub Jelinek  <jakub@redhat.com>

	* malloc/obstack.c [_LIBC] (obstack_free): Change into strong_alias
	instead of duplicating the whole function in libc.
2002-11-01 20:44:15 +00:00
Roland McGrath 0ba454fccb * locale/categories.def (LC_TIME): No more _nl_postload_time.
* locale/setlocale.c (_nl_category_postload): Use weak refs only under
	[_NL_CURRENT_INDIRECT].
2002-08-31 21:09:35 +00:00
Roland McGrath 1ce8aaaedb * locale/xlocale.h (struct __locale_struct): New member `__names'.
* locale/xlocale.c (_nl_C_locobj): Update initializer.
	* locale/global-locale.c (_nl_global_locale): Likewise.
	* locale/duplocale.c (__duplocale): strdup __names elements.
	* locale/freelocale.c (__freelocale): Free __names elements.
	* locale/localename.c (_nl_current_names): Variable removed.
	(__current_locale_name): Use _NL_CURRENT_LOCALE->__names instead.
	* locale/localeinfo.h (_nl_current_names): Removed decl.
	* locale/setlocale.c: Use _nl_global_locale->__names in place of
	_nl_current_names throughout.

	* locale/setlocale.c (setlocale): strdup -> __strdup (not ISO C).

	* sysdeps/gnu/errlist-compat.awk: Emit link_warnings for sys_errlist
	and sys_nerr in the output file.

	* sunrpc/Makefile (rpcgen-cmd): Pass CPP in rpcgen's environment.
	* scripts/cpp: Just use the environment variable.

	* libio/tst-mmap-setvbuf.c (main): Use 'm' fopen flag.
	* libio/tst-mmap-offend.c (do_test): Likewise.
	* libio/tst-mmap-fflushsync.c (do_test): Likewise.
	* libio/tst-mmap-eofsync.c (do_test): Likewise.
	* libio/tst-mmap2-eofsync.c (do_test): Likewise.
2002-08-30 10:36:44 +00:00
Roland McGrath 9a411bf59f * locale/findlocale.c [NL_CURRENT_INDIRECT] (_nl_C): New variable.
* locale/setlocale.c (setlocale) [NL_CURRENT_INDIRECT]: Null return
	from _nl_find_locale ok if for _nl_C_name.
2002-08-29 05:57:16 +00:00
Roland McGrath 27abf7a323 * Makeconfig (run-program-prefix): Fix bogus use of $(findstring ...)
to use $(filter ...) instead.  Same bug fixed in aix conditionals.

	* locale/setlocale.c: Declare postload functions weak.
2002-08-28 11:08:46 +00:00
Roland McGrath 1a0d874ed4 Make uselocale support static linking.
* locale/xlocale.c: Revert changes putting _nl_global_locale here.
	This file again just defines _nl_C_locobj.
	(_nl_C_locobj): Use a categories.def iterator in the initializer.
	* locale/global-locale.c: New file.  Define _nl_global_locale here,
	using all weak references in the initializer.
	* locale/Makefile (aux): Add global-locale.
	* locale/localeinfo.h (_nl_global_locale, _NL_CURRENT_LOCALE): Make
	these unconditional, along with the tsd decl.
	[!SHARED && HAVE___THREAD && HAVE_WEAK_SYMBOLS] (NL_CURRENT_INDIRECT):
	Define it under these conditions.
	[NL_CURRENT_INDIRECT]: Test this instead of [! SHARED].
	Don't declare _nl_current.  Declare _nl_current_LC_FOO as
	`extern __thread struct locale_data *const *'.
	[NL_CURRENT_INDIRECT]
	(_NL_CURRENT_DATA, _NL_CURRENT, _NL_CURRENT_WSTR): Add indirection.
	[NL_CURRENT_INDIRECT] (_NL_CURRENT_DEFINE): Rewritten.  Define
	the thread variable _nl_current_LC_FOO and also a special absolute
	symbol _nl_current_LC_FOO_used.
	* locale/uselocale.c (__uselocale) [NL_CURRENT_INDIRECT]:
	Set each _nl_current_LC_FOO symbol to point into the new locale,
	using weak references to test if _nl_current_LC_FOO_used was linked in.
	* locale/setlocale.c [! SHARED]: Replace this conditional ...
	[NL_CURRENT_INDIRECT]: ... with this one.
	(_nl_current, _nl_C): Variables removed.
	[NL_CURRENT_INDIRECT] (_nl_current_used): New variable, table of
	weak references to _nl_current_LC_FOO_used.
	[NL_CURRENT_INDIRECT] (CATEGORY_USED): Define using that table.
	(free_category): New function, broken out of ...
	(free_mem): ... here.  Call that.
	(free_mem) [NL_CURRENT_INDIRECT]: Use a categories.def iterator
	instead of a loop.

	__USING_NAMESPACE_C99 depending on _GLIBCPP_USE_NAMESPACES.
2002-08-28 10:39:23 +00:00
Roland McGrath a89a3dab80 2002-08-10 Roland McGrath <roland@redhat.com>
* locale/loadarchive.c (_nl_archive_subfreeres): New function.
	* locale/localeinfo.h: Declare it.
	* locale/setlocale.c (free_mem): Don't call _nl_unload_locale on the
	current locale if it's not in the file list.
	Call _nl_archive_subfreeres.
	* include/wctype.h (iswalpha, iswdigit, iswlower, iswspace, iswxdigit,
	towlower, towupper): Add prototypes here too.  Add libc_hidden_proto.
	* wctype/wcfuncs.c (iswalpha, iswdigit, iswlower, iswspace, iswxdigit,
	towlower, towupper): Add libc_hidden_weak.
2002-08-10 23:55:20 +00:00
Roland McGrath cb09a2cda2 * locale/loadarchive.c (_nl_load_locale_from_archive): Parse locale
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.
2002-08-10 06:22:37 +00:00
Roland McGrath 30c14c31ae * locale/setlocale.c (_nl_current_names): Variable moved ...
* locale/localename.c (_nl_current_names): ... here, new file.
	Make it global, with attribute_hidden.
	* locale/localeinfo.h: Declare it.
	* locale/Makefile (aux): Add localename.
	* locale/localename.c (__current_locale_name): New function.
	* include/locale.h (__current_locale_name): Declare it.
	* intl/dcigettext.c (guess_category_value): Use that instead of
	calling setlocale.

	* locale/locale.h [__USE_GNU] (locale_t): New type alias of __locale_t.
	[__USE_GNU] (newlocale, duplocale, freelocale, uselocale): New decls.
	[__USE_GNU] (LC_GLOBAL_LOCALE): New macro.
	* locale/newlocale.c: Add alias to __ name.
	* locale/duplocale.c: Likewise.
	* locale/freelocale.c: Likewise.
	* locale/uselocale.c: New file.
	* locale/Makefile (routines): Add it.
	* locale/Versions (libc: GLIBC_2.3): New set.
	Add newlocale, duplocale, freelocale, uselocale.
	(libc: GLIBC_PRIVATE): Add __uselocale.

	* locale/localeinfo.h [SHARED]
	(_NL_CURRENT_LOCALE): New macro, defined to fetch a tsd value.
	(_NL_CURRENT_DATA): Define using that.
	(_NL_CURRENT, _NL_CURRENT_WSTR, _NL_CURRENT_WORD): Define using that.
	(_NL_CURRENT_DEFINE): Define to empty.
	[! SHARED]: Decls of _nl_current_CATEGORY and _nl_current
	conditionalized on this.
	* locale/xlocale.c (NL_C_INTIIALIZER): New macro,
	taking initializer of _nl_C_locobj.
	[SHARED] (_nl_global_locale): New variable, using that initializer.
	(_nl_C_locobj): Use new macro for initialzier.
	* locale/setlocale.c [! SHARED] (_nl_current): Conditionalize on this.
	[! SHARED] (CATEGORY_USED): New macro.
	[SHARED] (CATEGORY_USED, _nl_C): New macros.
	(setdata, setlocale): Use that macro instead of examining _nl_current.
	(setdata): Set the slot in _nl_global_locale.
	Conditionalize setting of _nl_current on [! SHARED].
	* locale/findlocale.c [SHARED] (_nl_C): Define as a macro instead of
	declaration as an extern.
	* locale/newlocale.c (__newlocale): Use _nl_C_locobj instead of _nl_C.

	* include/locale.h: Use libc_hidden_proto for setlocale.
	* locale/setlocale.c: Add libc_hidden_def.

	* locale/setlocale.c (free_mem): Use _NL_CURRENT_DATA.
2002-08-04 01:41:55 +00:00
Ulrich Drepper ab26a24a17 Update.
* ctype/ctype-info.c: Declare _nl_C_LC_CTYPE_class,
	_nl_C_LC_CTYPE_class32, _nl_C_LC_CTYPE_toupper, _nl_C_LC_CTYPE_tolower,
	_nl_C_LC_CTYPE_class_upper, _nl_C_LC_CTYPE_class_lower,
	_nl_C_LC_CTYPE_class_alpha, _nl_C_LC_CTYPE_class_digit,
	_nl_C_LC_CTYPE_class_xdigit, _nl_C_LC_CTYPE_class_space,
	_nl_C_LC_CTYPE_class_print, _nl_C_LC_CTYPE_class_graph,
	_nl_C_LC_CTYPE_class_blank, _nl_C_LC_CTYPE_class_cntrl,
	_nl_C_LC_CTYPE_class_punct, _nl_C_LC_CTYPE_class_alnum,
	_nl_C_LC_CTYPE_map_toupper, _nl_C_LC_CTYPE_map_tolower, and
	_nl_C_LC_CTYPE_width: Declare as hidden.
	* include/locale.h: Declare _nl_locale_file_list.
	* locale/C-address.c: Define _nl_C_LC_ADDRESS as hidden.
	* locale/C-collate.c: Define _nl_C_LC_COLLATE as hidden.
	* locale/C-identification.c: Define _nl_C_LC_IDENTIFICATION as hidden.
	* locale/C-measurement.c: Define _nl_C_LC_MEASUREMENT as hidden.
	* locale/C-messages.c: Define _nl_C_LC_MESSAGES as hidden.
	* locale/C-monetary.c: Define _nl_C_LC_MONETARY as hidden.
	* locale/C-name.c: Define _nl_C_LC_NAME as hidden.
	* locale/C-numeric.c: Define _nl_C_LC_NUMERIC as hidden.
	* locale/C-paper.c: Define _nl_C_LC_PAPER as hidden.
	* locale/C-telephone.c: Define _nl_C_LC_TELEPHONE as hidden.
	* locale/C-time.c: Define _nl_C_LC_TIME as hidden.
	* locale/C-ctype.c: Define _nl_C_LC_CTYPE_class,
	_nl_C_LC_CTYPE_class32, _nl_C_LC_CTYPE_toupper, _nl_C_LC_CTYPE_tolower,
	_nl_C_LC_CTYPE_class_upper, _nl_C_LC_CTYPE_class_lower,
	_nl_C_LC_CTYPE_class_alpha, _nl_C_LC_CTYPE_class_digit,
	_nl_C_LC_CTYPE_class_xdigit, _nl_C_LC_CTYPE_class_space,
	_nl_C_LC_CTYPE_class_print, _nl_C_LC_CTYPE_class_graph,
	_nl_C_LC_CTYPE_class_blank, _nl_C_LC_CTYPE_class_cntrl,
	_nl_C_LC_CTYPE_class_punct, _nl_C_LC_CTYPE_class_alnum,
	_nl_C_LC_CTYPE_map_toupper, _nl_C_LC_CTYPE_map_tolower,
	_nl_C_LC_CTYPE_width, and as hidden.
	* locale/findlocale.c: Declare _nl_C as hidden.
	* locale/newlocale.c: Likewise.
	* locale/setlocale.c: Define _nl_C as hidden.  Remove declaration of
	_nl_locale_file_list.
	* locale/xlocale.c: Declare _nl_C_LC_CTYPE_class,
	_nl_C_LC_CTYPE_toupper, and _nl_C_LC_CTYPE_tolower as hidden.
	Define _nl_C_locobj as hidden.

	* malloc/mtrace.c (_mtrace_file): Define as hidden.
	(_mtrace_line): Likewise.

	* include/time.h: Declare __mon_yday as hidden.
	* time/strptime.c [_LIBC] (__mon_yday): Remove declaration.

	* libio/libioP.h: Declare __libio_codecvt as hidden.
	* libio/fileops.c: Declare __libio_translit as hidden.
	* libio/iofwide.c: Define __libio_translit as hidden.

	* login/getutent_r.c: Define __libc_utmp_lock as hidden.
	* login/getutid_r.c: Declare __libc_utmp_lock as hidden.
	* login/getutline_r.c: Likewise.
	* login/utmpname.c: Likewise.

	* login/utmp-private.h: Declare __libc_utmp_file_functions,
	__libc_utmp_unknown_functions, __libc_utmp_jump_table, and
	__libc_utmp_file_name as hidden.

	* locale/setlocale.c (__libc_setlocale_lock): Define as hidden.
	* locale/duplocale.c (__libc_setlocale_lock): Declare as hidden.
	* locale/freelocale.c: Likewise.
	* locale/lc-time.c: Likewise.

	* sysdeps/unix/bsd/getpt.c (__libc_ptyname1): Define as hidden.
	(__libc_ptyname2): Likewise.
	* sysdeps/unix/sysv/linux/ptsname.c (__libc_ptyname1): Declare as
	hidden.
	(__libc_ptyname2): Likewise.

	* sysdeps/generic/sbrk.c: Declare __libc_multiple_libcs as hidden.
	* sysdeps/arm/init-first.c (__libc_multiple_libcs): Define as hidden.
	* sysdeps/generic/init-first.c: Likewise.
	* sysdeps/i386/init-first.c: Likewise.
	* sysdeps/mach/hurd/i386/init-first.c: Likewise.
	* sysdeps/mach/hurd/mips/init-first.c: Likewise.
	* sysdeps/mach/hurd/powerpc/init-first.c: Likewise.
	* sysdeps/sh/init-first.c: Likewise.
	* sysdeps/unix/sysv/aix/init-first.c: Likewise.
	* sysdeps/unix/sysv/linux/init-first.c: Likewise.
2002-03-13 06:33:52 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
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.
2001-07-06 04:58:11 +00:00
Ulrich Drepper 90e5b29e14 Update.
* manual/users.texi (Setting Groups): Correct initgroups
	documentation.  Add documentation for getgrouplist.

2001-06-28  H.J. Lu  <hjl@gnu.org>

	* locale/findlocale.c (locale_file_list): Renamed to ...
	(_nl_locale_file_list): This. Make it extern.
	(free_mem): Move to ...
	* locale/setlocale.c (free_mem): Here.

2001-06-28  Mark Kettenis  <kettenis@gnu.org>

2001-06-20  Isamu Hasegawa  <isamu@yamato.ibm.com>
2001-06-26  Isamu Hasegawa  <isamu@yamato.ibm.com>
	* posix/regex.c (count_mbs_length): Use binary search for optimization.
2001-06-29 00:17:44 +00:00
Ulrich Drepper 411adb1068 Update.
2000-11-29  H.J. Lu  <hjl@gnu.org>

	* stdio-common/vfscanf.c (ORIENT): Swap the COMPILE_WSCANF case.

2000-11-30  Jakub Jelinek  <jakub@redhat.com>

	* locale/setlocale.c (setname): Free for all categories, not just
	LC_ALL.
	(setlocale): Store a copy of string passed by user, not the string
	itself.

	* sysdeps/unix/sysv/linux/hppa/brk.c (__brk): Remove unused variable.
2000-12-01 00:43:32 +00:00
Ulrich Drepper 111bb972b2 Update.
2000-11-15  Ulrich Drepper  <drepper@redhat.com>

	* intl/Makefile: tst-gettext2.sh does not need a third parameter.

	* intl/tst-gettext2.sh: Copy locale data.  Adjust LOCPATH.  Verify
	output of program.

	* intl/tst-gettext2.c: Set C locale if setting other locale
	failed.  Use gettext() not _().

	* locale/setlocale.c: Increment _nl_msg_cat_cntr whenever we
	successfully loaded a new locale.

2000-11-13  Andreas Jaeger  <aj@suse.de>

	* configure.in: Require gcc 2.95 or newer.

2000-11-15  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/paths.h: Adjust for FHS.
	Patch by Arkadiusz Miskiewicz <misiek@pld.ORG.PL>.

2000-11-11  Jim Meyering  <meyering@lucent.com>

	* string/strndup.c (strndup): Cast return value to `char *'.

2000-11-15  Jim Meyering  <meyering@ascend.com>

	* sysdeps/generic/memchr.c: Remove some useless parentheses.
	[HAVE_STDLIB_H || defined _LIBC]: Include <stdlib.h>.
	[HAVE_BP_SYM_H || defined _LIBC]: Guard inclusion of bp-sym.h.
	[! (HAVE_BP_SYM_H || defined _LIBC)] (BP_SYM): Define as no-op.
	Also #undef __memchr.
	Use `weak_alias' only if it's defined.

2000-11-10  H.J. Lu  <hjl@gnu.org>

	* Makefile.in (install): Set LANGUAGE=C LC_ALL=C.
2000-11-15 23:56:34 +00:00
Ulrich Drepper d8337213c8 Update.
* locale/C-monetary.c: Set mon_decimal to empty string.
	Add missing entry _NL_MONETARY_CRNCYSTR.
	* stdio-common/printf_fp.c: If MON_DECIAL_POINT is not provided use
	DECIMAL_POINT information.
	* locale/C-numeric.c: Set mon_grouping entry to empty string.
	* locale/C-time.c: Add date_fmt entries.  Remove two wrong entries.
	Correct value for number of entries.
	* locale/localeconv.c: Normalize result passed back in .grouping.
	Fix assignment to .int_* entries.

	* locale/Makefile (tests): Add tst-C-locale.
	* locale/tst-C-locale.c: New file.

	* locale/setlocale.c: Use LOCALEDIR and not LOCALE_PATH to locate
	locale files.
	* locale/newlocale.c: Likewise.

2000-10-26  GOTO Masanori  <gotom@debian.or.jp>

	* locale/langinfo.h: Define _DATE_FMT and _NL_W_DATE_FMT.
	* locale/categories.def: New support for date_fmt.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/locfile-kw.gperf: Likewise.
	* locale/programs/locfile-kw.h: Likewise.
	* locale/programs/locfile-token.h: Likewise.

2000-10-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ieee754/ldbl-128/e_hypotl.c: New.

	* math/libm-test.inc (cabs_test, cexp_test, csqrt_test, hypot_test):
	Increase precision of constants.
	* sysdeps/alpha/fpu/libm-test-ulps: Update.
	* sysdeps/arm/libm-test-ulps: Update.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/ia64/fpu/libm-test-ulps: Update.
	* sysdeps/m68k/fpu/libm-test-ulps: Update.
	* sysdeps/mips/fpu/libm-test-ulps: Update.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.
	* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.
	* sysdeps/sh/sh4/fpu/libm-test-ulps: Update.
	* sysdeps/s390/fpu/libm-test-ulps: Update.

2000-10-26  Ulrich Drepper  <drepper@redhat.com>
2000-10-26 23:41:17 +00:00