2003-10-23 Jakub Jelinek <jakub@redhat.com>
* locale/programs/locale.c (show_info): Fix printing word values on
64-bit big-endian architectures.
2003-10-19 Bruno Haible <bruno@clisp.org>
* intl/hash-string.c (hash_string): Zero-extend each char from the
string; the old code did a sign-extend on some platforms.
2003-06-12 Ulrich Drepper <drepper@redhat.com>
* scripts/config.guess: Update from upstream version.
* scripts/config.sub: Likewise.
2003-06-12 Jakub Jelinek <jakub@redhat.com>
* locale/programs/ld-time.c (time_output): Also copy the era format,
not only the name.
2003-01-13 Ulrich Drepper <drepper@redhat.com>
* locale/programs/charmap-dir.c (charmap_readdir): Use struct
dirent64 instead of struct dirent for dirent. Call readdir64
instead of readdir.
* locale/programs/locfile.c (siblings_uncached): Use struct
dirent64 instead of struct dirent for other_dentry. Call
readdir64 instead of readdir.
* elf/ldconfig.c (direntry): Change type to struct dirent64.
(search_dir): Use readdir64 instead of readdir.
Patch by Zhangfan Xing <xing@pacific.jpl.nasa.gov>.
* intl/tst-gettext.c (main): Check return values from setlocale.
Add necessary unsetenv's to make LANG=existing-locale check work.
* intl/tst-gettext.sh: Use mkdir -p. Copy test files unconditionally,
so aborted prior runs don't confuse things.
* locale/localeinfo.h (struct locale_data: union locale_data_value):
Use uintptr_t instead of unsigned int for `word' member.
(_NL_CURRENT_WORD): Cast to uint32_t.
* posix/bug-regex5.c (main): Use union to extract _NL_COLLATE_NRULES
value.
into pointer to locrec_offset.
(add_locale_to_archive): Adjust callers. Free normalized_name right
before returning, not immediately after add_locale, pass it to
add_alias if not NULL instead of name. Rename second normalized_name
occurence to nnormalized_codeset_name.
2002-10-21 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/syscalls.list (s_execve): Set
caller to EXTRA instead of execve, since the latter has a
higher-priority implementation in linuxthreads.
instead of += to append, to be sure $(lib) gets expanded at defn time.
(libof-$(cpp-src)): New variable, define this instead.
* extra-lib.mk (cpp-srcs-left): Reduce duplication in include setup.
(lib): Don't use override.
(CPPFLAGS-$(lib)): New variable, put -D's here.
* Makeconfig (CPPFLAGS): Use basename fn for CPPFLAGS-basename.
Also add $(CPPFLAGS-LIB) before the file-specific flags, for each
LIB found by $(libof-*) for basename, target, or source.
* Makerules (CPPFLAGS-nonlib): New variable.
* nscd/Makefile (lib): Set to nonlib when using cppflags-iterator.mk.
* locale/Makefile (lib): Likewise.
* sunrpc/Makefile (lib): Likewise.
* sysdeps/unix/sysv/linux/fpathconf.c (LINUX_LINK_MAX): Move macro ...
* sysdeps/unix/sysv/linux/linux_fsinfo.h (LINUX_LINK_MAX): ... here.
* sysdeps/unix/sysv/linux/pathconf.h: New file.
(statfs_link_max): New function, guts from fpathconf.c.
* sysdeps/unix/sysv/linux/fpathconf.c: Rewritten using that.
* sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
* sysdeps/unix/sysv/linux/alpha/pathconf.c (__pathconf): Rewritten
to use the linux/pathconf.c code by #include rather than duplication.
* sysdeps/unix/sysv/linux/alpha/fpathconf.c (__pathconf): Likewise.
2002-10-16 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
Use __libc_errno only for libc itself.
just return &_nl_C_locobj instead of copying it.
* locale/freelocale.c (__freelocale): Check for &_nl_C_locobj.
* locale/duplocale.c (__duplocale): Likewise.
2002-10-07 Roland McGrath <roland@frob.com>
* config.h.in (HAVE_I386_SET_GDT): New #undef.
* sysdeps/mach/configure.in: Define it with new check for i386_set_gdt.
* sysdeps/mach/configure: Regenerated.
2002-10-06 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
Add all necessary register outputs for syscall-clobbered registers.
2002-10-02 David Mosberger <davidm@hpl.hp.com>
* sysdeps/ia64/bzero.S: Rewritten by Sverre Jarp to tune for
Itanium 2 (and Itanium).
Fix unwind directives and make it fit in 80 columns.
* sysdeps/ia64/memset.S: Ditto.
* sysdeps/ia64/memcpy.S: Ditto.
Move jump table to .rodata section.
2002-10-03 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Add
clobbers to asm.
the __ctype_* compat symbols, so the relocs generated bind to the
right versioned global symbol in the shared object.
* elf/do-rel.h (elf_dynamic_do_rel): Mask off 0x8000 bit (hidden flag)
from the value taken from the DT_VERSYM table.
* elf/dl-runtime.c (fixup, profile_fixup): Likewise.
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Likewise.
(RESOLVE_GOTSYM): Likewise.
Variable declarations removed.
(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Declare
these functions to replace them.
(__isctype, tolower, toupper, _tolower, _toupper): Use those accessor
functions plus an indirection rather than the old global variables.
* include/ctype.h (__isctype, tolower, _tolower, toupper, _toupper):
Macros removed.
(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): New extern
inline functions.
* ctype/ctype-info.c: Revert last reversion back the other way.
Define tsd vars CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
Define real function versions of include/ctype.h inlines here.
* ctype/Versions (libc: GLIBC_2.3): Add __ctype_b_loc,
__ctype_tolower_loc, __ctype_toupper_loc.
* locale/lc-ctype.c: Revert last reversion back the other way.
(_nl_postload_ctype): If current thread uses the global locale,
update its tsd vars.
* locale/uselocale.c (__uselocale): Update tsd vars from new locale.
* hurd/hurd/threadvar.h (enum __hurd_threadvar_index): Add CTYPE_B,
CTYPE_TOLOWER, CTYPE_TOUPPER.
* sysdeps/generic/bits/libc-tsd.h (__libc_tsd_address): New macro.
* sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_address): Renamed
from __libc_tsd_threadvar_location.
(__libc_tsd_set, __libc_tsd_get): Update uses.
* ctype/ctype.h: Undo the patch before the last one. Put back the
macro definitions for the standard functions to access the
classification and mapping arrays.
* include/ctype.h: Partly revert last patch. Move the macro
definitions for the exported functions back to the public header.
#undef all the macros defined here before redefining.
* ctype/ctype-info.c: Revert last patch.
* locale/lc-ctype.c: Revert last patch.
Instead, make the single allocation of the structure larger to hold
the name strings.
* locale/duplocale.c (__duplocale): Don't strdup names individually.
Instead, calculate size for a single allocation and copy into it.
* locale/freelocale.c (__freelocale): Don't free names individually.
* locale/uselocale.c (__uselocale): Return previous locale when
setting a new one.
* locale/newlocale.c: Commit changes from 2002-08-30
batch where I failed to commit this file:
(__newlocale): Fill in __names array.
2002-08-31 Ulrich Drepper <drepper@redhat.com>
* locale/localeinfo.h: Pretty printing.
* stdio-common/vfprintf.c (vfprintf): Remove duplicate ifs in
form_number handling.
(__aux_init_cache): New function.
(__aux_init_cache): New function.
* locale/programs/locarchive.c (struct oldlocrecent): New type.
(oldlocrecentcmp): New function.
* sysdeps/x86_64/fpu/bits/mathinline.h: New file.
* sysdeps/x86_64/fpu/s_copysign.S: New file.
* sysdeps/x86_64/fpu/s_copysignf.S: New file.
* sysdeps/x86_64/fpu/s_copysignl.S: New file.
* sysdeps/x86_64/fpu/s_finitel.S: New file.
* sysdeps/x86_64/fpu/s_fmax.S: New file.
* sysdeps/x86_64/fpu/s_fmaxf.S: New file.
* sysdeps/x86_64/fpu/s_fmaxl.S: New file.
* sysdeps/x86_64/fpu/s_fmin.S: New file.
* sysdeps/x86_64/fpu/s_fminf.S: New file.
* sysdeps/x86_64/fpu/s_fminl.S: New file.
* locale/programs/locarchive.c (struct nameent, struct dataent): New
types.
* sysdeps/unix/sysv/linux/x86_64/sys/io.h: New file.
* sysdeps/x86_64/fpu/s_llrint.S: New file.
* sysdeps/x86_64/fpu/s_llrintf.S: New file.
* sysdeps/x86_64/fpu/s_llrintl.S: New file.
* sysdeps/x86_64/fpu/s_lrint.S: New file.
* sysdeps/x86_64/fpu/s_lrintf.S: New file.
* sysdeps/x86_64/fpu/s_lrintl.S: New file.
* sysdeps/mips/fpu/fenv_libc.h (CAUSE_MASK): New macro.
(CAUSE_SHIFT): New macro.
* sysdeps/sparc/sparc64/configure.in: New file.
* sysdeps/unix/sysv/linux/x86_64/readelflib.c: New file.
* sysdeps/unix/sysv/linux/x86_64/bits/socket.h: New file.
* sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h: New file.
* sysdeps/unix/sysv/linux/x86_64/bits/shm.h: New file.
* sysdeps/x86_64/bits/setjmp.h: New file.
* sysdeps/unix/sysv/linux/x86_64/bits/sem.h: New file.
* sysdeps/unix/sysv/linux/x86_64/bits/resource.h: New file.
* elf/tst-tls1.c: Move #include "tls-macros.h" inside #ifdef USE_TLS.
* sysdeps/unix/sysv/linux/mips/sys/user.h: New file.
* config.h.in (HAVE_BUILTIN_MEMSET): New macro.
* elf/dl-deps.c (_dl_build_local_scope): New function.
* elf/dl-lookup.c (_dl_debug_bindings): New function.
(elf_machine_rela, elf_machine_rela_relative): New functions.
(elf_machine_rela, elf_machine_rela_relative): New functions.
* elf/dl-lookup.c (lookup_cache, lookup_cache_versioned): New
functions.
_nl_current_names; otherwise use the locale object.
2002-08-29 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/bits/local_lim.h (NAME_MAX): New macro.
2002-08-29 Roland McGrath <roland@redhat.com>
Change argument type from int to intptr_t.
* locale/global-locale.c (__libc_tsd_LOCALE_data): Conditionalize the
initializer on [! _HURD_THREADVAR_H] (bad kludge).
* sysdeps/mach/hurd/i386/init-first.c (init): Initialize
_HURD_THREADVAR_LOCALE slot to &_nl_global_locale.
* hurd/hurdsig.c (_hurdsig_init): Likewise. Zero other slots.
2002-08-28 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ia64/elf/configure.in (PI_STATIC_AND_HIDDEN): Define
unconditionally.
* sysdeps/alpha/elf/configure.in (libc_cv_alpha_hidden_gprel): New
check.
(PI_STATIC_AND_HIDDEN): Define if check succeeded.
2002-08-28 Jakub Jelinek <jakub@redhat.com>
* locale/loadarchive.c (_nl_load_locale_from_archive): Add fd >= 0
check to close_and_out close. Replace return NULL statements where
fd might be >= 0 with goto close_and_out. Close the file descriptor
when it is no longer needed.
* 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.
* locale/hashval.h (compute_hashval): Use prototype defn.
(hashval_t): New macro, defined to unsigned long int
if not already defined.
(compute_hashval): Return hashval_t instead of unsigned long int.
* locale/loadarchive.c (hashval_t): New macro.
* locale/programs/locarchive.c: Include hashval.h directly instead
of simple-hash.h.
(compute_hashval, hashval_t): Define these macros first.
(insert_name): Use archive_hashval instead of compute_hashval.
(add_locale, delete_locales_from_archive): Likewise.
2002-08-28 Jakub Jelinek <jakub@redhat.com>
* locale/programs/locarchive.c (insert_name): Suppress warnings about
hash collisions if be_quiet.
* locale/locale.h (__newlocale, __duplocale, __freelocale,
__uselocale): Don't declare these any more.
* include/locale.h (__uselocale): Declare here instead, using __typeof.
* locale/locale.h (__newlocale, __duplocale, __freelocale,
__uselocale): Don't declare these any more.
* include/locale.h (__uselocale): Declare here instead, using __typeof.
2002-08-27 Ulrich Drepper <drepper@redhat.com>
* sysdeps/arm/Dist: Add bits/link.h.
* sunrpc/Makefile: Distribute thrsvc.
* stdio-common/Makefile: Remove more left-overs from old stdio.
* include/linewrap.h: Removed.
* libio/bug-mmap-fflush.c: Rewrite to not touch source directory.
* intl/Makefile (distribute): Add plural-eval.c.
* stdio-common/Makefile (headers): Remove bits/stdio_lim.h. This
file isn't distributed. Add special rules to install bits/stdio_lim.h.
* Make-dist: Remove traces of old stdio.
* Makeconfig: Likewise.
* locale/Makefile (localedef-aux): New variable. Only md5
assigned to it. These files are not ddistributed in this directory.
* sysdeps/unix/sysv/linux/s390/Dist: Add sys/procfs.h.
* sysdeps/unix/sysv/linux/s390/s390-64/Dist: Remove sys/procfs.h.
* sysdeps/unix/sysv/linux/s390/s390-32/Dist: Likewise.
* sysdeps/unix/sysv/linux/Dist: Remove sys/sendfile.h.
2002-08-26 Ulrich Drepper <drepper@redhat.com>
* libio/Makefile (tests): Add bug-fopena+.
* libio/bug-fopena+.c: New file.
* stdio-common/tst-swprintf.c (main): Add casts to avoid warnings.
* locale/xlocale.c: Fix the last change. The variable still has
to end in _data.
* sysdeps/generic/bits/libc-tsd.h [!(USE_TLS && HAVE___THREAD)]
(__libc_tsd_set): Add _data prefix to variable name.
position indicated by locrectab against file bounds before rounding to
page size. In mapping loop, always set TO before breaking out of
contiguous range coalescing loop.
* locale/loadarchive.c (_nl_load_locale_from_archive): Use MAP_PRIVATE
(or MAP_COPY if available) instead of MAP_SHARED.
circular dependencies only if the locale in question hasn't
been finished.
* locale/programs/linereader.c (get_string): Pass LC_CTYPE not
CTYPE_LOCALE to load_locale.
* locale/programs/locfile.c (locfile_read): Don't include
unneeded but available locales in locale_mask.
* locale/programs/locarchive.c (enlarge_archive): If quiet, don't
print any messages about enlarging archive.
* locale/loadarchive.c (_nl_load_locale_from_archive): Don't read the
header separately, just map an initial window of 2MB from the file
and remap if that is not large enough to cover the whole header.
the type of locale_data_t's elements.
* locale/programs/locarchive.c (cmpcategorysize): New static function.
(add_locale): Use that to sort the categories by size and put all
those that fit into two pages into the LC_ALL block, instead of
hard-coding it to do everything but LC_CTYPE and LC_COLLATE.
(show_archive_content): Detect categories inside LC_ALL block
directly, instead of hard-coding.
2002-08-14 Jakub Jelinek <jakub@redhat.com>
* locale/programs/locarchive.c (struct oldlocrecent): New.
(oldlocrecentcmp): New.
(enlarge_archive): Re-add locales in the order they were added
to the archive.
(add_locale): Put all the small locale files together, if the small
locale file block would occupy less pages if page size aligned, align
it.
(show_archive_content): Adjust for locale archives optimized for speed.
2002-08-14 Roland McGrath <roland@frob.com>
* configure.in: Use "MISSING" as not-found value for MIG.
* sysdeps/mach/configure.in: Fatal if mig not found.
* configure, sysdeps/mach/configure: Regenerated.
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.
the static symbols added in the last change (doofus is me).
* locale/newlocale.c (__newlocale): Use a bit mask instead of a second
loop to notice missing categories in a composite name.
* locale/locale.h (LC_CTYPE_MASK, LC_NUMERIC_MASK, LC_TIME_MASK,
LC_COLLATE_MASK, LC_MONETARY_MASK, LC_MESSAGES_MASK, LC_ALL_MASK,
LC_PAPER_MASK, LC_NAME_MASK, LC_ADDRESS_MASK, LC_TELEPHONE_MASK,
LC_MEASUREMENT_MASK, LC_IDENTIFICATION_MASK, LC_ALL_MASK): New macros.
* malloc/tst-calloc.c: Add tests for one or both parameters being zero.
* 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.