]> sjero.net Git - wget/blobdiff - lib/wctype.in.h
Gnulib updates.
[wget] / lib / wctype.in.h
index 1bb5228c7ff86db52552d82df35fb71fc9917313..f008d8ffd6b1d53f877808fd8123330ddc4b237d 100644 (file)
 
 #ifndef _GL_WCTYPE_H
 
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
 #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
 #ifndef _GL_WCTYPE_H
 #define _GL_WCTYPE_H
 
-#if @HAVE_WINT_T@
-typedef wint_t __wctype_wint_t;
-#else
-typedef int __wctype_wint_t;
+/* 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 <wctype.h> but lacks the functions.
@@ -96,56 +102,56 @@ typedef int __wctype_wint_t;
 #  endif
 
 static inline int
-iswalnum (__wctype_wint_t wc)
+iswalnum (wint_t wc)
 {
   return ((wc >= '0' && wc <= '9')
          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
 }
 
 static inline int
-iswalpha (__wctype_wint_t wc)
+iswalpha (wint_t wc)
 {
   return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
 }
 
 static inline int
-iswblank (__wctype_wint_t wc)
+iswblank (wint_t wc)
 {
   return wc == ' ' || wc == '\t';
 }
 
 static inline int
-iswcntrl (__wctype_wint_t wc)
+iswcntrl (wint_t wc)
 {
   return (wc & ~0x1f) == 0 || wc == 0x7f;
 }
 
 static inline int
-iswdigit (__wctype_wint_t wc)
+iswdigit (wint_t wc)
 {
   return wc >= '0' && wc <= '9';
 }
 
 static inline int
-iswgraph (__wctype_wint_t wc)
+iswgraph (wint_t wc)
 {
   return wc >= '!' && wc <= '~';
 }
 
 static inline int
-iswlower (__wctype_wint_t wc)
+iswlower (wint_t wc)
 {
   return wc >= 'a' && wc <= 'z';
 }
 
 static inline int
-iswprint (__wctype_wint_t wc)
+iswprint (wint_t wc)
 {
   return wc >= ' ' && wc <= '~';
 }
 
 static inline int
-iswpunct (__wctype_wint_t wc)
+iswpunct (wint_t wc)
 {
   return (wc >= '!' && wc <= '~'
          && !((wc >= '0' && wc <= '9')
@@ -153,20 +159,20 @@ iswpunct (__wctype_wint_t wc)
 }
 
 static inline int
-iswspace (__wctype_wint_t wc)
+iswspace (wint_t wc)
 {
   return (wc == ' ' || wc == '\t'
          || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
 }
 
 static inline int
-iswupper (__wctype_wint_t wc)
+iswupper (wint_t wc)
 {
   return wc >= 'A' && wc <= 'Z';
 }
 
 static inline int
-iswxdigit (__wctype_wint_t wc)
+iswxdigit (wint_t wc)
 {
   return ((wc >= '0' && wc <= '9')
          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));