add support for __attribute__((weak_import))

This seems to be a darwin-only attribute, I couldn't find out what the
difference to "weak" is (if there is one at all).
fix bad invocations of isdigit()/isprint()

The C standard mandates that the argument must have a value
representable as unsigned char or EOF. This is NOT true for "char"
arguments.

amend to isdigit fix
warn when passing char arguments to isXXX and toXXX functions from ctype.h