[PATCH]Fix newlib.wctype/twctrans.c compilation warning: implicit declaration of function 'toupper' & 'tolower'
Eric Blake
eblake@redhat.com
Wed Jan 7 15:47:00 GMT 2015
On 01/07/2015 06:43 AM, Renlin Li wrote:
> Instead, towupper and towloer should be called as wctype.h is included
> in the test case.
>
> newlib regresstion test is done using aarch64-none-elf toolchain, no new
> issues.
> Is it Okay to commit?
>
> - CHECK (towctrans (L'A', x) == tolower ('A'));
> - CHECK (towctrans (L'5', x) == tolower ('5'));
> + CHECK (towctrans (L'A', x) == towlower ('A'));
Shouldn't this be using towlower (L'A'), since towlower wants wint_t
inputs? While POSIX requires that 'A' and L'A' have the same integer
value, C99 allows for situations where multibyte characters use a
different encoding of wint_t than the corresponding 'char' representing
the same character.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20150107/16b0fbe8/attachment.sig>
More information about the Newlib
mailing list