]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Return value with expected byte order.
authorUlrich Drepper <drepper@redhat.com>
Tue, 9 Dec 1997 23:59:57 +0000 (23:59 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 9 Dec 1997 23:59:57 +0000 (23:59 +0000)
wctype/wctype.c

index c3bb1d9c6a66dffa92a3b7091b4241dd7b1d1398..2116a6350507b2b60db26c1298523738d80ffbb9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
 
@@ -42,9 +42,9 @@ wctype (const char *property)
 #if __BYTE_ORDER == __BIG_ENDIAN
   return result;
 #else
-# define SWAPU32(w) \
-  (((w) << 24) | (((w) & 0xff00) << 8) | (((w) >> 8) & 0xff00) | ((w) >> 24))
+#define XSWAPU32(w) \
+  ((((w) & 0xff00ff00) >> 8) | (((w) & 0xff00ff) << 8))
 
-  return SWAPU32 (result);
+  return XSWAPU32 (result);
 #endif
 }