Update copyright dates with scripts/update-copyrights.
[platform/upstream/glibc.git] / include / wctype.h
index 9382f32..b29e824 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef _WCTYPE_H
 
+#ifndef _ISOMAC
 /* We try to get wint_t from <stddef.h>, but not all GCC versions define it
    there.  So define it ourselves if it remains undefined.  */
 # define __need_wint_t
@@ -17,6 +18,7 @@ typedef unsigned int wint_t;
    these as macros and thus we couldn't add libc_hidden_proto.  */
 
 extern int iswalpha (wint_t __wc);
+extern int iswalnum (wint_t __wc);
 extern int iswdigit (wint_t __wc);
 extern int iswlower (wint_t __wc);
 extern int iswspace (wint_t __wc);
@@ -25,28 +27,23 @@ extern wint_t towlower (wint_t __wc);
 extern wint_t towupper (wint_t __wc);
 
 libc_hidden_proto (iswalpha)
+libc_hidden_proto (iswalnum)
 libc_hidden_proto (iswdigit)
 libc_hidden_proto (iswlower)
 libc_hidden_proto (iswspace)
 libc_hidden_proto (iswxdigit)
 libc_hidden_proto (towlower)
 libc_hidden_proto (towupper)
+#endif
 
 #include <wctype/wctype.h>
 
+#ifndef _ISOMAC
 /* Internal interfaces.  */
-extern int __iswalpha_l_internal (wint_t __wc, __locale_t __locale)
-     attribute_hidden;
-extern int __iswdigit_l_internal (wint_t __wc, __locale_t __locale)
-     attribute_hidden;
-extern int __iswspace_l_internal (wint_t __wc, __locale_t __locale)
-     attribute_hidden;
-extern int __iswxdigit_l_internal (wint_t __wc, __locale_t __locale)
-     attribute_hidden;
 extern int __iswspace (wint_t __wc);
 extern int __iswctype (wint_t __wc, wctype_t __desc);
-extern int __iswctype_internal (wint_t __wc, wctype_t __desc) attribute_hidden;
-extern wctype_t __wctype (__const char *__property);
+extern wctype_t __wctype (const char *__property);
+extern wctrans_t __wctrans (const char *__property);
 extern wint_t __towctrans (wint_t __wc, wctrans_t __desc);
 
 extern __typeof (iswalnum_l) __iswalnum_l;
@@ -64,6 +61,7 @@ extern __typeof (iswxdigit_l) __iswxdigit_l;
 extern __typeof (towlower_l) __towlower_l;
 extern __typeof (towupper_l) __towupper_l;
 
+libc_hidden_proto (__towctrans)
 libc_hidden_proto (__iswctype)
 libc_hidden_proto (__iswalnum_l)
 libc_hidden_proto (__iswalpha_l)
@@ -80,4 +78,16 @@ libc_hidden_proto (__iswxdigit_l)
 libc_hidden_proto (__towlower_l)
 libc_hidden_proto (__towupper_l)
 
+/* The spec says that isdigit must only match the decimal digits.  We
+   can check this without a memory access.  */
+# if IS_IN (libc)
+#  undef iswdigit
+#  define iswdigit(c) ({ wint_t __c = (c); __c >= L'0' && __c <= L'9'; })
+#  undef iswdigit_l
+#  define iswdigit_l(c, l) ({ wint_t __c = (c); __c >= L'0' && __c <= L'9'; })
+#  undef __iswdigit_l
+#  define __iswdigit_l(c, l) ({ wint_t __c = (c); __c >= L'0' && __c <= L'9'; })
+# endif
+
+#endif
 #endif