Browse Source

Patch from Aidan Van Dyk to make _toupper and _tolower
work properly, reverting my wrong reading of SuSv3

Eric Andersen 21 years ago
parent
commit
7a7b103e9c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      include/ctype.h

+ 2 - 2
include/ctype.h

@@ -72,8 +72,8 @@ extern int isxupper(int c) __THROW;	/* uClibc-specific. */
 
 #define __isascii(c) (((c) & ~0x7f) == 0)
 #define __toascii(c) ((c) & 0x7f)
-#define _tolower(c)  (isupper(c) ? tolower(c) : (c))
-#define _toupper(c)  (islower(c) ? toupper(c) : (c))
+#define _toupper(c) ((c) ^ 0x20)
+#define _tolower(c) ((c) | 0x20)
 
 
 /* For compatibility with older versions of uClibc.  Are these ever used? */