1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

* 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.
This commit is contained in:
Roland McGrath
2002-08-30 10:36:44 +00:00
parent ccaf730670
commit 1ce8aaaedb
17 changed files with 105 additions and 61 deletions

View File

@@ -19,22 +19,9 @@
#include "localeinfo.h"
/* Name of current locale for each individual category.
Each is malloc'd unless it is _nl_C_name. */
const char *_nl_current_names[] attribute_hidden =
{
#define DEFINE_CATEGORY(category, category_name, items, a) \
[category] = _nl_C_name,
#include "categories.def"
#undef DEFINE_CATEGORY
[LC_ALL] = _nl_C_name /* For LC_ALL. */
};
const char *
attribute_hidden
__current_locale_name (int category)
{
return (_NL_CURRENT_LOCALE == &_nl_global_locale
? _nl_current_names[category]
: _NL_CURRENT_LOCALE->__locales[category]->name);
return _NL_CURRENT_LOCALE->__names[category];
}