ctype.h hell on Darwin

Stan Shebs shebs@apple.com
Mon Jul 9 15:31:00 GMT 2001


OK, so I'm porting libstdc++-v3 to Darwin, and am stuck with a
complaints in basic_file.cc to the effect that isalnum and all of
its little ctype.h friends are not declared.  This is coming from
the include/c_std/bits/std_cctype.h header, where it does "using"s
after including ctype.h.

I got this this far by saying "hey, Darwin is supposed to be just
like FreeBSD" and make it use all of FreeBSD's configury bits.
However, as near as I can tell, not having all the world's random
/usr/include/ctype.h variations at hand, the FreeBSD port expects
to have function declarations for isalnum etc in /usr/include/ctype.h;
but Darwin's ctype.h has only macros.

So my question is: what's the right way to handle this situation?
I still want to use the bitfield masks, since they are the same
between Darwin and FreeBSD, but I need to take out the assumption
that there are functions, and std_cctype.h seems pretty insistent
that there be functions around.

Stan



More information about the Libstdc++ mailing list