[PATCH/RFA] Distinguish between EOF and character with value 0xff
Eric Blake
ebb9@byu.net
Fri Apr 24 12:55:00 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jeff Johnston on 4/23/2009 12:05 PM:
>> I spent some time and actually tested my proposal. I've verified that
>> with the patch below, the assembly produced by isalpha(i) is identical
>> both before and after the patch under gcc 4.3.2. Meanwhile, 'gcc
>> -Wall' is now able to complain about isalpha((char)i) while staying
>> silent for isalpha((unsigned char)
>> i).
>>
>> OK to apply? (And pardon the fact that gmane botched the long lines.)
>>
>>
> Yes, please resend as an attachment, otherwise I can't apply it, and
> include Mike's suggestion as well.
Here's what I applied, including Mike's suggestion, and also fixing
toupper and tolower for those avoiding alternate code pages. Then I also
committed an obvious followup to be namespace clean, in case the user
#define's c.
2009-04-24 Eric Blake <ebb9@byu.net>
Be namespace clean in ctype.h.
* libc/include/ctype.h (_tolower, _toupper, isalpha, isupper)
(islower, isdigit, isxdigit, isspace, ispunct, isalnum)
(isprint, isgraph, iscntrl, isblank, toupper, tolower)
(isascii, toascii): Don't use 'c' as macro parameter name.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknxsBoACgkQ84KuGfSFAYAK1wCgiCOwuLz1vkP1j9wNEFWB/TTb
gcEAn0FSAqFwZ5Hf6/uIBXCO7HsoKyxe
=aAEc
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib.patch31
URL: <http://sourceware.org/pipermail/newlib/attachments/20090424/78678516/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib.patch32
URL: <http://sourceware.org/pipermail/newlib/attachments/20090424/78678516/attachment-0001.ksh>
More information about the Newlib
mailing list