[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wcwidth.h requires wint_t type
From: |
Bruno Haible |
Subject: |
wcwidth.h requires wint_t type |
Date: |
Tue, 24 Oct 2006 22:19:48 +0200 |
User-agent: |
KMail/1.9.1 |
Hi,
On MacOS X 10.2 (Darwin 6.x), wcwidth.h gives a compilation error, because
wint_t is not defined. All other uses of wint_t in gnulib are protected by
HAVE_WCHAR_H or HAVE_WINT_T, only this one is missing the check. I'm applying
this:
2006-10-24 Bruno Haible <address@hidden>
* 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.
diff -c -3 -r1.3 wcwidth
*** modules/wcwidth 29 Jun 2006 11:50:52 -0000 1.3
--- modules/wcwidth 24 Oct 2006 20:16:24 -0000
***************
*** 5,10 ****
--- 5,11 ----
lib/wcwidth.h
m4/wcwidth.m4
m4/wchar_t.m4
+ m4/wint_t.m4
Depends-on:
diff -c -3 -r1.5 wcwidth.m4
*** m4/wcwidth.m4 11 Aug 2006 13:09:44 -0000 1.5
--- m4/wcwidth.m4 24 Oct 2006 20:16:24 -0000
***************
*** 1,4 ****
! # wcwidth.m4 serial 5
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,
--- 1,4 ----
! # 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,16 ****
--- 11,17 ----
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 -c -3 -r1.5 wcwidth.h
*** lib/wcwidth.h 28 Jul 2006 17:32:33 -0000 1.5
--- lib/wcwidth.h 24 Oct 2006 20:16:24 -0000
***************
*** 37,43 ****
--- 37,47 ----
# 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 <= '~'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- wcwidth.h requires wint_t type,
Bruno Haible <=