* locale/programs/ld-monetary.c (monetary_output): Remove
	byte-order code.

	* locale/programs/ld-time.c (time_output): Correct expected number
	of iov entries.
This commit is contained in:
Ulrich Drepper 1999-09-20 05:22:07 +00:00
parent 3a4cbb4186
commit 90952c77b4
3 changed files with 11 additions and 22 deletions

View File

@ -1,5 +1,11 @@
1999-09-19 Ulrich Drepper <drepper@cygnus.com> 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-monetary.c (monetary_output): Remove
byte-order code.
* locale/programs/ld-time.c (time_output): Correct expected number
of iov entries.
* manual/filesys.texi (Testing File Access): Correct description of * manual/filesys.texi (Testing File Access): Correct description of
SUID. SUID.

View File

@ -82,7 +82,6 @@ struct locale_monetary_t
uint32_t duo_valid_from; uint32_t duo_valid_from;
uint32_t duo_valid_to; uint32_t duo_valid_to;
uint32_t conversion_rate[2]; uint32_t conversion_rate[2];
uint32_t conversion_rate_ob[2];
}; };
@ -324,9 +323,6 @@ not correspond to a valid name in ISO 4217"),
monetary->conversion_rate[0] = 1; monetary->conversion_rate[0] = 1;
monetary->conversion_rate[1] = 1; monetary->conversion_rate[1] = 1;
} }
monetary->conversion_rate_ob[0] = bswap_32 (monetary->conversion_rate[0]);
monetary->conversion_rate_ob[1] = bswap_32 (monetary->conversion_rate[1]);
} }
@ -556,21 +552,8 @@ monetary_output (struct localedef_t *locale, struct charmap_t *charmap,
iov[cnt].iov_len = 4; iov[cnt].iov_len = 4;
++cnt; ++cnt;
#if BYTE_ORDER == LITTLE_ENDIAN
# define conversion_rate_el conversion_rate
# define conversion_rate_eb conversion_rate_ob
#else
# define conversion_rate_el conversion_rate_ob
# define conversion_rate_eb conversion_rate
#endif
idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len;
iov[cnt].iov_base = (void *) &monetary->conversion_rate_el; iov[cnt].iov_base = (void *) monetary->conversion_rate;
iov[cnt].iov_len = 8;
++cnt;
idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len;
iov[cnt].iov_base = (void *) &monetary->conversion_rate_eb;
iov[cnt].iov_len = 8; iov[cnt].iov_len = 8;
++cnt; ++cnt;

View File

@ -491,8 +491,8 @@ time_output (struct localedef_t *locale, struct charmap_t *charmap,
struct locale_time_t *time = locale->categories[LC_TIME].time; struct locale_time_t *time = locale->categories[LC_TIME].time;
struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME) struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME)
+ time->num_era - 1 + time->num_era - 1
+ 3 * 99 + 2 * 99
+ 1 + (time->num_era * 10 - 1) * 2]; + 1 + time->num_era * 10 - 1];
struct locale_file data; struct locale_file data;
uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)]; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)];
size_t cnt, last_idx, num, n; size_t cnt, last_idx, num, n;
@ -839,8 +839,8 @@ time_output (struct localedef_t *locale, struct charmap_t *charmap,
assert (cnt == (_NL_ITEM_INDEX (_NL_NUM_LC_TIME) assert (cnt == (_NL_ITEM_INDEX (_NL_NUM_LC_TIME)
+ time->num_era - 1 + time->num_era - 1
+ 3 * 99 + 2 * 99
+ 1 + (time->num_era * 10 - 1) * 2)); + 1 + time->num_era * 10 - 1));
assert (last_idx == _NL_ITEM_INDEX (_NL_NUM_LC_TIME)); assert (last_idx == _NL_ITEM_INDEX (_NL_NUM_LC_TIME));
write_locale_data (output_path, "LC_TIME", 2 + cnt, iov); write_locale_data (output_path, "LC_TIME", 2 + cnt, iov);