From efb17ec15925db925088e801920a3df17b11ac49 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 28 Apr 2023 01:12:16 +0200 Subject: localeconv: Work around a mingw bug. * m4/localeconv.m4 (gl_FUNC_LOCALECONV): Test whether fields of type 'char' are filled correctly. (gl_PREREQ_LOCALECONV): Test whether 'struct lconv' has the int_{p,n}_* members. * lib/localeconv.c (FIX_CHAR_VALUE): New macro. (localeconv): Replace negative field values with CHAR_MAX. * doc/posix-functions/localeconv.texi: Mention the mingw bug. --- doc/posix-functions/localeconv.texi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/posix-functions/localeconv.texi b/doc/posix-functions/localeconv.texi index 22a19ca3d3..ebcc5a5b29 100644 --- a/doc/posix-functions/localeconv.texi +++ b/doc/posix-functions/localeconv.texi @@ -17,6 +17,10 @@ The @code{struct lconv} type does not contain the members @code{int_n_cs_precedes}, @code{int_n_sign_posn}, @code{int_n_sep_by_space} on some platforms: glibc, OpenBSD 4.9, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 1.5.x, mingw, MSVC 14. +@item +The values of fields of @code{struct lconv} of type @code{char} are -1 instead +of CHAR_MAX on some platforms: +mingw. @end itemize Portability problems not fixed by Gnulib: -- cgit v1.2.1