# HG changeset patch # User Eric Blake # Date 1230566998 25200 # Node ID 6183b030f3758c2aed4b1b53e7adb785e89d240e # Parent ed4dd79550d7b68d299fe97a6e11089faebb07cc wchar.h: supply WEOF on Irix 5.3 * lib/wchar.in.h (wint_t): Also supply WEOF. * lib/wctype.in.h (wint_t): Likewise. * doc/posix-headers/wchar.texi (wchar.h): Document the bug. * doc/posix-headers/wctype.texi (wctype.h): Likewise. Reported by Tom G. Christensen. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-12-29 Eric Blake + + wchar.h: supply WEOF on Irix 5.3 + * lib/wchar.in.h (wint_t): Also supply WEOF. + * lib/wctype.in.h (wint_t): Likewise. + * doc/posix-headers/wchar.texi (wchar.h): Document the bug. + * doc/posix-headers/wctype.texi (wctype.h): Likewise. + Reported by Tom G. Christensen. + 2008-12-26 Bruno Haible * m4/multiarch.m4 (gl_MULTIARCH): Recognize also the architecture names @@ -148,9 +157,9 @@ * doc/glibc-functions/wmempcpy.texi: Likewise. 2008-12-22 Ingo Weinhold (tiny change) - Eric Blake - Paolo Bonzini - Bruno Haible + Eric Blake + Paolo Bonzini + Bruno Haible Make c-stack work on Haiku. * lib/c-stack.c (SA_ONSTACK): Define fallback. diff --git a/doc/posix-headers/wchar.texi b/doc/posix-headers/wchar.texi --- a/doc/posix-headers/wchar.texi +++ b/doc/posix-headers/wchar.texi @@ -14,7 +14,7 @@ This header file is not self-contained on some platforms: OSF/1 with Desktop Toolkit C, BSD/OS 4.0.1. @item -The type @code{wint_t} is missing on some platforms: +The type @code{wint_t} and macro @code{WEOF} are missing on some platforms: IRIX 5.3. @end itemize diff --git a/doc/posix-headers/wctype.texi b/doc/posix-headers/wctype.texi --- a/doc/posix-headers/wctype.texi +++ b/doc/posix-headers/wctype.texi @@ -14,7 +14,7 @@ This header file is not self-contained on some platforms: Solaris 2.5, OSF/1 with Desktop Toolkit C, BSD/OS 4.0.1. @item -The type @code{wint_t} is missing on some platforms: +The type @code{wint_t} and macro @code{WEOF} are missing on some platforms: IRIX 5.3. @item The functions @code{isw*} are missing on some platforms: diff --git a/lib/wchar.in.h b/lib/wchar.in.h --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -68,6 +68,9 @@ /* Define wint_t. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif #endif diff --git a/lib/wctype.in.h b/lib/wctype.in.h --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -57,6 +57,9 @@ /* Define wint_t. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif #endif /* FreeBSD 4.4 to 4.11 has but lacks the functions.