Patch: ctype.h replacement
Philipp Thomas
pthomas@suse.de
Thu Nov 30 16:27:00 GMT 2000
* Jason Merrill (jason@redhat.com) [20001130 19:33]:
> The only place in gcc/ that uses the lowercase versions is doschk.c,
> which is not actually part of GCC.
It's a bit more :) My grep through the tree gives me this list:
gcc/gcc/doschk.c
gcc/libiberty/cplus-dem.c
gcc/gcc/java/jvgenmain.c
gcc/gcc/collect2.c
gcc/gcc/fixinc/fixfixes.c
gcc/gcc/fixinc/fixincl.c
gcc/gcc/fixinc/gnu-regex.c
gcc/gcc/cppinit.c
gcc/gcc/ch/lex.c
gcc/gcc/config/i370/i370.c
gcc/gcc/config/i386/xm-isc.h
gcc/gcc/config/alpha/alpha.c
gcc/gcc/config/winnt/fixinc-nt.c
gcc/gcc/config/winnt/ld.c
gcc/gcc/config/winnt/dirent.c
gcc/gcc/config/arm/arm.c
gcc/gcc/f/stb.c
gcc/gcc/f/com.c
gcc/gcc/mips-tfile.c
What you have to keep in mind is, that not only the ctype.h macros are
affected by locale changes, but also scanf, strtol, stroul, strtod and
if I remember right also atoi. I haven't checked the calls to strto*,
but I guess we'd also need locale independent versions of those.
But you're right and I should have made this check before arguing. So
as the list is indeed rather small, I now agree with you and we should
use the upper case versions. Specially the demangler shouldn't be
affected by the locale IMHO.
> It should be simple enough to avoid #including <ctype.h> if we want to
> make sure we don't use the C library versions; your #ifdef from your
> current patch should do it.
Yep, that should take care of it.
Philipp
--
Penguins shall save the dinosaurs
-- Handelsblatt about Linux on S/390
More information about the Gcc-patches
mailing list