[PATCH] Use !__HAVE_LOCALE_INFO__ define to use _ctype_ directly [v2]
Corinna Vinschen
vinschen@redhat.com
Thu Sep 6 12:22:00 GMT 2018
On Sep 5 21:39, Keith Packard wrote:
> When __HAVE_LOCALE_INFO__ is not selected, directly access the
> existing _ctype_ variable from __locale_ctype_ptr() and
> __locale_ctype_ptr_l(), eliminating the need for any locale or reent
> structure
>
> Signed-off-by: Keith Packard <keithp@keithp.com>
>
> v2:
> locale: fix conflict with __locale_ctype_ptr macro
>
> If we are building without __HAVE_LOCALE_INFO__, there is a
> macro providing __locale_ctype_ptr which in turn fouls up this
> declaration.
>
> Signed-off-by: Michael Lyle <mlyle@lyle.org>
> ---
>
> This is one of a set of patches designed to reduce the number of
> functions which need reent and a locale structures in smaller
> configurations. In this case, I want to make the ctype macros directly
> access the existing _ctype_ global array instead of jumping through a
> function to get a locale structure out of a reent structure.
>
> However, I'm not sure __HAVE_LOCALE_INFO__ is the right flag to use
> for this. If another existing configure flag is appropriate, I'd like
> to know. Or perhaps I just need a new flag?
>
> newlib/libc/include/ctype.h | 9 +++++++++
> newlib/libc/locale/locale.c | 2 ++
> newlib/libc/locale/setlocale.h | 8 ++++++++
> 3 files changed, 19 insertions(+)
Pushed.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20180906/004225b6/attachment.sig>
More information about the Newlib
mailing list