This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/9] Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.
On Wed, 07 Mar 2018, Zack Weinberg wrote:
> * include/monetary.h (STRFMON_LDBL_IS_DBL): New constant.
> (__vstrfmon_l): Rename to __vstrfmon_l_internal and add flags
> argument.
Maybe mention that attribute_hidden was not required, thus removed?
Is this another instance of the 'only needed when called both from inside
and outside of glibc' argument (as pointed out in a previous message [1])?
[1] https://sourceware.org/ml/libc-alpha/2018-03/msg00311.html
>-extern ssize_t __vstrfmon_l (char *s, size_t maxsize, locale_t loc,
>- const char *format, va_list ap)
>- attribute_hidden;
Same comment as above, i.e.: is this another instance of the 'only needed
when called both from inside and outside of glibc' argument?
>+extern ssize_t __vstrfmon_l_internal (char *s, size_t maxsize, locale_t loc,
>+ const char *format, va_list ap,
>+ unsigned int flags);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Spaces that could be converted to tabs.
>- ssize_t res = __vstrfmon_l (s, maxsize, _NL_CURRENT_LOCALE, format, ap);
>+ ssize_t res = __vstrfmon_l_internal (s, maxsize, _NL_CURRENT_LOCALE,
>+ format, ap, 0);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Likewise.
>-__vstrfmon_l (char *s, size_t maxsize, locale_t loc, const char *format,
>- va_list ap)
>+__vstrfmon_l_internal (char *s, size_t maxsize, locale_t loc,
>+ const char *format, va_list ap, unsigned int flags)
~~~~~~~~~~~~~~~~
Likewise.
>- res = __nldbl___vstrfmon (s, maxsize, format, ap);
>+ ret = __vstrfmon_l_internal (s, maxsize, _NL_CURRENT_LOCALE, format, ap,
>+ STRFMON_LDBL_IS_DBL);
~~~~~~~~~~~~~~~~~~~~~~~~
Likewise.
>- res = __nldbl___vstrfmon_l (s, maxsize, loc, format, ap);
>+ ret = __vstrfmon_l_internal (s, maxsize, loc, format, ap,
>+ STRFMON_LDBL_IS_DBL);
~~~~~~~~~~~~~~~~~~~~~~~~
Likewise.