Mercurial > hg > octave-shane > gnulib-hg
changeset 7560:046e511d4faf
Fix compilation error on platforms without 'wint_t' type.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 24 Oct 2006 20:19:49 +0000 |
parents | f469170486be |
children | f051df8a3688 |
files | ChangeLog lib/wcwidth.h m4/wcwidth.m4 modules/wcwidth |
diffstat | 4 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-24 Bruno Haible <bruno@clisp.org> + + * 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 <eggert@cs.ucla.edu> * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
--- 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 <= '~'
--- 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_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])