diff options
author | 2005-08-08 05:52:59 +0000 | |
---|---|---|
committer | 2005-08-08 05:52:59 +0000 | |
commit | 89b0597ffb10e0d16bfa3de8b972a4541f2a0524 (patch) | |
tree | b2ef61505e738436223b16efce585092f08c86af /lib/libc/string | |
parent | lots of cleanup, print lots of information based on new linkages between (diff) | |
download | wireguard-openbsd-89b0597ffb10e0d16bfa3de8b972a4541f2a0524.tar.xz wireguard-openbsd-89b0597ffb10e0d16bfa3de8b972a4541f2a0524.zip |
activate LC_CTYPE for 8 bits locale.
Make sure tolower/toupper use the whole 8 bits.
okay deraadt@
thanks to everyone who tested
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/wcscmp.c | 6 | ||||
-rw-r--r-- | lib/libc/string/wcsncmp.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wmemcmp.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/libc/string/wcscmp.c b/lib/libc/string/wcscmp.c index d8a9aa73fb1..ebbb87ca4d7 100644 --- a/lib/libc/string/wcscmp.c +++ b/lib/libc/string/wcscmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcscmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ +/* $OpenBSD: wcscmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $ */ /* $NetBSD: wcscmp.c,v 1.5 2003/08/07 16:43:54 agc Exp $ */ /*- @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcscmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; +static char *rcsid = "$OpenBSD: wcscmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> @@ -51,5 +51,5 @@ wcscmp(const wchar_t *s1, const wchar_t *s2) if (*s1++ == 0) return (0); /* XXX assumes wchar_t = int */ - return (*(const __nbrune_t *)s1 - *(const __nbrune_t *)--s2); + return (*(const rune_t *)s1 - *(const rune_t *)--s2); } diff --git a/lib/libc/string/wcsncmp.c b/lib/libc/string/wcsncmp.c index aaa96b97a6c..30d37f66579 100644 --- a/lib/libc/string/wcsncmp.c +++ b/lib/libc/string/wcsncmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsncmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ +/* $OpenBSD: wcsncmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $ */ /* $NetBSD: wcsncmp.c,v 1.5 2003/08/07 16:43:54 agc Exp $ */ /* @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcsncmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; +static char *rcsid = "$OpenBSD: wcsncmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> @@ -46,8 +46,8 @@ wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n) do { if (*s1 != *s2++) { /* XXX assumes wchar_t = int */ - return (*(const __nbrune_t *)s1 - - *(const __nbrune_t *)--s2); + return (*(const rune_t *)s1 - + *(const rune_t *)--s2); } if (*s1++ == 0) break; diff --git a/lib/libc/string/wmemcmp.c b/lib/libc/string/wmemcmp.c index fc021c11d12..e35c6207ff6 100644 --- a/lib/libc/string/wmemcmp.c +++ b/lib/libc/string/wmemcmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wmemcmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ +/* $OpenBSD: wmemcmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $ */ /* $NetBSD: wmemcmp.c,v 1.3 2003/04/06 18:33:23 tshiozak Exp $ */ /*- @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wmemcmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; +static char *rcsid = "$OpenBSD: wmemcmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> @@ -44,8 +44,8 @@ wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n) for (i = 0; i < n; i++) { if (*s1 != *s2) { /* wchar might be unsigned */ - return *(const __nbrune_t *)s1 > - *(const __nbrune_t *)s2 ? 1 : -1; + return *(const rune_t *)s1 > + *(const rune_t *)s2 ? 1 : -1; } s1++; s2++; |