On Fri, 2006-07-28 at 17:35 +0200, Bruno Haible wrote: > Yoann Vandoorselaere wrote: > > > Just for info: Which system is this which has a <wchar.h> and a <wctype.h> > > > header file but no iswcntrl function? The isw* functions are the main > > > contents of <wctype.h>. I don't expect a system to have <wctype.h> > > > but lack the functions. > > > > FreeBSD 4.x got the wctype.h header, however, the header start with #if > > 0 and end with #endif directive. :-) > > How insane! And it affects all releases from FreeBSD 4.4 to 4.11. [1] [2] > I'm committing the appended fix. (There's not only iswcntrl which needs > a substitute, but also all others, because of mb_isalpha..mb_isxdigit.)
Thanks, there are multiple "static" typo in your latest commit, please apply the attached patch. -- Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies Tel: +33 (0)8 70 70 21 58 Fax: +33(0)4 78 42 21 58 http://www.prelude-ids.com
Index: lib/mbchar.h =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/mbchar.h,v retrieving revision 1.5 diff -u -p -r1.5 mbchar.h --- lib/mbchar.h 28 Jul 2006 15:37:42 -0000 1.5 +++ lib/mbchar.h 28 Jul 2006 15:44:04 -0000 @@ -160,7 +160,7 @@ /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions. Assume all 12 functions are implemented the same way, or not at all. */ #if !defined iswalnum && !HAVE_ISWCNTRL -ststic inline int +static inline int iswalnum (wint_t wc) { return (wc >= 0 && wc < 128 @@ -170,7 +170,7 @@ iswalnum (wint_t wc) # define iswalnum iswalnum #endif #if !defined iswalpha && !HAVE_ISWCNTRL -ststic inline int +static inline int iswalpha (wint_t wc) { return (wc >= 0 && wc < 128 @@ -180,7 +180,7 @@ iswalpha (wint_t wc) # define iswalpha iswalpha #endif #if !defined iswblank && !HAVE_ISWCNTRL -ststic inline int +static inline int iswblank (wint_t wc) { return (wc >= 0 && wc < 128 @@ -190,7 +190,7 @@ iswblank (wint_t wc) # define iswblank iswblank #endif #if !defined iswcntrl && !HAVE_ISWCNTRL -ststic inline int +static inline int iswcntrl (wint_t wc) { return (wc >= 0 && wc < 128 @@ -200,7 +200,7 @@ iswcntrl (wint_t wc) # define iswcntrl iswcntrl #endif #if !defined iswdigit && !HAVE_ISWCNTRL -ststic inline int +static inline int iswdigit (wint_t wc) { return (wc >= '0' && wc <= '9'); @@ -208,7 +208,7 @@ iswdigit (wint_t wc) # define iswdigit iswdigit #endif #if !defined iswgraph && !HAVE_ISWCNTRL -ststic inline int +static inline int iswgraph (wint_t wc) { return (wc >= 0 && wc < 128 @@ -218,7 +218,7 @@ iswgraph (wint_t wc) # define iswgraph iswgraph #endif #if !defined iswlower && !HAVE_ISWCNTRL -ststic inline int +static inline int iswlower (wint_t wc) { return (wc >= 0 && wc < 128 @@ -228,7 +228,7 @@ iswlower (wint_t wc) # define iswlower iswlower #endif #if !defined iswprint && !HAVE_ISWCNTRL -ststic inline int +static inline int iswprint (wint_t wc) { return (wc >= 0 && wc < 128 @@ -238,7 +238,7 @@ iswprint (wint_t wc) # define iswprint iswprint #endif #if !defined iswpunct && !HAVE_ISWCNTRL -ststic inline int +static inline int iswpunct (wint_t wc) { return (wc >= 0 && wc < 128 @@ -250,7 +250,7 @@ iswpunct (wint_t wc) # define iswpunct iswpunct #endif #if !defined iswspace && !HAVE_ISWCNTRL -ststic inline int +static inline int iswspace (wint_t wc) { return (wc >= 0 && wc < 128 @@ -261,7 +261,7 @@ iswspace (wint_t wc) # define iswspace iswspace #endif #if !defined iswupper && !HAVE_ISWCNTRL -ststic inline int +static inline int iswupper (wint_t wc) { return (wc >= 0 && wc < 128 @@ -271,7 +271,7 @@ iswupper (wint_t wc) # define iswupper iswupper #endif #if !defined iswxdigit && !HAVE_ISWCNTRL -ststic inline int +static inline int iswxdigit (wint_t wc) { return (wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F');