aboutsummaryrefslogtreecommitdiff
path: root/locale/programs/ld-collate.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-30 00:00:23 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-30 00:00:23 +0000
commita9706118e04fc78b7910b5aff08993db709ad43d (patch)
treecfdc7748118f887bc965d4121bf488bf8095275b /locale/programs/ld-collate.c
parentfb032fbd8888df1391bfb3a43f1a39a7b64d7423 (diff)
downloadglibc-a9706118e04fc78b7910b5aff08993db709ad43d.zip
glibc-a9706118e04fc78b7910b5aff08993db709ad43d.tar.gz
glibc-a9706118e04fc78b7910b5aff08993db709ad43d.tar.bz2
Update.
2000-07-29 Ulrich Drepper <drepper@redhat.com> * locale/langinfo.h: Add entries for extra tables in CTYPE data. * locale/programs/ld-ctype.c: Adjust for this. * locale/programs/ld-collate.c: Add more alignment checks. * locale/string/strcoll.c: Likewise. 2000-07-30 Mark Kettenis <kettenis@gnu.org> * stdio-common/vfprintf.c: Move inclusion of _i18n_number.h outside USE_IN_LIBIO block.
Diffstat (limited to 'locale/programs/ld-collate.c')
-rw-r--r--locale/programs/ld-collate.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 125356d..95c4dd4 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -2300,14 +2300,16 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
more information here. */
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_HASH_SIZE));
iov[2 + cnt].iov_base = &collate->plane_size;
- iov[2 + cnt].iov_len = sizeof (collate->plane_size);
+ iov[2 + cnt].iov_len = sizeof (uint32_t);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
+ assert (idx[cnt] % 4 == 0);
++cnt;
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_HASH_LAYERS));
iov[2 + cnt].iov_base = &collate->plane_cnt;
iov[2 + cnt].iov_len = sizeof (collate->plane_cnt);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
+ assert (idx[cnt] % 4 == 0);
++cnt;
/* Construct a table with the names. The size of the table is the same
@@ -2324,6 +2326,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
iov[2 + cnt].iov_base = names;
iov[2 + cnt].iov_len = table_size * sizeof (uint32_t);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
+ assert (idx[cnt] % 4 == 0);
++cnt;
/* Since we are using the sign of an integer to mark indirection the
@@ -2511,6 +2514,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
iov[2 + cnt].iov_len = table_size * sizeof (uint32_t);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0);
+ assert (idx[cnt] % 4 == 0);
++cnt;
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_WEIGHTWC));
@@ -2518,6 +2522,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
iov[2 + cnt].iov_base = obstack_finish (&weightpool);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0);
+ assert (idx[cnt] % 4 == 0);
++cnt;
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_EXTRAWC));
@@ -2526,6 +2531,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0);
assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0);
+ assert (idx[cnt] % 4 == 0);
++cnt;
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_INDIRECTWC));
@@ -2533,6 +2539,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
iov[2 + cnt].iov_base = obstack_finish (&indirectpool);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
assert (iov[2 + cnt].iov_len % sizeof (int32_t) == 0);
+ assert (idx[cnt] % 4 == 0);
++cnt;
@@ -2633,12 +2640,14 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
iov[2 + cnt].iov_base = &elem_size;
iov[2 + cnt].iov_len = sizeof (int32_t);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
+ assert (idx[cnt] % 4 == 0);
++cnt;
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_TABLEMB));
iov[2 + cnt].iov_base = elem_table;
iov[2 + cnt].iov_len = elem_size * 2 * sizeof (int32_t);
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
+ assert (idx[cnt] % 4 == 0);
++cnt;
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_EXTRAMB));
@@ -2656,6 +2665,7 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_COLLSEQWC));
iov[2 + cnt].iov_base = collate->wcseqorder;
iov[2 + cnt].iov_len = table_size * sizeof (uint32_t);
+ assert (idx[cnt] % 4 == 0);
++cnt;
assert (cnt == _NL_ITEM_INDEX (_NL_NUM_LC_COLLATE));