Reported by مصعب الزعبي (Mosab Al-Zoubi) <moceap@hotmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00029.html>.
* m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test against a glibc/arm* bug.
* doc/posix-functions/wcscmp.texi: Mention the glibc/arm* bug.
+2023-07-06 Bruno Haible <bruno@clisp.org>
+
+ wcscmp: Work around a glibc bug.
+ Reported by مصعب الزعبي (Mosab Al-Zoubi) <moceap@hotmail.com> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00029.html>.
+ * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test against a glibc/arm* bug.
+ * doc/posix-functions/wcscmp.texi: Mention the glibc/arm* bug.
+
2023-07-01 Paul Eggert <eggert@cs.ucla.edu>
maint.mk: Modernize stddef.h checks for C23
@item
This function may return a wrong result if the two arguments are of different
length, on some platforms:
+@c https://sourceware.org/bugzilla/show_bug.cgi?id=30620
+glibc 2.37 on arm and arm64 CPUs,
AIX 7.2 in 64-bit mode.
@end itemize
-# wcscmp.m4 serial 3
+# wcscmp.m4 serial 4
dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
int cmp = wcscmp (c, d);
if (!((wchar_t)-1 < 0 ? cmp > 0 : cmp < 0))
result |= 2;
+ /* This test fails on glibc 2.37 on arm and arm64 CPUs. */
+ cmp = wcscmp (d, c);
+ if (!((wchar_t)-1 < 0 ? cmp < 0 : cmp > 0))
+ result |= 4;
}
return result;
}