From: Bruno Haible Date: Tue, 24 Oct 2006 20:19:49 +0000 (+0000) Subject: Fix compilation error on platforms without 'wint_t' type. X-Git-Tag: cvs-readonly~1658 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=85fc15b1bf5d976584d8f174682a0d677692f0ea;p=gnulib.git Fix compilation error on platforms without 'wint_t' type. --- diff --git a/ChangeLog b/ChangeLog index a2de46da7..cad4ec1cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-24 Bruno Haible + + * modules/wcwidth (Files): Add m4/wint_t.m4. + * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T. + * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined. + 2006-10-24 Paul Eggert * lib/getdate.y (yyerror): Make the arguments pointer-to-const, diff --git a/lib/wcwidth.h b/lib/wcwidth.h index 37b83cb82..83da8fb0f 100644 --- a/lib/wcwidth.h +++ b/lib/wcwidth.h @@ -37,7 +37,11 @@ # endif # if !defined iswprint && !HAVE_ISWPRINT static inline int +# if HAVE_WINT_T iswprint (wint_t wc) +# else +iswprint (int wc) +# endif { return (wc >= 0 && wc < 128 ? wc >= ' ' && wc <= '~' diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4 index 8cdfba436..e8a37f2e4 100644 --- a/m4/wcwidth.m4 +++ b/m4/wcwidth.m4 @@ -1,4 +1,4 @@ -# wcwidth.m4 serial 5 +# wcwidth.m4 serial 6 dnl Copyright (C) 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -11,6 +11,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH], AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_HEADERS_ONCE([wchar.h wctype.h]) AC_CHECK_FUNCS_ONCE([iswprint wcwidth]) diff --git a/modules/wcwidth b/modules/wcwidth index 74d4ef62d..d236a4866 100644 --- a/modules/wcwidth +++ b/modules/wcwidth @@ -5,6 +5,7 @@ Files: lib/wcwidth.h m4/wcwidth.m4 m4/wchar_t.m4 +m4/wint_t.m4 Depends-on: