summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-12-09 23:42:46 +0000
committerUlrich Drepper <drepper@redhat.com>1997-12-09 23:42:46 +0000
commit028e4ac4ac283afea6434576e9cb0760122a7fee (patch)
tree7c9e668f1f92ec91caebfc5e39487140655b29dc
parente5173587a64691469a5a8100a672d18cd11e1028 (diff)
locale/programs/ld-ctype.c: Write 32bit char classes in correct byte
order.
-rw-r--r--locale/programs/ld-ctype.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index f1067eee84..707476469b 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -56,6 +56,9 @@ void *xrealloc (void *__ptr, size_t __n);
#define SWAPU16(w) \
((((w) >> 8) & 0xff) | (((w) & 0xff) << 8))
+#define XSWAPU32(w) \
+ ((((w) & 0xff00ff00) >> 8) | (((w) & 0xff00ff) << 8))
+
/* To be compatible with former implementations we for now restrict
the number of bits for character classes to 16. When compatibility
@@ -63,7 +66,7 @@ void *xrealloc (void *__ptr, size_t __n);
#define char_class_t u_int16_t
#define CHAR_CLASS_TRANS SWAPU16
#define char_class32_t u_int32_t
-#define CHAR_CLASS32_TRANS SWAPU32
+#define CHAR_CLASS32_TRANS XSWAPU32
/* The real definition of the struct for the LC_CTYPE locale. */