diff options
author | Bruno Haible <bruno@clisp.org> | 2023-04-19 02:14:09 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-04-19 02:39:36 +0200 |
commit | 4b440d3568b01dd9acd5242bea8b63fc43428f5a (patch) | |
tree | 58e1ba3d97e79f2e21b73badab54a3b5b6d277d5 /modules/wcscmp | |
parent | 7634eee7a8da4a2f5eb9522ec01d24b8ad105df7 (diff) | |
download | gnulib-4b440d3568b01dd9acd5242bea8b63fc43428f5a.tar.gz |
wcscmp: Work around two ISO C compliance bugs on several platforms.
* lib/wchar.in.h (wcscmp): Consider REPLACE_WCSCMP.
* lib/wcscmp-impl.h (wcscmp): Don't assume that the two wide characters
are in the range 0..INT_MAX.
* m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test whether wcscmp works for all wide
characters. Set REPLACE_WCSCMP.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSCMP.
* modules/wchar (Makefile.am): Substitute REPLACE_WCSCMP.
* modules/wcscmp (Status, Notice): Un-obsolete this module.
(configure.ac): Consider REPLACE_WCSCMP.
* doc/posix-functions/wcscmp.texi: Mention the two bugs.
Diffstat (limited to 'modules/wcscmp')
-rw-r--r-- | modules/wcscmp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modules/wcscmp b/modules/wcscmp index 1b4fde704a..6df70f0543 100644 --- a/modules/wcscmp +++ b/modules/wcscmp @@ -1,12 +1,6 @@ Description: wcscmp() function: compare two wide strings. -Status: -obsolete - -Notice: -This module is obsolete. - Files: lib/wcscmp.c lib/wcscmp-impl.h @@ -17,7 +11,8 @@ wchar configure.ac: gl_FUNC_WCSCMP -gl_CONDITIONAL([GL_COND_OBJ_WCSCMP], [test $HAVE_WCSCMP = 0]) +gl_CONDITIONAL([GL_COND_OBJ_WCSCMP], + [test $HAVE_WCSCMP = 0 || test $REPLACE_WCSCMP = 1]) gl_WCHAR_MODULE_INDICATOR([wcscmp]) Makefile.am: |