about summary refs log tree commit diff
path: root/wctype/wctype.h
diff options
context:
space:
mode:
Diffstat (limited to 'wctype/wctype.h')
-rw-r--r--wctype/wctype.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/wctype/wctype.h b/wctype/wctype.h
index 68f3853c94..378095bcb4 100644
--- a/wctype/wctype.h
+++ b/wctype/wctype.h
@@ -70,7 +70,10 @@ typedef unsigned long int wctype_t;
 #   define _ISwbit(bit)	(1 << (bit))
 #  else /* __BYTE_ORDER == __LITTLE_ENDIAN */
 #   define _ISwbit(bit)	\
-	((bit) < 8 ? (int) (1UL << (bit) << 24) : (int) (1UL << ((bit) + 8)))
+	((bit) < 8 ? (int) (1UL << ((bit) + 24))			      \
+	 : ((bit) < 16 ? (int) (1UL << ((bit) + 8))			      \
+	    : ((bit) < 24 ? (int) (1UL << ((bit) - 8 ))			      \
+	       : (int) (1UL << ((bit) - 24 )))))
 #  endif
 
 enum