From a0edd63e7c41336220353a6055662f38f5429a50 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 21 Apr 2000 03:43:31 +0000 Subject: Update. 2000-04-19 Jakub Jelinek * locale/programs/ld-ctype.c (ctype_output): Set size of the idx field to nelems * sizeof (uint32_t). * locale/programs/ld-address.c (address_output): Align word fields properly. * locale/programs/ld-monetary.c (monetary_output): Likewise. Don't restart idx pointers to idx end at the duo_int_curr_symbol field. Avoid giving arbitrary garbage in the crncystr field. Use sizeof(uint32_t) instead of 4 for len in uno_valid_from, uno_valid_to, duo_valid_from, duo_valid_to and conversion_rate fields. * locale/programs/ld-numeric.c (numeric_output): Likewise. Don't restart idx pointers to idx end at the decimal_point_wc field. * locale/programs/ld-time.c (time_output): week_1stday should be word, not byte. Align it properly. 2000-04-19 H.J. Lu * csu/gmon-start.c (_start): Declared as "extern void". (etext): Likewise. 2000-04-18 Andreas Jaeger * manual/install.texi (Running make install): Don't mention utmpd anymore. 2000-04-18 Andreas Jaeger * linuxthreads/Versions: Use ld instead of ld.so. * elf/Makefile (ld-map): Use ld.map. * Versions.def: Use ld instead of ld.so. * elf/Versions: Likewise. * sysdeps/mach/hurd/Versions: Likewise. --- locale/programs/ld-numeric.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'locale/programs/ld-numeric.c') diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c index 017c41fdc2..80a557c317 100644 --- a/locale/programs/ld-numeric.c +++ b/locale/programs/ld-numeric.c @@ -133,7 +133,7 @@ numeric_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric; - struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; + struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; size_t cnt = 0; @@ -163,19 +163,26 @@ numeric_output (struct localedef_t *locale, struct charmap_t *charmap, iov[cnt].iov_len = numeric->grouping_len; ++cnt; - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; + idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + + /* Align following data */ + iov[cnt].iov_base = (void *) "\0\0"; + iov[cnt].iov_len = ((idx[cnt - 2] + 3) & ~3) - idx[cnt - 2]; + idx[cnt - 2] = (idx[cnt - 2] + 3) & ~3; + ++cnt; + iov[cnt].iov_base = (void *) &numeric->decimal_point_wc; iov[cnt].iov_len = sizeof (uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) &numeric->thousands_sep_wc; iov[cnt].iov_len = sizeof (uint32_t); - assert (cnt + 1 == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)); + assert (cnt + 1 == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)); write_locale_data (output_path, "LC_NUMERIC", - 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC), iov); + 3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC), iov); } -- cgit v1.2.3