* [PATCH] Correct argument to __get_current_locale.
@ 2016-11-27 1:13 Douglas
2016-11-28 9:35 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Douglas @ 2016-11-27 1:13 UTC (permalink / raw)
To: newlib
---
newlib/libc/locale/locale.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
I noticed a change made to newlib locale.c 2016-08-25 and it seems
to have resulted in the function __get_current_locale not being
inlined which in turn breaks linking for my project because
this function is not defined. The line is
return __get_current_locale (_REENT)->ctype_ptr;
Do you think the _REENT argument needs to be removed
or is __get_current_locale the wrong function?
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index b7ced4d..8572821 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -996,7 +996,7 @@ __locale_ctype_ptr_l (struct __locale_t *locale)
const char *
__locale_ctype_ptr (void)
{
- return __get_current_locale (_REENT)->ctype_ptr;
+ return __get_current_locale ()->ctype_ptr;
}
#ifndef _REENT_ONLY
--
2.5.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Correct argument to __get_current_locale.
2016-11-27 1:13 [PATCH] Correct argument to __get_current_locale Douglas
@ 2016-11-28 9:35 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2016-11-28 9:35 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
On Nov 27 12:13, Douglas wrote:
> ---
> newlib/libc/locale/locale.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> I noticed a change made to newlib locale.c 2016-08-25 and it seems
> to have resulted in the function __get_current_locale not being
> inlined which in turn breaks linking for my project because
> this function is not defined. The line is
>
> return __get_current_locale (_REENT)->ctype_ptr;
>
> Do you think the _REENT argument needs to be removed
> or is __get_current_locale the wrong function?
>
> diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
> index b7ced4d..8572821 100644
> --- a/newlib/libc/locale/locale.c
> +++ b/newlib/libc/locale/locale.c
> @@ -996,7 +996,7 @@ __locale_ctype_ptr_l (struct __locale_t *locale)
> const char *
> __locale_ctype_ptr (void)
> {
> - return __get_current_locale (_REENT)->ctype_ptr;
> + return __get_current_locale ()->ctype_ptr;
> }
Patch applied, thank you. I also applied a patch which adds a "void"
parameter to the inline functions __get_current_locale and
__get_C_locale. Without that parameter, no warning is emitted for the
above, pretty obvious bug. I have constant trouble remembering that
foo() is not the same as foo(void). Duh.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-28 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-27 1:13 [PATCH] Correct argument to __get_current_locale Douglas
2016-11-28 9:35 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).