X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Fwctype.in.h;h=a7c07d1e86bd7f8e233adf542d8cda8d53bad942;hb=d57728a6ca2413a7c564d8b7bb13d9e5a5a180f3;hp=aa018b17db2d020cb9dab77220ffb46239c0f899;hpb=dc84183747ce1703eb99685b5dbde1f65a143c06;p=debian%2Fgzip diff --git a/lib/wctype.in.h b/lib/wctype.in.h index aa018b1..a7c07d1 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2012 Free Software Foundation, Inc. + Copyright (C) 2006-2013 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 @@ -44,6 +44,13 @@ # include #endif +/* mingw has declarations of towupper and towlower in as + well . Include in advance to avoid rpl_ prefix + being added to the declarations. */ +#ifdef __MINGW32__ +# include +#endif + /* Include the original if it exists. BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ @@ -54,6 +61,11 @@ #ifndef _@GUARD_PREFIX@_WCTYPE_H #define _@GUARD_PREFIX@_WCTYPE_H +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_WCTYPE_INLINE +# define _GL_WCTYPE_INLINE _GL_INLINE +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ @@ -148,7 +160,7 @@ typedef unsigned int rpl_wint_t; # endif # endif -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswalnum # else @@ -160,7 +172,7 @@ iswalnum || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswalpha # else @@ -171,7 +183,7 @@ iswalpha return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswblank # else @@ -182,7 +194,7 @@ iswblank return wc == ' ' || wc == '\t'; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswcntrl # else @@ -193,7 +205,7 @@ iswcntrl return (wc & ~0x1f) == 0 || wc == 0x7f; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswdigit # else @@ -204,7 +216,7 @@ iswdigit return wc >= '0' && wc <= '9'; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswgraph # else @@ -215,7 +227,7 @@ iswgraph return wc >= '!' && wc <= '~'; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswlower # else @@ -226,7 +238,7 @@ iswlower return wc >= 'a' && wc <= 'z'; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswprint # else @@ -237,7 +249,7 @@ iswprint return wc >= ' ' && wc <= '~'; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswpunct # else @@ -250,7 +262,7 @@ iswpunct || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswspace # else @@ -262,7 +274,7 @@ iswspace || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswupper # else @@ -273,7 +285,7 @@ iswupper return wc >= 'A' && wc <= 'Z'; } -static inline int +_GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswxdigit # else @@ -285,7 +297,7 @@ iswxdigit || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); } -static inline wint_t +_GL_WCTYPE_INLINE wint_t # if @REPLACE_TOWLOWER@ rpl_towlower # else @@ -296,7 +308,7 @@ towlower return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); } -static inline wint_t +_GL_WCTYPE_INLINE wint_t # if @REPLACE_TOWLOWER@ rpl_towupper # else @@ -336,7 +348,7 @@ _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); result register. We need to fix this by adding a zero-extend from wchar_t to wint_t after the call. */ -static inline wint_t +_GL_WCTYPE_INLINE wint_t rpl_towlower (wint_t wc) { return (wint_t) (wchar_t) towlower (wc); @@ -345,7 +357,7 @@ rpl_towlower (wint_t wc) # define towlower rpl_towlower # endif -static inline wint_t +_GL_WCTYPE_INLINE wint_t rpl_towupper (wint_t wc) { return (wint_t) (wchar_t) towupper (wc); @@ -493,6 +505,7 @@ _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " # endif #endif +_GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_WCTYPE_H */ #endif /* _@GUARD_PREFIX@_WCTYPE_H */