aboutsummaryrefslogtreecommitdiff
path: root/locale/programs/ld-time.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-12 20:19:55 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-12 20:19:55 +0000
commit9a5c46e834fa303274983d7c4a4e4b667d0415c1 (patch)
treeb55f92394b60b2b0904eca85e9771d30ea0120a0 /locale/programs/ld-time.c
parentcd8e60cead61e56e310e2c14f31052f7649ea533 (diff)
downloadglibc-9a5c46e834fa303274983d7c4a4e4b667d0415c1.tar
glibc-9a5c46e834fa303274983d7c4a4e4b667d0415c1.tar.gz
glibc-9a5c46e834fa303274983d7c4a4e4b667d0415c1.tar.bz2
glibc-9a5c46e834fa303274983d7c4a4e4b667d0415c1.zip
[BZ #3013]
* locale/programs/ld-ctype.c (ctype_output): Adjust alignments, fix lenght of one output field, correct bitmask creation. * locale/programs/ld-time.c: Add alignment.
Diffstat (limited to 'locale/programs/ld-time.c')
-rw-r--r--locale/programs/ld-time.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index 4f1dcb0ce7..bf5151858a 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -542,7 +542,7 @@ time_output (struct localedef_t *locale, const struct charmap_t *charmap,
* (2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME)
+ time->num_era - 1
+ 2 * 99
- + 2 + time->num_era * 10 - 1));
+ + 2 + time->num_era * 10));
struct locale_file data;
uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)];
size_t cnt, last_idx, num, n;
@@ -901,6 +901,12 @@ time_output (struct localedef_t *locale, const struct charmap_t *charmap,
++cnt;
++last_idx;
+ /* We must align the following data. */
+ iov[2 + cnt].iov_base = (void *) "\0\0";
+ iov[2 + cnt].iov_len = -idx[last_idx] & 3;
+ idx[last_idx] += -idx[last_idx] & 3;
+ ++cnt;
+
iov[2 + cnt].iov_base = (void *) time->wdate_fmt;
iov[2 + cnt].iov_len = ((wcslen (iov[2 + cnt].iov_base) + 1)
* sizeof (uint32_t));
@@ -916,7 +922,7 @@ time_output (struct localedef_t *locale, const struct charmap_t *charmap,
assert (cnt == (_NL_ITEM_INDEX (_NL_NUM_LC_TIME)
+ time->num_era - 1
+ 2 * 99
- + 2 + time->num_era * 10 - 1));
+ + 2 + time->num_era * 10));
assert (last_idx == _NL_ITEM_INDEX (_NL_NUM_LC_TIME));
write_locale_data (output_path, LC_TIME, "LC_TIME", 2 + cnt, iov);