aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-compat.c34
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-compat.h8
2 files changed, 17 insertions, 25 deletions
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
index ffb5fabebe..7a1e89c1a3 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
@@ -51,8 +51,6 @@ libc_hidden_proto (__nldbl___vswprintf_chk)
libc_hidden_proto (__nldbl___vasprintf_chk)
libc_hidden_proto (__nldbl___vdprintf_chk)
libc_hidden_proto (__nldbl___obstack_vprintf_chk)
-libc_hidden_proto (__nldbl___vstrfmon)
-libc_hidden_proto (__nldbl___vstrfmon_l)
libc_hidden_proto (__nldbl___isoc99_vsscanf)
libc_hidden_proto (__nldbl___isoc99_vfscanf)
libc_hidden_proto (__nldbl___isoc99_vswscanf)
@@ -780,12 +778,13 @@ attribute_compat_text_section
__nldbl_strfmon (char *s, size_t maxsize, const char *format, ...)
{
va_list ap;
- ssize_t res;
+ ssize_t ret;
va_start (ap, format);
- res = __nldbl___vstrfmon (s, maxsize, format, ap);
+ ret = __vstrfmon_l_internal (s, maxsize, _NL_CURRENT_LOCALE, format, ap,
+ STRFMON_LDBL_IS_DBL);
va_end (ap);
- return res;
+ return ret;
}
ssize_t
@@ -794,12 +793,13 @@ __nldbl___strfmon_l (char *s, size_t maxsize, locale_t loc,
const char *format, ...)
{
va_list ap;
- ssize_t res;
+ ssize_t ret;
va_start (ap, format);
- res = __nldbl___vstrfmon_l (s, maxsize, loc, format, ap);
+ ret = __vstrfmon_l_internal (s, maxsize, loc, format, ap,
+ STRFMON_LDBL_IS_DBL);
va_end (ap);
- return res;
+ return ret;
}
weak_alias (__nldbl___strfmon_l, __nldbl_strfmon_l)
@@ -807,28 +807,18 @@ ssize_t
attribute_compat_text_section
__nldbl___vstrfmon (char *s, size_t maxsize, const char *format, va_list ap)
{
- ssize_t res;
- __no_long_double = 1;
- res = __vstrfmon_l (s, maxsize, _NL_CURRENT_LOCALE, format, ap);
- __no_long_double = 0;
- va_end (ap);
- return res;
+ return __vstrfmon_l_internal (s, maxsize, _NL_CURRENT_LOCALE, format, ap,
+ STRFMON_LDBL_IS_DBL);
}
-libc_hidden_def (__nldbl___vstrfmon)
ssize_t
attribute_compat_text_section
__nldbl___vstrfmon_l (char *s, size_t maxsize, locale_t loc,
const char *format, va_list ap)
{
- ssize_t res;
- __no_long_double = 1;
- res = __vstrfmon_l (s, maxsize, loc, format, ap);
- __no_long_double = 0;
- va_end (ap);
- return res;
+ return __vstrfmon_l_internal (s, maxsize, loc, format, ap,
+ STRFMON_LDBL_IS_DBL);
}
-libc_hidden_def (__nldbl___vstrfmon_l)
void
attribute_compat_text_section
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
index b7e938f785..b7606c3c2d 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
@@ -64,7 +64,6 @@ NLDBL_DECL (vsyslog);
NLDBL_DECL (qecvt);
NLDBL_DECL (qfcvt);
NLDBL_DECL (qgcvt);
-NLDBL_DECL (__vstrfmon_l);
NLDBL_DECL (__isoc99_scanf);
NLDBL_DECL (__isoc99_fscanf);
NLDBL_DECL (__isoc99_sscanf);
@@ -78,10 +77,13 @@ NLDBL_DECL (__isoc99_vwscanf);
NLDBL_DECL (__isoc99_vfwscanf);
NLDBL_DECL (__isoc99_vswscanf);
-/* This one does not exist in the normal interface, only
- __nldbl___vstrfmon really exists. */
+/* These do not exist in the normal interface, but must exist in the
+ __nldbl interface so that they can be called from libnldbl. */
extern ssize_t __nldbl___vstrfmon (char *, size_t, const char *, va_list)
__THROW;
+extern ssize_t __nldbl___vstrfmon_l (char *, size_t, locale_t, const char *,
+ va_list)
+ __THROW;
/* These don't use __typeof because they were not declared by the headers,
since we don't compile with _FORTIFY_SOURCE. */