From f6aa05820e2c4dcd9d706bfb0bcace41b0eb821f Mon Sep 17 00:00:00 2001 From: roland Date: Sun, 26 May 1996 20:33:34 +0000 Subject: [PATCH] Sun May 26 15:15:08 1996 Roland McGrath * wctype/wctype.h (__need_wint_t): Define this and include stddef.h. [! _WINT_T] (wint_t): Conditionalize typedef on this in case pre-2.7.3 stddef.h doesn't define it. * wcsmbs/wchar.h: Likewise. * stdlib/strtod.c: Likewise. --- stdlib/strtod.c | 5 +++++ wcsmbs/wchar.h | 22 +++++++++++++--------- wctype/wctype.h | 11 ++++------- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/stdlib/strtod.c b/stdlib/strtod.c index 03a37bfb70..f32ffc6162 100644 --- a/stdlib/strtod.c +++ b/stdlib/strtod.c @@ -364,6 +364,11 @@ INTERNAL (STRTOF) (nptr, endptr, group) /* Contains the last character read. */ CHAR_TYPE c; +/* We should get wint_t from , but not all GCC versions define it + there. So define it ourselves if it remains undefined. */ +#ifndef _WINT_T + typedef unsigned int wint_t; +#endif /* The radix character of the current locale. */ wint_t decimal; /* The thousands character of the current locale. */ diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index b54170c3f3..cc821b8a50 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -34,6 +34,19 @@ __BEGIN_DECLS #define __need_NULL #include + +/* We try to get wint_t from , but not all GCC versions define it + there. So define it ourselves if it remains undefined. */ +#ifndef _WINT_T +/* Integral type unchanged by default argument promotions that can + hold any value corresponding to members of the extended character + set, as well as at least one value that does not correspond to any + member of the extended character set. */ +#define _WINT_T +typedef unsigned int wint_t; +#endif + + /* Conversion state information. */ typedef int mbstate_t; /* FIXME */ @@ -44,15 +57,6 @@ typedef int mbstate_t; /* FIXME */ # define WEOF (0xffffffffu) #endif -#ifndef _WINT_T -/* Integral type unchanged by default argument promotions that can - hold any value corresponding to members of the extended character - set, as well as at least one value that does not correspond to any - member of the extended character set. */ -#define _WINT_T 1 -typedef unsigned int wint_t; -#endif - /* Copy SRC to DEST. */ extern wchar_t *wcscpy __P ((wchar_t *__dest, __const wchar_t *__src)); diff --git a/wctype/wctype.h b/wctype/wctype.h index cabbc67b24..87451e5d83 100644 --- a/wctype/wctype.h +++ b/wctype/wctype.h @@ -29,21 +29,18 @@ Boston, MA 02111-1307, USA. */ __BEGIN_DECLS -/* FIXME: should this go into ??? */ -#if 0 +/* We try to get wint_t from , but not all GCC versions define it + there. So define it ourselves if it remains undefined. */ #define __need_wint_t #include -#else +#ifndef _WINT_T /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ -#ifndef __have_wint_t_defined -#define __have_wint_t_defined 1 -/* This is a hack!!! */ +#define _WINT_T typedef unsigned int wint_t; #endif -#endif /* Scalar type that can hold values which represent locale-specific character mappings. */ -- 2.11.0