diff options
Diffstat (limited to 'lib/wctype.in.h')
-rw-r--r-- | lib/wctype.in.h | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/lib/wctype.in.h b/lib/wctype.in.h index 983336e..be7c14c 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -1,8 +1,6 @@ -/* -*- buffer-read-only: t -*- vi: set ro: */ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 <wctype.h>, for platforms that lack it. - Copyright (C) 2006-2012 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,13 +25,25 @@ * wctrans_t, and wctype_t are not yet implemented. */ -#ifndef _@GUARD_PREFIX@_WCTYPE_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ +#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__) + +/* Special invocation convention: + - With MinGW 3.22, when <ctype.h> includes <wctype.h>, only some part of + <wctype.h> is being processed, which doesn't include the idempotency + guard. */ + +#@INCLUDE_NEXT@ @NEXT_WCTYPE_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_WCTYPE_H + #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before @@ -46,6 +56,13 @@ # include <wchar.h> #endif +/* mingw has declarations of towupper and towlower in <ctype.h> as + well <wctype.h>. Include <ctype.h> in advance to avoid rpl_ prefix + being added to the declarations. */ +#ifdef __MINGW32__ +# include <ctype.h> +#endif + /* Include the original <wctype.h> if it exists. BeOS 5 has the functions but no <wctype.h>. */ /* The include_next requires a split double-inclusion guard. */ @@ -56,6 +73,9 @@ #ifndef _@GUARD_PREFIX@_WCTYPE_H #define _@GUARD_PREFIX@_WCTYPE_H +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_WCTYPE_INLINE # define _GL_WCTYPE_INLINE _GL_INLINE @@ -85,10 +105,10 @@ _GL_INLINE_HEADER_BEGIN # define WEOF -1 # endif #else -/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>. +/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h>. This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be "unchanged by default argument promotions". Override it. */ -# if defined _MSC_VER +# if @GNULIB_OVERRIDES_WINT_T@ # if !GNULIB_defined_wint_t # include <crtdefs.h> typedef unsigned int rpl_wint_t; @@ -504,3 +524,4 @@ _GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_WCTYPE_H */ #endif /* _@GUARD_PREFIX@_WCTYPE_H */ +#endif |