diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-10-03 21:51:32 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-10-03 21:51:32 +0000 |
commit | 975569d0d953fb8940d23af83ce9f9765b2b07ae (patch) | |
tree | 51ada8cd6216f789ed6775eeedb5d0c2a72af202 /locale/localeinfo.h | |
parent | bc543b02c78ead13ea558a00b51f83079cbabda9 (diff) | |
download | glibc-975569d0d953fb8940d23af83ce9f9765b2b07ae.tar.gz glibc-975569d0d953fb8940d23af83ce9f9765b2b07ae.tar.xz glibc-975569d0d953fb8940d23af83ce9f9765b2b07ae.zip |
Remove locale file dependence on int32_t alignment.
Diffstat (limited to 'locale/localeinfo.h')
-rw-r--r-- | locale/localeinfo.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/locale/localeinfo.h b/locale/localeinfo.h index 3142726605..8d2c1665c2 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h @@ -87,6 +87,16 @@ struct __locale_data values __flexarr; /* Items, usually pointers into `filedata'. */ }; +/* This alignment is used for 32-bit integers in locale files, both + those that are explicitly int32_t or uint32_t and those that are + wchar_t, regardless of the (possibly smaller) alignment required + for such integers on a particular host. */ +#define LOCFILE_ALIGN sizeof (int32_t) +#define LOCFILE_ALIGN_MASK (LOCFILE_ALIGN - 1) +#define LOCFILE_ALIGN_UP(x) (((x) + LOCFILE_ALIGN - 1) \ + & ~LOCFILE_ALIGN_MASK) +#define LOCFILE_ALIGNED_P(x) (((x) & LOCFILE_ALIGN_MASK) == 0) + /* We know three kinds of collation sorting rules. */ enum coll_sort_rule { |