about summary refs log tree commit diff
path: root/locale/global-locale.c
Commit message (Collapse)AuthorAgeFilesLines
* * locale/xlocale.h (struct __locale_struct): New member `__names'.Roland McGrath2002-08-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup: doinit):Roland McGrath2002-08-301-1/+5
| | | | | | | | | | 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.
* Make uselocale support static linking.Roland McGrath2002-08-281-0/+63
* 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.