From f83aa16cbc784740e07268cab3e4fe2ed8cf97ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Mar 2004 10:10:13 +0000 Subject: Update. 2004-03-16 Ulrich Drepper * 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. --- include/ctype.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/ctype.h') diff --git a/include/ctype.h b/include/ctype.h index 4896d14f17..ae38b1bf23 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -68,4 +68,15 @@ __ctype_tolower_loc (void) # include +# if !defined __NO_CTYPE && !defined NOT_IN_libc +/* The spec says that isdigit must only match the decimal digits. We + can check this without a memory access. */ +# undef isdigit +# define isdigit(c) ({ int __c = (c); __c >= '0' && __c <= '9'; }) +# undef isdigit_l +# define isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; }) +# undef __isdigit_l +# define __isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; }) +# endif + #endif /* ctype.h */ -- cgit v1.2.3