+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
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>
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;
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. */
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);
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;
+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.
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.
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
# 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
# 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