From: Hauke Fath Date: Sun, 4 Apr 2010 23:33:24 +0000 (+0200) Subject: wchar: Port to NetBSD 1.5. X-Git-Tag: v0.1~4335 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=a2c5c0940ec9098277c788906e26d3afe6cf7f51;p=gnulib.git wchar: Port to NetBSD 1.5. --- diff --git a/ChangeLog b/ChangeLog index d62f2daed..d2d2721b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ 2010-04-04 Hauke Fath (tiny change) Bruno Haible + wchar: Port to NetBSD 1.5. + * lib/wchar.in.h (WEOF): Provide fallback also when wint_t exists. + * lib/wctype.in.h (WEOF): Likewise. + +2010-04-04 Hauke Fath (tiny change) + Bruno Haible + Port extended stdio to NetBSD 1.5. * lib/stdio-impl.h [NetBSD]: Include . (struct __sfileext, fp_ub): Define the "old way" for NetBSD 1.5Z and diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 3f96a8548..fb4f1058d 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -82,12 +82,16 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Define wint_t. (Also done in wctype.in.h.) */ +/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif +#else +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif #endif diff --git a/lib/wctype.in.h b/lib/wctype.in.h index 801620306..678247810 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -58,12 +58,16 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Define wint_t. (Also done in wchar.in.h.) */ +/* Define wint_t and WEOF. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif +#else +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif #endif