mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
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.
This commit is contained in:
parent
9a0fe6a812
commit
411adb1068
14
ChangeLog
14
ChangeLog
@ -1,3 +1,14 @@
|
||||
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.
|
||||
|
||||
2000-11-30 Roland McGrath <roland@frob.com>
|
||||
|
||||
* sysdeps/mach/hurd/defs.c (init_stdio): Put this on __libc_subinit
|
||||
@ -16,8 +27,7 @@
|
||||
|
||||
2000-11-29 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* sysdeps/unix/sysv/linux/hppa/brk.c (__brk): Remove unused
|
||||
variable.
|
||||
* sysdeps/unix/sysv/linux/hppa/brk.c (__brk): Remove unused variable.
|
||||
|
||||
2000-11-28 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
|
@ -194,7 +194,7 @@ setname (int category, const char *name)
|
||||
if (_nl_current_names[category] == name)
|
||||
return;
|
||||
|
||||
if (category == LC_ALL && _nl_current_names[category] != _nl_C_name)
|
||||
if (_nl_current_names[category] != _nl_C_name)
|
||||
free ((char *) _nl_current_names[category]);
|
||||
|
||||
_nl_current_names[category] = name;
|
||||
@ -322,6 +322,14 @@ setlocale (int category, const char *locale)
|
||||
control over the usage. So we mark it as un-deletable. */
|
||||
if (newdata[category]->usage_count != UNDELETABLE)
|
||||
newdata[category]->usage_count = UNDELETABLE;
|
||||
|
||||
/* Make a copy of locale name. */
|
||||
if (newnames[category] != _nl_C_name)
|
||||
{
|
||||
newnames[category] = strdup (newnames[category]);
|
||||
if (newnames[category] == NULL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Create new composite name. */
|
||||
@ -342,6 +350,10 @@ setlocale (int category, const char *locale)
|
||||
functions know about this. */
|
||||
++_nl_msg_cat_cntr;
|
||||
}
|
||||
else
|
||||
for (++category; category < __LC_LAST; ++category)
|
||||
if (category != LC_ALL && newnames[category] != _nl_C_name)
|
||||
free ((char *) newnames[category]);
|
||||
|
||||
/* Critical section left. */
|
||||
__libc_lock_unlock (__libc_setlocale_lock);
|
||||
@ -376,10 +388,21 @@ setlocale (int category, const char *locale)
|
||||
newdata->usage_count = UNDELETABLE;
|
||||
}
|
||||
|
||||
/* Make a copy of locale name. */
|
||||
if (newname[0] != _nl_C_name)
|
||||
{
|
||||
newname[0] = strdup (newname[0]);
|
||||
if (newname[0] == NULL)
|
||||
goto abort_single;
|
||||
}
|
||||
|
||||
/* Create new composite name. */
|
||||
composite = new_composite_name (category, newname);
|
||||
if (composite == NULL)
|
||||
{
|
||||
if (newname[0] != _nl_C_name)
|
||||
free ((char *) newname[0]);
|
||||
|
||||
/* Say that we don't have any data loaded. */
|
||||
abort_single:
|
||||
newname[0] = NULL;
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-30 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* Makefile (tests): Add tst-setlocale.
|
||||
(tst-setlocale-ENV): Define.
|
||||
* tst-setlocale.c: New file.
|
||||
|
||||
2000-11-28 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* Makefile (LOCALES): Add ja_JP.SJIS.
|
||||
|
@ -90,7 +90,7 @@ locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \
|
||||
tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \
|
||||
tst_wctype tst_wcwidth
|
||||
|
||||
tests = $(locale_test_suite) tst-digits
|
||||
tests = $(locale_test_suite) tst-digits tst-setlocale
|
||||
endif
|
||||
|
||||
# Files to install.
|
||||
@ -254,3 +254,5 @@ tst_wctrans-ENV = $(TEST_MBWC_ENV)
|
||||
tst_wctype-ENV = $(TEST_MBWC_ENV)
|
||||
tst_wcwidth-ENV = $(TEST_MBWC_ENV)
|
||||
tst-digits-ENV = $(TEST_MBWC_ENV)
|
||||
|
||||
tst-setlocale-ENV = LOCPATH=$(common-objpfx)localedata LC_ALL=ja_JP.EUC-JP
|
||||
|
@ -87,8 +87,7 @@
|
||||
# define ISDIGIT(Ch) iswdigit (Ch)
|
||||
# define ISXDIGIT(Ch) iswxdigit (Ch)
|
||||
# define TOLOWER(Ch) towlower (Ch)
|
||||
# define ORIENT if (s->_vtable_offset == 0 && _IO_fwide (s, 1) != 1)\
|
||||
return WEOF
|
||||
# define ORIENT if (_IO_fwide (s, -1) != -1) return WEOF
|
||||
# define __strtoll_internal __wcstoll_internal
|
||||
# define __strtoull_internal __wcstoull_internal
|
||||
# define __strtol_internal __wcstol_internal
|
||||
@ -117,7 +116,8 @@
|
||||
# define ISDIGIT(Ch) isdigit (Ch)
|
||||
# define ISXDIGIT(Ch) isxdigit (Ch)
|
||||
# define TOLOWER(Ch) tolower (Ch)
|
||||
# define ORIENT if (_IO_fwide (s, -1) != -1) return EOF
|
||||
# define ORIENT if (s->_vtable_offset == 0 && _IO_fwide (s, 1) != 1)\
|
||||
return EOF
|
||||
|
||||
# define L_(Str) Str
|
||||
# define CHAR_T char
|
||||
|
Loading…
Reference in New Issue
Block a user