[PATCH/RFA] Internationalize ctype functionality

Corinna Vinschen vinschen@redhat.com
Wed Apr 1 08:24:00 GMT 2009

On Mar 30 17:39, Jeff Johnston wrote:
> Corinna Vinschen wrote:
>> New patch below.  I changed the toupper/tolower functions to check for
>> islower/isupper before calling the mbtowc/tow{upper,lower}/wctomb
>> routine.  This should speed up loops using toupper/tolower
>> unconditionally on native language input.
> Please change the mbtowc/wctomb stuff in tolower/toupper to only be  
> Otherwise, you are linking in unused functions to pre-existing code that 
> was MB enabled and only cared about the 3 Japanese code sets.

Done.  I did the same for the tolower/toupper macros in ctype.h.

> I am ok with Craig's idea to clean up declspec stuff in ctype_.c using  
> DLLEXPORT.  That define could go in sys/config.h and be used globally.

Done.  I did not use DLLEXPORT, though.  The reason is that the header
files already use __IMPORT and that's defined in sys/config.h and
cygwin/config.h.  For symmetry I used __EXPORT which is now defined in
cygwin/config.h as well.  As for __IMPORT, sys/config.h only defines it
as empty if it's not already defined.

> Other than that, I am fine with the patch.

Thanks, applied.


Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

More information about the Newlib mailing list