aboutsummaryrefslogtreecommitdiff
path: root/locale/programs/ld-address.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-21 03:43:31 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-21 03:43:31 +0000
commita0edd63e7c41336220353a6055662f38f5429a50 (patch)
treeaba5d9cb1144e26c93d610a7ae7a5d4569416a6f /locale/programs/ld-address.c
parentdfcaa6429a6cecc15ed49b5a92474c1f54f693c4 (diff)
downloadglibc-a0edd63e7c41336220353a6055662f38f5429a50.tar
glibc-a0edd63e7c41336220353a6055662f38f5429a50.tar.gz
glibc-a0edd63e7c41336220353a6055662f38f5429a50.tar.bz2
glibc-a0edd63e7c41336220353a6055662f38f5429a50.zip
Update.
2000-04-19 Jakub Jelinek <jakub@redhat.com> * 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 <hjl@gnu.org> * csu/gmon-start.c (_start): Declared as "extern void". (etext): Likewise. 2000-04-18 Andreas Jaeger <aj@suse.de> * manual/install.texi (Running make install): Don't mention utmpd anymore. 2000-04-18 Andreas Jaeger <aj@suse.de> * 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.
Diffstat (limited to 'locale/programs/ld-address.c')
-rw-r--r--locale/programs/ld-address.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c
index 3b743638a8..da801d09d4 100644
--- a/locale/programs/ld-address.c
+++ b/locale/programs/ld-address.c
@@ -328,7 +328,7 @@ address_output (struct localedef_t *locale, struct charmap_t *charmap,
const char *output_path)
{
struct locale_address_t *address = locale->categories[LC_ADDRESS].address;
- struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)];
+ struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)];
struct locale_file data;
uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)];
size_t cnt = 0;
@@ -374,39 +374,46 @@ address_output (struct localedef_t *locale, struct charmap_t *charmap,
++cnt;
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 *) &address->country_num;
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 *) address->country_isbn;
iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1;
++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 *) address->lang_name;
iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1;
++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 *) address->lang_ab;
iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1;
++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 *) address->lang_term;
iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1;
++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 *) address->lang_lib;
iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1;
++cnt;
- assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS));
+ assert (cnt == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS));
write_locale_data (output_path, "LC_ADDRESS",
- 2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS), iov);
+ 3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS), iov);
}