This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] wcsmbs: Avoid escaped character literals in <wchar.h>
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 17 Feb 2020 11:57:05 +0100
- Subject: [PATCH] wcsmbs: Avoid escaped character literals in <wchar.h>
They confuse scripts/conformtest.py because it treats the L and the
x7f as namespace-violating identifiers.
These failures are only visibile if the conform tests are run in such
a way that __USE_EXTERN_INLINES is defined.
-----
wcsmbs/wchar.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 5e0d65b14e..3e88be1f16 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -316,13 +316,13 @@ extern size_t mbrlen (const char *__restrict __s, size_t __n,
extern wint_t __btowc_alias (int __c) __asm ("btowc");
__extern_inline wint_t
__NTH (btowc (int __c))
-{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f'
+{ return (__builtin_constant_p (__c) && __c >= 0 && __c <= 0x7f
? (wint_t) __c : __btowc_alias (__c)); }
extern int __wctob_alias (wint_t __c) __asm ("wctob");
__extern_inline int
__NTH (wctob (wint_t __wc))
-{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'
+{ return (__builtin_constant_p (__wc) && __wc >= 0 && __wc <= 0x7f
? (int) __wc : __wctob_alias (__wc)); }
__extern_inline size_t