1 /* *printf* family compatibility routines for IEEE double as long double
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Jakub Jelinek <jakub@cygnus.com>, 2006.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
20 /* This file may define some of the deprecated scanf variants. */
22 #undef __GLIBC_USE_DEPRECATED_SCANF
23 #define __GLIBC_USE_DEPRECATED_SCANF 1
28 #include <libio/strfile.h>
33 #include <locale/localeinfo.h>
34 #include <sys/syslog.h>
35 #include <libc-lock.h>
37 #include "nldbl-compat.h"
39 libc_hidden_proto (__nldbl_vsscanf
)
40 libc_hidden_proto (__nldbl_vfscanf
)
41 libc_hidden_proto (__nldbl_vfwscanf
)
42 libc_hidden_proto (__nldbl_vswscanf
)
43 libc_hidden_proto (__nldbl___isoc99_vsscanf
)
44 libc_hidden_proto (__nldbl___isoc99_vfscanf
)
45 libc_hidden_proto (__nldbl___isoc99_vswscanf
)
46 libc_hidden_proto (__nldbl___isoc99_vfwscanf
)
48 /* Compatibility with IEEE double as long double.
49 IEEE quad long double is used by default for most programs, so
50 we don't need to split this into one file per function for the
51 sake of statically linked programs. */
54 attribute_compat_text_section
55 __nldbl___asprintf (char **string_ptr
, const char *fmt
, ...)
61 ret
= __vasprintf_internal (string_ptr
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
66 weak_alias (__nldbl___asprintf
, __nldbl_asprintf
)
69 attribute_compat_text_section
70 __nldbl_dprintf (int d
, const char *fmt
, ...)
76 ret
= __vdprintf_internal (d
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
83 attribute_compat_text_section
84 __nldbl_fprintf (FILE *stream
, const char *fmt
, ...)
90 ret
= __vfprintf_internal (stream
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
95 weak_alias (__nldbl_fprintf
, __nldbl__IO_fprintf
)
98 attribute_compat_text_section weak_function
99 __nldbl_fwprintf (FILE *stream
, const wchar_t *fmt
, ...)
105 ret
= __vfwprintf_internal (stream
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
112 attribute_compat_text_section
113 __nldbl_printf (const char *fmt
, ...)
119 ret
= __vfprintf_internal (stdout
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
124 strong_alias (__nldbl_printf
, __nldbl__IO_printf
)
127 attribute_compat_text_section
128 __nldbl_sprintf (char *s
, const char *fmt
, ...)
134 ret
= __vsprintf_internal (s
, -1, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
139 strong_alias (__nldbl_sprintf
, __nldbl__IO_sprintf
)
142 attribute_compat_text_section
143 __nldbl_vfprintf (FILE *s
, const char *fmt
, va_list ap
)
145 return __vfprintf_internal (s
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
147 strong_alias (__nldbl_vfprintf
, __nldbl__IO_vfprintf
)
150 attribute_compat_text_section
151 __nldbl___vsprintf (char *string
, const char *fmt
, va_list ap
)
153 return __vsprintf_internal (string
, -1, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
155 strong_alias (__nldbl___vsprintf
, __nldbl__IO_vsprintf
)
156 weak_alias (__nldbl___vsprintf
, __nldbl_vsprintf
)
159 attribute_compat_text_section
160 __nldbl_obstack_vprintf (struct obstack
*obstack
, const char *fmt
,
163 return __obstack_vprintf_internal (obstack
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
167 attribute_compat_text_section
168 __nldbl_obstack_printf (struct obstack
*obstack
, const char *fmt
, ...)
173 ret
= __obstack_vprintf_internal (obstack
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
179 attribute_compat_text_section weak_function
180 __nldbl_snprintf (char *s
, size_t maxlen
, const char *fmt
, ...)
186 ret
= __vsnprintf_internal (s
, maxlen
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
193 attribute_compat_text_section
194 __nldbl_swprintf (wchar_t *s
, size_t n
, const wchar_t *fmt
, ...)
200 ret
= __vswprintf_internal (s
, n
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
207 attribute_compat_text_section weak_function
208 __nldbl_vasprintf (char **result_ptr
, const char *fmt
, va_list ap
)
210 return __vasprintf_internal (result_ptr
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
214 attribute_compat_text_section
215 __nldbl_vdprintf (int d
, const char *fmt
, va_list ap
)
217 return __vdprintf_internal (d
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
221 attribute_compat_text_section weak_function
222 __nldbl_vfwprintf (FILE *s
, const wchar_t *fmt
, va_list ap
)
224 return __vfwprintf_internal (s
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
228 attribute_compat_text_section
229 __nldbl_vprintf (const char *fmt
, va_list ap
)
231 return __vfprintf_internal (stdout
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
235 attribute_compat_text_section
236 __nldbl_vsnprintf (char *string
, size_t maxlen
, const char *fmt
,
239 return __vsnprintf_internal (string
, maxlen
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
241 weak_alias (__nldbl_vsnprintf
, __nldbl___vsnprintf
)
244 attribute_compat_text_section weak_function
245 __nldbl_vswprintf (wchar_t *string
, size_t maxlen
, const wchar_t *fmt
,
248 return __vswprintf_internal (string
, maxlen
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
252 attribute_compat_text_section
253 __nldbl_vwprintf (const wchar_t *fmt
, va_list ap
)
255 return __vfwprintf_internal (stdout
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
259 attribute_compat_text_section
260 __nldbl_wprintf (const wchar_t *fmt
, ...)
266 ret
= __vfwprintf_internal (stdout
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
272 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_29)
274 attribute_compat_text_section
275 __nldbl__IO_vfscanf (FILE *s
, const char *fmt
, va_list ap
, int *errp
)
277 int ret
= __vfscanf_internal (s
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
278 if (__glibc_unlikely (errp
!= 0))
285 attribute_compat_text_section
286 __nldbl___vfscanf (FILE *s
, const char *fmt
, va_list ap
)
288 return __vfscanf_internal (s
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
290 weak_alias (__nldbl___vfscanf
, __nldbl_vfscanf
)
291 libc_hidden_def (__nldbl_vfscanf
)
294 attribute_compat_text_section
295 __nldbl_sscanf (const char *s
, const char *fmt
, ...)
298 FILE *f
= _IO_strfile_read (&sf
, s
);
303 ret
= __vfscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
308 strong_alias (__nldbl_sscanf
, __nldbl__IO_sscanf
)
311 attribute_compat_text_section
312 __nldbl___vsscanf (const char *s
, const char *fmt
, va_list ap
)
315 FILE *f
= _IO_strfile_read (&sf
, s
);
316 return __vfscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
318 weak_alias (__nldbl___vsscanf
, __nldbl_vsscanf
)
319 libc_hidden_def (__nldbl_vsscanf
)
322 attribute_compat_text_section weak_function
323 __nldbl_vscanf (const char *fmt
, va_list ap
)
325 return __vfscanf_internal (stdin
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
329 attribute_compat_text_section
330 __nldbl_fscanf (FILE *stream
, const char *fmt
, ...)
336 ret
= __vfscanf_internal (stream
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
343 attribute_compat_text_section
344 __nldbl_scanf (const char *fmt
, ...)
350 ret
= __vfscanf_internal (stdin
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
357 attribute_compat_text_section
358 __nldbl_vfwscanf (FILE *s
, const wchar_t *fmt
, va_list ap
)
360 return __vfwscanf_internal (s
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
362 libc_hidden_def (__nldbl_vfwscanf
)
365 attribute_compat_text_section
366 __nldbl_swscanf (const wchar_t *s
, const wchar_t *fmt
, ...)
369 struct _IO_wide_data wd
;
370 FILE *f
= _IO_strfile_readw (&sf
, &wd
, s
);
375 ret
= __vfwscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
382 attribute_compat_text_section
383 __nldbl_vswscanf (const wchar_t *s
, const wchar_t *fmt
, va_list ap
)
386 struct _IO_wide_data wd
;
387 FILE *f
= _IO_strfile_readw (&sf
, &wd
, s
);
389 return __vfwscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
391 libc_hidden_def (__nldbl_vswscanf
)
394 attribute_compat_text_section weak_function
395 __nldbl_vwscanf (const wchar_t *fmt
, va_list ap
)
397 return __vfwscanf_internal (stdin
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
401 attribute_compat_text_section
402 __nldbl_fwscanf (FILE *stream
, const wchar_t *fmt
, ...)
408 ret
= __vfwscanf_internal (stream
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
415 attribute_compat_text_section
416 __nldbl_wscanf (const wchar_t *fmt
, ...)
422 ret
= __vfwscanf_internal (stdin
, fmt
, ap
, SCANF_LDBL_IS_DBL
);
429 attribute_compat_text_section
430 __nldbl___fprintf_chk (FILE *stream
, int flag
, const char *fmt
, ...)
434 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
436 mode
|= PRINTF_FORTIFY
;
439 ret
= __vfprintf_internal (stream
, fmt
, ap
, mode
);
446 attribute_compat_text_section
447 __nldbl___fwprintf_chk (FILE *stream
, int flag
, const wchar_t *fmt
, ...)
451 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
453 mode
|= PRINTF_FORTIFY
;
456 ret
= __vfwprintf_internal (stream
, fmt
, ap
, mode
);
463 attribute_compat_text_section
464 __nldbl___printf_chk (int flag
, const char *fmt
, ...)
468 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
470 mode
|= PRINTF_FORTIFY
;
473 ret
= __vfprintf_internal (stdout
, fmt
, ap
, mode
);
480 attribute_compat_text_section
481 __nldbl___snprintf_chk (char *s
, size_t maxlen
, int flag
, size_t slen
,
482 const char *fmt
, ...)
484 if (__glibc_unlikely (slen
< maxlen
))
489 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
491 mode
|= PRINTF_FORTIFY
;
494 ret
= __vsnprintf_internal (s
, maxlen
, fmt
, ap
, mode
);
501 attribute_compat_text_section
502 __nldbl___sprintf_chk (char *s
, int flag
, size_t slen
, const char *fmt
, ...)
509 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
511 mode
|= PRINTF_FORTIFY
;
514 ret
= __vsprintf_internal (s
, slen
, fmt
, ap
, mode
);
521 attribute_compat_text_section
522 __nldbl___swprintf_chk (wchar_t *s
, size_t maxlen
, int flag
, size_t slen
,
523 const wchar_t *fmt
, ...)
525 if (__glibc_unlikely (slen
< maxlen
))
530 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
532 mode
|= PRINTF_FORTIFY
;
535 ret
= __vswprintf_internal (s
, maxlen
, fmt
, ap
, mode
);
542 attribute_compat_text_section
543 __nldbl___vfprintf_chk (FILE *s
, int flag
, const char *fmt
, va_list ap
)
545 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
547 mode
|= PRINTF_FORTIFY
;
549 return __vfprintf_internal (s
, fmt
, ap
, mode
);
553 attribute_compat_text_section
554 __nldbl___vfwprintf_chk (FILE *s
, int flag
, const wchar_t *fmt
, va_list ap
)
556 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
558 mode
|= PRINTF_FORTIFY
;
560 return __vfwprintf_internal (s
, fmt
, ap
, mode
);
564 attribute_compat_text_section
565 __nldbl___vprintf_chk (int flag
, const char *fmt
, va_list ap
)
567 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
569 mode
|= PRINTF_FORTIFY
;
571 return __vfprintf_internal (stdout
, fmt
, ap
, mode
);
575 attribute_compat_text_section
576 __nldbl___vsnprintf_chk (char *string
, size_t maxlen
, int flag
, size_t slen
,
577 const char *fmt
, va_list ap
)
579 if (__glibc_unlikely (slen
< maxlen
))
582 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
584 mode
|= PRINTF_FORTIFY
;
586 return __vsnprintf_internal (string
, maxlen
, fmt
, ap
, mode
);
590 attribute_compat_text_section
591 __nldbl___vsprintf_chk (char *string
, int flag
, size_t slen
, const char *fmt
,
597 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
599 mode
|= PRINTF_FORTIFY
;
601 return __vsprintf_internal (string
, slen
, fmt
, ap
, mode
);
605 attribute_compat_text_section
606 __nldbl___vswprintf_chk (wchar_t *string
, size_t maxlen
, int flag
, size_t slen
,
607 const wchar_t *fmt
, va_list ap
)
609 if (__glibc_unlikely (slen
< maxlen
))
612 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
614 mode
|= PRINTF_FORTIFY
;
616 return __vswprintf_internal (string
, maxlen
, fmt
, ap
, mode
);
620 attribute_compat_text_section
621 __nldbl___vwprintf_chk (int flag
, const wchar_t *fmt
, va_list ap
)
623 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
625 mode
|= PRINTF_FORTIFY
;
627 return __vfwprintf_internal (stdout
, fmt
, ap
, mode
);
631 attribute_compat_text_section
632 __nldbl___wprintf_chk (int flag
, const wchar_t *fmt
, ...)
636 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
638 mode
|= PRINTF_FORTIFY
;
641 ret
= __vfwprintf_internal (stdout
, fmt
, ap
, mode
);
648 attribute_compat_text_section
649 __nldbl___vasprintf_chk (char **ptr
, int flag
, const char *fmt
, va_list ap
)
651 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
653 mode
|= PRINTF_FORTIFY
;
655 return __vasprintf_internal (ptr
, fmt
, ap
, mode
);
659 attribute_compat_text_section
660 __nldbl___asprintf_chk (char **ptr
, int flag
, const char *fmt
, ...)
664 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
666 mode
|= PRINTF_FORTIFY
;
669 ret
= __vasprintf_internal (ptr
, fmt
, ap
, mode
);
676 attribute_compat_text_section
677 __nldbl___vdprintf_chk (int d
, int flag
, const char *fmt
, va_list ap
)
679 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
681 mode
|= PRINTF_FORTIFY
;
683 return __vdprintf_internal (d
, fmt
, ap
, mode
);
687 attribute_compat_text_section
688 __nldbl___dprintf_chk (int d
, int flag
, const char *fmt
, ...)
692 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
694 mode
|= PRINTF_FORTIFY
;
697 ret
= __vdprintf_internal (d
, fmt
, ap
, mode
);
704 attribute_compat_text_section
705 __nldbl___obstack_vprintf_chk (struct obstack
*obstack
, int flag
,
706 const char *fmt
, va_list ap
)
708 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
710 mode
|= PRINTF_FORTIFY
;
712 return __obstack_vprintf_internal (obstack
, fmt
, ap
, mode
);
716 attribute_compat_text_section
717 __nldbl___obstack_printf_chk (struct obstack
*obstack
, int flag
,
718 const char *fmt
, ...)
722 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
724 mode
|= PRINTF_FORTIFY
;
727 ret
= __obstack_vprintf_internal (obstack
, fmt
, ap
, mode
);
733 extern __typeof (printf_size
) __printf_size
;
736 attribute_compat_text_section
737 __nldbl_printf_size (FILE *fp
, const struct printf_info
*info
,
738 const void *const *args
)
740 struct printf_info info_no_ldbl
= *info
;
742 info_no_ldbl
.is_long_double
= 0;
743 return __printf_size (fp
, &info_no_ldbl
, args
);
746 extern __typeof (__printf_fp
) ___printf_fp
;
749 attribute_compat_text_section
750 __nldbl___printf_fp (FILE *fp
, const struct printf_info
*info
,
751 const void *const *args
)
753 struct printf_info info_no_ldbl
= *info
;
755 info_no_ldbl
.is_long_double
= 0;
756 return ___printf_fp (fp
, &info_no_ldbl
, args
);
760 attribute_compat_text_section
761 __nldbl_strfmon (char *s
, size_t maxsize
, const char *format
, ...)
766 va_start (ap
, format
);
767 ret
= __vstrfmon_l_internal (s
, maxsize
, _NL_CURRENT_LOCALE
, format
, ap
,
768 STRFMON_LDBL_IS_DBL
);
774 attribute_compat_text_section
775 __nldbl___strfmon_l (char *s
, size_t maxsize
, locale_t loc
,
776 const char *format
, ...)
781 va_start (ap
, format
);
782 ret
= __vstrfmon_l_internal (s
, maxsize
, loc
, format
, ap
,
783 STRFMON_LDBL_IS_DBL
);
787 weak_alias (__nldbl___strfmon_l
, __nldbl_strfmon_l
)
790 attribute_compat_text_section
791 __nldbl___vstrfmon (char *s
, size_t maxsize
, const char *format
, va_list ap
)
793 return __vstrfmon_l_internal (s
, maxsize
, _NL_CURRENT_LOCALE
, format
, ap
,
794 STRFMON_LDBL_IS_DBL
);
798 attribute_compat_text_section
799 __nldbl___vstrfmon_l (char *s
, size_t maxsize
, locale_t loc
,
800 const char *format
, va_list ap
)
802 return __vstrfmon_l_internal (s
, maxsize
, loc
, format
, ap
,
803 STRFMON_LDBL_IS_DBL
);
807 attribute_compat_text_section
808 __nldbl_syslog (int pri
, const char *fmt
, ...)
812 __vsyslog_internal (pri
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
817 attribute_compat_text_section
818 __nldbl_vsyslog (int pri
, const char *fmt
, va_list ap
)
820 __vsyslog_internal (pri
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
824 attribute_compat_text_section
825 __nldbl___syslog_chk (int pri
, int flag
, const char *fmt
, ...)
828 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
830 mode
|= PRINTF_FORTIFY
;
833 __vsyslog_internal (pri
, fmt
, ap
, mode
);
838 attribute_compat_text_section
839 __nldbl___vsyslog_chk (int pri
, int flag
, const char *fmt
, va_list ap
)
841 unsigned int mode
= PRINTF_LDBL_IS_DBL
;
843 mode
|= PRINTF_FORTIFY
;
845 __vsyslog_internal (pri
, fmt
, ap
, mode
);
849 attribute_compat_text_section
850 __nldbl___isoc99_vfscanf (FILE *s
, const char *fmt
, va_list ap
)
852 return __vfscanf_internal (s
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
854 libc_hidden_def (__nldbl___isoc99_vfscanf
)
857 attribute_compat_text_section
858 __nldbl___isoc99_sscanf (const char *s
, const char *fmt
, ...)
861 FILE *f
= _IO_strfile_read (&sf
, s
);
866 ret
= __vfscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
873 attribute_compat_text_section
874 __nldbl___isoc99_vsscanf (const char *s
, const char *fmt
, va_list ap
)
877 FILE *f
= _IO_strfile_read (&sf
, s
);
879 return __vfscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
881 libc_hidden_def (__nldbl___isoc99_vsscanf
)
884 attribute_compat_text_section
885 __nldbl___isoc99_vscanf (const char *fmt
, va_list ap
)
887 return __vfscanf_internal (stdin
, fmt
, ap
,
888 SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
892 attribute_compat_text_section
893 __nldbl___isoc99_fscanf (FILE *s
, const char *fmt
, ...)
899 ret
= __vfscanf_internal (s
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
906 attribute_compat_text_section
907 __nldbl___isoc99_scanf (const char *fmt
, ...)
913 ret
= __vfscanf_internal (stdin
, fmt
, ap
,
914 SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
921 attribute_compat_text_section
922 __nldbl___isoc99_vfwscanf (FILE *s
, const wchar_t *fmt
, va_list ap
)
924 return __vfwscanf_internal (s
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
926 libc_hidden_def (__nldbl___isoc99_vfwscanf
)
929 attribute_compat_text_section
930 __nldbl___isoc99_swscanf (const wchar_t *s
, const wchar_t *fmt
, ...)
933 struct _IO_wide_data wd
;
934 FILE *f
= _IO_strfile_readw (&sf
, &wd
, s
);
939 ret
= __vfwscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
946 attribute_compat_text_section
947 __nldbl___isoc99_vswscanf (const wchar_t *s
, const wchar_t *fmt
, va_list ap
)
950 struct _IO_wide_data wd
;
951 FILE *f
= _IO_strfile_readw (&sf
, &wd
, s
);
953 return __vfwscanf_internal (f
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
955 libc_hidden_def (__nldbl___isoc99_vswscanf
)
958 attribute_compat_text_section
959 __nldbl___isoc99_vwscanf (const wchar_t *fmt
, va_list ap
)
961 return __vfwscanf_internal (stdin
, fmt
, ap
,
962 SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
966 attribute_compat_text_section
967 __nldbl___isoc99_fwscanf (FILE *s
, const wchar_t *fmt
, ...)
973 ret
= __vfwscanf_internal (s
, fmt
, ap
, SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
980 attribute_compat_text_section
981 __nldbl___isoc99_wscanf (const wchar_t *fmt
, ...)
987 ret
= __vfwscanf_internal (stdin
, fmt
, ap
,
988 SCANF_LDBL_IS_DBL
| SCANF_ISOC99_A
);
995 __nldbl_argp_error (const struct argp_state
*state
, const char *fmt
, ...)
999 __argp_error_internal (state
, fmt
, ap
, PRINTF_LDBL_IS_DBL
);
1004 __nldbl_argp_failure (const struct argp_state
*state
, int status
,
1005 int errnum
, const char *fmt
, ...)
1009 __argp_failure_internal (state
, status
, errnum
, fmt
, ap
,
1010 PRINTF_LDBL_IS_DBL
);
1014 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
1015 compat_symbol (libc
, __nldbl__IO_printf
, _IO_printf
, GLIBC_2_0
);
1016 compat_symbol (libc
, __nldbl__IO_sprintf
, _IO_sprintf
, GLIBC_2_0
);
1017 compat_symbol (libc
, __nldbl__IO_vfprintf
, _IO_vfprintf
, GLIBC_2_0
);
1018 compat_symbol (libc
, __nldbl__IO_vsprintf
, _IO_vsprintf
, GLIBC_2_0
);
1019 compat_symbol (libc
, __nldbl_dprintf
, dprintf
, GLIBC_2_0
);
1020 compat_symbol (libc
, __nldbl_fprintf
, fprintf
, GLIBC_2_0
);
1021 compat_symbol (libc
, __nldbl_printf
, printf
, GLIBC_2_0
);
1022 compat_symbol (libc
, __nldbl_sprintf
, sprintf
, GLIBC_2_0
);
1023 compat_symbol (libc
, __nldbl_vfprintf
, vfprintf
, GLIBC_2_0
);
1024 compat_symbol (libc
, __nldbl_vprintf
, vprintf
, GLIBC_2_0
);
1025 compat_symbol (libc
, __nldbl__IO_fprintf
, _IO_fprintf
, GLIBC_2_0
);
1026 compat_symbol (libc
, __nldbl___vsnprintf
, __vsnprintf
, GLIBC_2_0
);
1027 compat_symbol (libc
, __nldbl_asprintf
, asprintf
, GLIBC_2_0
);
1028 compat_symbol (libc
, __nldbl_obstack_printf
, obstack_printf
, GLIBC_2_0
);
1029 compat_symbol (libc
, __nldbl_obstack_vprintf
, obstack_vprintf
, GLIBC_2_0
);
1030 compat_symbol (libc
, __nldbl_snprintf
, snprintf
, GLIBC_2_0
);
1031 compat_symbol (libc
, __nldbl_vasprintf
, vasprintf
, GLIBC_2_0
);
1032 compat_symbol (libc
, __nldbl_vdprintf
, vdprintf
, GLIBC_2_0
);
1033 compat_symbol (libc
, __nldbl_vsnprintf
, vsnprintf
, GLIBC_2_0
);
1034 compat_symbol (libc
, __nldbl_vsprintf
, vsprintf
, GLIBC_2_0
);
1035 compat_symbol (libc
, __nldbl__IO_sscanf
, _IO_sscanf
, GLIBC_2_0
);
1036 compat_symbol (libc
, __nldbl___vfscanf
, __vfscanf
, GLIBC_2_0
);
1037 compat_symbol (libc
, __nldbl___vsscanf
, __vsscanf
, GLIBC_2_0
);
1038 compat_symbol (libc
, __nldbl_fscanf
, fscanf
, GLIBC_2_0
);
1039 compat_symbol (libc
, __nldbl_scanf
, scanf
, GLIBC_2_0
);
1040 compat_symbol (libc
, __nldbl_sscanf
, sscanf
, GLIBC_2_0
);
1041 compat_symbol (libc
, __nldbl_vfscanf
, vfscanf
, GLIBC_2_0
);
1042 compat_symbol (libc
, __nldbl_vscanf
, vscanf
, GLIBC_2_0
);
1043 compat_symbol (libc
, __nldbl_vsscanf
, vsscanf
, GLIBC_2_0
);
1044 compat_symbol (libc
, __nldbl___printf_fp
, __printf_fp
, GLIBC_2_0
);
1045 compat_symbol (libc
, __nldbl_strfmon
, strfmon
, GLIBC_2_0
);
1046 compat_symbol (libc
, __nldbl_syslog
, syslog
, GLIBC_2_0
);
1047 compat_symbol (libc
, __nldbl_vsyslog
, vsyslog
, GLIBC_2_0
);
1048 /* This function is not in public headers, but was exported until
1049 version 2.29. For platforms that are newer than that, there's no
1050 need to expose the symbol. */
1051 # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_29)
1052 compat_symbol (libc
, __nldbl__IO_vfscanf
, _IO_vfscanf
, GLIBC_2_0
);
1055 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_1)
1056 compat_symbol (libc
, __nldbl___asprintf
, __asprintf
, GLIBC_2_1
);
1057 compat_symbol (libc
, __nldbl_printf_size
, printf_size
, GLIBC_2_1
);
1058 compat_symbol (libc
, __nldbl___strfmon_l
, __strfmon_l
, GLIBC_2_1
);
1060 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
1061 compat_symbol (libc
, __nldbl_swprintf
, swprintf
, GLIBC_2_2
);
1062 compat_symbol (libc
, __nldbl_vwprintf
, vwprintf
, GLIBC_2_2
);
1063 compat_symbol (libc
, __nldbl_wprintf
, wprintf
, GLIBC_2_2
);
1064 compat_symbol (libc
, __nldbl_fwprintf
, fwprintf
, GLIBC_2_2
);
1065 compat_symbol (libc
, __nldbl_vfwprintf
, vfwprintf
, GLIBC_2_2
);
1066 compat_symbol (libc
, __nldbl_vswprintf
, vswprintf
, GLIBC_2_2
);
1067 compat_symbol (libc
, __nldbl_fwscanf
, fwscanf
, GLIBC_2_2
);
1068 compat_symbol (libc
, __nldbl_swscanf
, swscanf
, GLIBC_2_2
);
1069 compat_symbol (libc
, __nldbl_vfwscanf
, vfwscanf
, GLIBC_2_2
);
1070 compat_symbol (libc
, __nldbl_vswscanf
, vswscanf
, GLIBC_2_2
);
1071 compat_symbol (libc
, __nldbl_vwscanf
, vwscanf
, GLIBC_2_2
);
1072 compat_symbol (libc
, __nldbl_wscanf
, wscanf
, GLIBC_2_2
);
1074 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3)
1075 compat_symbol (libc
, __nldbl_strfmon_l
, strfmon_l
, GLIBC_2_3
);
1077 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3_4)
1078 compat_symbol (libc
, __nldbl___sprintf_chk
, __sprintf_chk
, GLIBC_2_3_4
);
1079 compat_symbol (libc
, __nldbl___vsprintf_chk
, __vsprintf_chk
, GLIBC_2_3_4
);
1080 compat_symbol (libc
, __nldbl___snprintf_chk
, __snprintf_chk
, GLIBC_2_3_4
);
1081 compat_symbol (libc
, __nldbl___vsnprintf_chk
, __vsnprintf_chk
, GLIBC_2_3_4
);
1082 compat_symbol (libc
, __nldbl___printf_chk
, __printf_chk
, GLIBC_2_3_4
);
1083 compat_symbol (libc
, __nldbl___fprintf_chk
, __fprintf_chk
, GLIBC_2_3_4
);
1084 compat_symbol (libc
, __nldbl___vprintf_chk
, __vprintf_chk
, GLIBC_2_3_4
);
1085 compat_symbol (libc
, __nldbl___vfprintf_chk
, __vfprintf_chk
, GLIBC_2_3_4
);