diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-09-24 22:07:47 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-09-24 22:07:47 +0000 |
commit | 6055173a0f2733ea4fc2825afd295156143fca79 (patch) | |
tree | 11dac563ce23c6e0e95d2146dfaef2a1a7faa459 /locale/programs/ld-collate.c | |
parent | 39bf0bb44c07ab2cae5b813fc7c196abfdf411b3 (diff) | |
download | glibc-6055173a0f2733ea4fc2825afd295156143fca79.zip glibc-6055173a0f2733ea4fc2825afd295156143fca79.tar.gz glibc-6055173a0f2733ea4fc2825afd295156143fca79.tar.bz2 |
Add localedef --big-endian and --little-endian options.
Diffstat (limited to 'locale/programs/ld-collate.c')
-rw-r--r-- | locale/programs/ld-collate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index c4d7e3d..e610389 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -44,6 +44,7 @@ static inline void __attribute ((always_inline)) obstack_int32_grow (struct obstack *obstack, int32_t data) { + data = maybe_swap_uint32 (data); if (sizeof (int32_t) == sizeof (int)) obstack_int_grow (obstack, data); else @@ -54,6 +55,7 @@ static inline void __attribute ((always_inline)) obstack_int32_grow_fast (struct obstack *obstack, int32_t data) { + data = maybe_swap_uint32 (data); if (sizeof (int32_t) == sizeof (int)) obstack_int_grow_fast (obstack, data); else @@ -1955,6 +1957,7 @@ output_weightwc (struct obstack *pool, struct locale_collate_t *collate, obstack_int32_grow (pool, j); obstack_grow (pool, buf, j * sizeof (int32_t)); + maybe_swap_uint32_obstack (pool, j); } return retval | ((elem->section->ruleidx & 0x7f) << 24); @@ -2479,6 +2482,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, obstack_int32_grow (&extrapool, runp->nwcs); obstack_grow (&extrapool, runp->wcs, runp->nwcs * sizeof (uint32_t)); + maybe_swap_uint32_obstack (&extrapool, runp->nwcs); obstack_int32_grow (&extrapool, runp->wcseqorder); } |