about summary refs log tree commit diff
path: root/include/wctype.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-16 10:10:13 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-16 10:10:13 +0000
commitf83aa16cbc784740e07268cab3e4fe2ed8cf97ff (patch)
tree98b195c6a451cd2dec3d3ef5e26e1a5b19284e8f /include/wctype.h
parent6ac3639867e6ab13fa2d179cd5723483e5d92d60 (diff)
downloadglibc-f83aa16cbc784740e07268cab3e4fe2ed8cf97ff.tar.gz
glibc-f83aa16cbc784740e07268cab3e4fe2ed8cf97ff.tar.xz
glibc-f83aa16cbc784740e07268cab3e4fe2ed8cf97ff.zip
Update.
2004-03-16  Ulrich Drepper  <drepper@redhat.com>

	* include/ctype.h: For libc, define isdigit, isdigit_l, and
	__isdigit_l as simple comparison macros.
	* include/wctype.h: For libc, define iswdigit, iswdigit_l, and
	__iswdigit_l as simple comparison macros.
	* wctype/wcfuncs_l.c: #undef iswdigit and __iswdigit.

	* sysdeps/alpha/fpu/bits/mathdef.h: Remove INFINITY.
	* sysdeps/arm/fpu/bits/mathdef.h: Likewise.
	* sysdeps/generic/bits/mathdef.h: Likewise.
	* sysdeps/i386/fpu/bits/mathdef.h: Likewise.
	* sysdeps/ia64/fpu/bits/mathdef.h: Likewise.
	* sysdeps/m68k/fpu/bits/mathdef.h: Likewise.
	* sysdeps/mips/fpu/bits/mathdef.h: Likewise.
	* sysdeps/powerpc/fpu/bits/mathdef.h: Likewise.
	* sysdeps/sh/sh4/fpu/bits/mathdef.h: Likewise.
	* sysdeps/sparc/fpu/bits/mathdef.h: Likewise.
	* sysdeps/x86_64/fpu/bits/mathdef.h: Likewise.
Diffstat (limited to 'include/wctype.h')
-rw-r--r--include/wctype.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/wctype.h b/include/wctype.h
index a2d5e18f31..2828c3ad3d 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -84,4 +84,15 @@ 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.  */
+# ifndef NOT_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