From 7b503bcc1373670a4456ba8f4a5ccfce712347d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jul 2007 19:02:07 +0000 Subject: * iconv/gconv_int.h (__GCONV_NULCONV): New internal only error code. * iconv/gconv_cache.c (__gconv_lookup_cache): Return __GCONV_NULCONV if from and to charsets are the same. * iconv/gconv_db.c (__gconv_find_transform): Likewise. * intl/dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open returns __GCONV_NOCONV, but not for __GCONV_NULCONV. 2007-07-17 Jakub Jelinek * wcsmbs/wchar.h: Only define wint_t if __need_wint_t. Don't define wint_t when __need_mbstate_t unless it is necessary. (__mbstate_t): Use __WINT_TYPE__ rather than wint_t in the typedef if possible. * wctype/wctype.h (wint_t): Define by including wchar.h with __need_wint_t instead of including stddef.h with __need_wint_t and as fallback definining it ourselves. * iconv/gconv.h (__need_wint_t): Define before including wchar.h. * sysdeps/gnu/_G_config.h: Don't include gconv.h if not _LIBC or _GLIBCPP_USE_WCHAR_T. (__need_wchar_t): Don't define if not _LIBC or _GLIBCPP_USE_WCHAR_T. (__need_wint_t): Don't define before including stddef.h, define before including wchar.h only if _LIBC or _GLIBCPP_USE_WCHAR_T. (_G_iconv_t): Don't define if not _LIBC or _GLIBCPP_USE_WCHAR_T. * sysdeps/mach/hurd/_G_config.h: Likewise. * sysdeps/generic/_G_config.h: Likewise. * libio/libio.h (__wunderflow, __wuflow, __woverflow): Only prototype if _LIBC or _GLIBCPP_USE_WCHAR_T. (_IO_getwc_unlocked, _IO_putwc_unlocked): Only define if _LIBC or _GLIBCPP_USE_WCHAR_T. --- sysdeps/gnu/_G_config.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'sysdeps/gnu/_G_config.h') diff --git a/sysdeps/gnu/_G_config.h b/sysdeps/gnu/_G_config.h index 83c78f0b93..211d0224b1 100644 --- a/sysdeps/gnu/_G_config.h +++ b/sysdeps/gnu/_G_config.h @@ -8,19 +8,15 @@ #include #define __need_size_t -#define __need_wchar_t -#define __need_wint_t +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# define __need_wchar_t +#endif #define __need_NULL #include -#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 #define __need_mbstate_t +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# define __need_wint_t +#endif #include #define _G_size_t size_t typedef struct @@ -41,7 +37,8 @@ typedef struct #define _G_wchar_t wchar_t #define _G_wint_t wint_t #define _G_stat64 stat64 -#include +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# include typedef union { struct __gconv_info __cd; @@ -51,6 +48,7 @@ typedef union struct __gconv_step_data __data; } __combined; } _G_iconv_t; +#endif typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); -- cgit 1.4.1