2.5-18.1
[glibc.git] / sysdeps / ieee754 / ldbl-opt / nldbl-compat.c
blobf82c5f60bbb181bad37b8c6b556cd1eb7bc5fd98
1 /* *printf* family compatibility routines for IEEE double as long double
2 Copyright (C) 2006 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, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 #include <stdarg.h>
22 #include <stdio.h>
23 #include <libioP.h>
24 #include <wchar.h>
25 #include <printf.h>
26 #include <monetary.h>
27 #include <locale/localeinfo.h>
28 #include <sys/syslog.h>
29 #include <bits/libc-lock.h>
31 #include "nldbl-compat.h"
33 libc_hidden_proto (__nldbl_vfprintf)
34 libc_hidden_proto (__nldbl_vsscanf)
35 libc_hidden_proto (__nldbl_vsprintf)
36 libc_hidden_proto (__nldbl_vfscanf)
37 libc_hidden_proto (__nldbl_vfwscanf)
38 libc_hidden_proto (__nldbl_vdprintf)
39 libc_hidden_proto (__nldbl_vswscanf)
40 libc_hidden_proto (__nldbl_vfwprintf)
41 libc_hidden_proto (__nldbl_vswprintf)
42 libc_hidden_proto (__nldbl_vsnprintf)
43 libc_hidden_proto (__nldbl_vasprintf)
44 libc_hidden_proto (__nldbl_obstack_vprintf)
45 libc_hidden_proto (__nldbl___vfwprintf_chk)
46 libc_hidden_proto (__nldbl___vsnprintf_chk)
47 libc_hidden_proto (__nldbl___vfprintf_chk)
48 libc_hidden_proto (__nldbl___vsyslog_chk)
49 libc_hidden_proto (__nldbl___vsprintf_chk)
50 libc_hidden_proto (__nldbl___vswprintf_chk)
51 libc_hidden_proto (__nldbl___vstrfmon)
52 libc_hidden_proto (__nldbl___vstrfmon_l)
54 static void
55 __nldbl_cleanup (void *arg)
57 __no_long_double = 0;
60 #define set_no_long_double() \
61 __libc_cleanup_push (__nldbl_cleanup, NULL); __no_long_double = 1
62 #define clear_no_long_double() \
63 __no_long_double = 0; __libc_cleanup_pop (0)
65 /* Compatibility with IEEE double as long double.
66 IEEE quad long double is used by default for most programs, so
67 we don't need to split this into one file per function for the
68 sake of statically linked programs. */
70 int
71 attribute_compat_text_section
72 __nldbl___asprintf (char **string_ptr, const char *fmt, ...)
74 va_list arg;
75 int done;
77 va_start (arg, fmt);
78 done = __nldbl_vasprintf (string_ptr, fmt, arg);
79 va_end (arg);
81 return done;
83 weak_alias (__nldbl___asprintf, __nldbl_asprintf)
85 int
86 attribute_compat_text_section
87 __nldbl_dprintf (int d, const char *fmt, ...)
89 va_list arg;
90 int done;
92 va_start (arg, fmt);
93 done = __nldbl_vdprintf (d, fmt, arg);
94 va_end (arg);
96 return done;
99 int
100 attribute_compat_text_section
101 __nldbl_fprintf (FILE *stream, const char *fmt, ...)
103 va_list arg;
104 int done;
106 va_start (arg, fmt);
107 done = __nldbl_vfprintf (stream, fmt, arg);
108 va_end (arg);
110 return done;
112 weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
115 attribute_compat_text_section weak_function
116 __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
118 va_list arg;
119 int done;
121 va_start (arg, fmt);
122 done = __nldbl_vfwprintf (stream, fmt, arg);
123 va_end (arg);
125 return done;
129 attribute_compat_text_section
130 __nldbl_printf (const char *fmt, ...)
132 va_list arg;
133 int done;
135 va_start (arg, fmt);
136 done = __nldbl_vfprintf (stdout, fmt, arg);
137 va_end (arg);
139 return done;
141 strong_alias (__nldbl_printf, __nldbl__IO_printf)
144 attribute_compat_text_section
145 __nldbl_sprintf (char *s, const char *fmt, ...)
147 va_list arg;
148 int done;
150 va_start (arg, fmt);
151 done = __nldbl_vsprintf (s, fmt, arg);
152 va_end (arg);
154 return done;
156 strong_alias (__nldbl_sprintf, __nldbl__IO_sprintf)
159 attribute_compat_text_section
160 __nldbl_vfprintf (FILE *s, const char *fmt, va_list ap)
162 int done;
163 set_no_long_double ();
164 done = INTUSE(_IO_vfprintf) (s, fmt, ap);
165 clear_no_long_double ();
166 return done;
168 libc_hidden_def (__nldbl_vfprintf)
169 strong_alias (__nldbl_vfprintf, __nldbl__IO_vfprintf)
172 attribute_compat_text_section
173 __nldbl__IO_vsprintf (char *string, const char *fmt, va_list ap)
175 int done;
176 __no_long_double = 1;
177 done = INTUSE(_IO_vsprintf) (string, fmt, ap);
178 __no_long_double = 0;
179 return done;
181 weak_alias (__nldbl__IO_vsprintf, __nldbl_vsprintf)
182 libc_hidden_def (__nldbl_vsprintf)
185 attribute_compat_text_section
186 __nldbl_obstack_vprintf (struct obstack *obstack, const char *fmt,
187 va_list ap)
189 int done;
190 __no_long_double = 1;
191 done = _IO_obstack_vprintf (obstack, fmt, ap);
192 __no_long_double = 0;
193 return done;
195 libc_hidden_def (__nldbl_obstack_vprintf)
198 attribute_compat_text_section
199 __nldbl_obstack_printf (struct obstack *obstack, const char *fmt, ...)
201 int result;
202 va_list ap;
203 va_start (ap, fmt);
204 result = __nldbl_obstack_vprintf (obstack, fmt, ap);
205 va_end (ap);
206 return result;
210 attribute_compat_text_section weak_function
211 __nldbl_snprintf (char *s, size_t maxlen, const char *fmt, ...)
213 va_list arg;
214 int done;
216 va_start (arg, fmt);
217 done = __nldbl_vsnprintf (s, maxlen, fmt, arg);
218 va_end (arg);
220 return done;
224 attribute_compat_text_section
225 __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
227 va_list arg;
228 int done;
230 va_start (arg, fmt);
231 done = __nldbl_vswprintf (s, n, fmt, arg);
232 va_end (arg);
234 return done;
238 attribute_compat_text_section weak_function
239 __nldbl_vasprintf (char **result_ptr, const char *fmt, va_list ap)
241 int res;
242 __no_long_double = 1;
243 res = _IO_vasprintf (result_ptr, fmt, ap);
244 __no_long_double = 0;
245 return res;
247 libc_hidden_def (__nldbl_vasprintf)
250 attribute_compat_text_section
251 __nldbl_vdprintf (int d, const char *fmt, va_list arg)
253 int res;
254 set_no_long_double ();
255 res = _IO_vdprintf (d, fmt, arg);
256 clear_no_long_double ();
257 return res;
259 libc_hidden_def (__nldbl_vdprintf)
262 attribute_compat_text_section weak_function
263 __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
265 int res;
266 set_no_long_double ();
267 res = _IO_vfwprintf (s, fmt, ap);
268 clear_no_long_double ();
269 return res;
271 libc_hidden_def (__nldbl_vfwprintf)
274 attribute_compat_text_section
275 __nldbl_vprintf (const char *fmt, va_list ap)
277 return __nldbl_vfprintf (stdout, fmt, ap);
281 attribute_compat_text_section
282 __nldbl_vsnprintf (char *string, size_t maxlen, const char *fmt,
283 va_list ap)
285 int res;
286 __no_long_double = 1;
287 res = _IO_vsnprintf (string, maxlen, fmt, ap);
288 __no_long_double = 0;
289 return res;
291 libc_hidden_def (__nldbl_vsnprintf)
292 weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
295 attribute_compat_text_section weak_function
296 __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
297 va_list ap)
299 int res;
300 __no_long_double = 1;
301 res = _IO_vswprintf (string, maxlen, fmt, ap);
302 __no_long_double = 0;
303 return res;
305 libc_hidden_def (__nldbl_vswprintf)
308 attribute_compat_text_section
309 __nldbl_vwprintf (const wchar_t *fmt, va_list ap)
311 return __nldbl_vfwprintf (stdout, fmt, ap);
315 attribute_compat_text_section
316 __nldbl_wprintf (const wchar_t *fmt, ...)
318 va_list arg;
319 int done;
321 va_start (arg, fmt);
322 done = __nldbl_vfwprintf (stdout, fmt, arg);
323 va_end (arg);
325 return done;
329 attribute_compat_text_section
330 __nldbl__IO_vfscanf (FILE *s, const char *fmt, _IO_va_list ap,
331 int *errp)
333 int res;
334 set_no_long_double ();
335 res = INTUSE(_IO_vfscanf) (s, fmt, ap, errp);
336 clear_no_long_double ();
337 return res;
341 attribute_compat_text_section
342 __nldbl___vfscanf (FILE *s, const char *fmt, va_list ap)
344 int res;
345 set_no_long_double ();
346 res = INTUSE(_IO_vfscanf) (s, fmt, ap, NULL);
347 clear_no_long_double ();
348 return res;
350 weak_alias (__nldbl___vfscanf, __nldbl_vfscanf)
351 libc_hidden_def (__nldbl_vfscanf)
354 attribute_compat_text_section
355 __nldbl_sscanf (const char *s, const char *fmt, ...)
357 va_list arg;
358 int done;
360 va_start (arg, fmt);
361 done = __nldbl_vsscanf (s, fmt, arg);
362 va_end (arg);
364 return done;
366 strong_alias (__nldbl_sscanf, __nldbl__IO_sscanf)
369 attribute_compat_text_section
370 __nldbl___vsscanf (const char *string, const char *fmt, va_list ap)
372 int res;
373 __no_long_double = 1;
374 res = _IO_vsscanf (string, fmt, ap);
375 __no_long_double = 0;
376 return res;
378 weak_alias (__nldbl___vsscanf, __nldbl_vsscanf)
379 libc_hidden_def (__nldbl_vsscanf)
382 attribute_compat_text_section weak_function
383 __nldbl_vscanf (const char *fmt, va_list ap)
385 return __nldbl_vfscanf (stdin, fmt, ap);
389 attribute_compat_text_section
390 __nldbl_fscanf (FILE *stream, const char *fmt, ...)
392 va_list arg;
393 int done;
395 va_start (arg, fmt);
396 done = __nldbl_vfscanf (stream, fmt, arg);
397 va_end (arg);
399 return done;
403 attribute_compat_text_section
404 __nldbl_scanf (const char *fmt, ...)
406 va_list arg;
407 int done;
409 va_start (arg, fmt);
410 done = __nldbl_vfscanf (stdin, fmt, arg);
411 va_end (arg);
413 return done;
417 attribute_compat_text_section
418 __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
420 int res;
421 set_no_long_double ();
422 res = _IO_vfwscanf (s, fmt, ap, NULL);
423 clear_no_long_double ();
424 return res;
426 libc_hidden_def (__nldbl_vfwscanf)
429 attribute_compat_text_section
430 __nldbl_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
432 va_list arg;
433 int done;
435 va_start (arg, fmt);
436 done = __nldbl_vswscanf (s, fmt, arg);
437 va_end (arg);
439 return done;
443 attribute_compat_text_section
444 __nldbl_vswscanf (const wchar_t *string, const wchar_t *fmt, va_list ap)
446 int res;
447 __no_long_double = 1;
448 res = vswscanf (string, fmt, ap);
449 __no_long_double = 0;
450 return res;
452 libc_hidden_def (__nldbl_vswscanf)
455 attribute_compat_text_section weak_function
456 __nldbl_vwscanf (const wchar_t *fmt, va_list ap)
458 return __nldbl_vfwscanf (stdin, fmt, ap);
462 attribute_compat_text_section
463 __nldbl_fwscanf (FILE *stream, const wchar_t *fmt, ...)
465 va_list arg;
466 int done;
468 va_start (arg, fmt);
469 done = __nldbl_vfwscanf (stream, fmt, arg);
470 va_end (arg);
472 return done;
476 attribute_compat_text_section
477 __nldbl_wscanf (const wchar_t *fmt, ...)
479 va_list arg;
480 int done;
482 va_start (arg, fmt);
483 done = __nldbl_vfwscanf (stdin, fmt, arg);
484 va_end (arg);
486 return done;
490 attribute_compat_text_section
491 __nldbl___fprintf_chk (FILE *stream, int flag, const char *fmt, ...)
493 va_list arg;
494 int done;
496 va_start (arg, fmt);
497 done = __nldbl___vfprintf_chk (stream, flag, fmt, arg);
498 va_end (arg);
500 return done;
504 attribute_compat_text_section
505 __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
507 va_list arg;
508 int done;
510 va_start (arg, fmt);
511 done = __nldbl___vfwprintf_chk (stream, flag, fmt, arg);
512 va_end (arg);
514 return done;
518 attribute_compat_text_section
519 __nldbl___printf_chk (int flag, const char *fmt, ...)
521 va_list arg;
522 int done;
524 va_start (arg, fmt);
525 done = __nldbl___vfprintf_chk (stdout, flag, fmt, arg);
526 va_end (arg);
528 return done;
532 attribute_compat_text_section
533 __nldbl___snprintf_chk (char *s, size_t maxlen, int flag, size_t slen,
534 const char *fmt, ...)
536 va_list arg;
537 int done;
539 va_start (arg, fmt);
540 done = __nldbl___vsnprintf_chk (s, maxlen, flag, slen, fmt, arg);
541 va_end (arg);
543 return done;
547 attribute_compat_text_section
548 __nldbl___sprintf_chk (char *s, int flag, size_t slen, const char *fmt, ...)
550 va_list arg;
551 int done;
553 va_start (arg, fmt);
554 done = __nldbl___vsprintf_chk (s, flag, slen, fmt, arg);
555 va_end (arg);
557 return done;
561 attribute_compat_text_section
562 __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
563 const wchar_t *fmt, ...)
565 va_list arg;
566 int done;
568 va_start (arg, fmt);
569 done = __nldbl___vswprintf_chk (s, n, flag, slen, fmt, arg);
570 va_end (arg);
572 return done;
576 attribute_compat_text_section
577 __nldbl___vfprintf_chk (FILE *s, int flag, const char *fmt, va_list ap)
579 int res;
580 set_no_long_double ();
581 res = __vfprintf_chk (s, flag, fmt, ap);
582 clear_no_long_double ();
583 return res;
585 libc_hidden_def (__nldbl___vfprintf_chk)
588 attribute_compat_text_section
589 __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
591 int res;
592 set_no_long_double ();
593 res = __vfwprintf_chk (s, flag, fmt, ap);
594 clear_no_long_double ();
595 return res;
597 libc_hidden_def (__nldbl___vfwprintf_chk)
600 attribute_compat_text_section
601 __nldbl___vprintf_chk (int flag, const char *fmt, va_list ap)
603 return __nldbl___vfprintf_chk (stdout, flag, fmt, ap);
607 attribute_compat_text_section
608 __nldbl___vsnprintf_chk (char *string, size_t maxlen, int flag, size_t slen,
609 const char *fmt, va_list ap)
611 int res;
612 __no_long_double = 1;
613 res = __vsnprintf_chk (string, maxlen, flag, slen, fmt, ap);
614 __no_long_double = 0;
615 return res;
617 libc_hidden_def (__nldbl___vsnprintf_chk)
620 attribute_compat_text_section
621 __nldbl___vsprintf_chk (char *string, int flag, size_t slen, const char *fmt,
622 va_list ap)
624 int res;
625 __no_long_double = 1;
626 res = __vsprintf_chk (string, flag, slen, fmt, ap);
627 __no_long_double = 0;
628 return res;
630 libc_hidden_def (__nldbl___vsprintf_chk)
633 attribute_compat_text_section
634 __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
635 const wchar_t *fmt, va_list ap)
637 int res;
638 __no_long_double = 1;
639 res = __vswprintf_chk (string, maxlen, flag, slen, fmt, ap);
640 __no_long_double = 0;
641 return res;
643 libc_hidden_def (__nldbl___vswprintf_chk)
646 attribute_compat_text_section
647 __nldbl___vwprintf_chk (int flag, const wchar_t *fmt, va_list ap)
649 return __nldbl___vfwprintf_chk (stdout, flag, fmt, ap);
653 attribute_compat_text_section
654 __nldbl___wprintf_chk (int flag, const wchar_t *fmt, ...)
656 va_list arg;
657 int done;
659 va_start (arg, fmt);
660 done = __nldbl___vfwprintf_chk (stdout, flag, fmt, arg);
661 va_end (arg);
663 return done;
666 extern __typeof (printf_size) __printf_size;
669 attribute_compat_text_section
670 __nldbl_printf_size (FILE *fp, const struct printf_info *info,
671 const void *const *args)
673 struct printf_info info_no_ldbl = *info;
675 info_no_ldbl.is_long_double = 0;
676 return __printf_size (fp, &info_no_ldbl, args);
679 extern __typeof (__printf_fp) ___printf_fp;
682 attribute_compat_text_section
683 __nldbl___printf_fp (FILE *fp, const struct printf_info *info,
684 const void *const *args)
686 struct printf_info info_no_ldbl = *info;
688 info_no_ldbl.is_long_double = 0;
689 return ___printf_fp (fp, &info_no_ldbl, args);
692 ssize_t
693 attribute_compat_text_section
694 __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...)
696 va_list ap;
697 ssize_t res;
699 va_start (ap, format);
700 res = __nldbl___vstrfmon (s, maxsize, format, ap);
701 va_end (ap);
702 return res;
705 ssize_t
706 attribute_compat_text_section
707 __nldbl___strfmon_l (char *s, size_t maxsize, __locale_t loc,
708 const char *format, ...)
710 va_list ap;
711 ssize_t res;
713 va_start (ap, format);
714 res = __nldbl___vstrfmon_l (s, maxsize, loc, format, ap);
715 va_end (ap);
716 return res;
718 weak_alias (__nldbl___strfmon_l, __nldbl_strfmon_l)
720 ssize_t
721 attribute_compat_text_section
722 __nldbl___vstrfmon (char *s, size_t maxsize, const char *format, va_list ap)
724 ssize_t res;
725 __no_long_double = 1;
726 res = __vstrfmon_l (s, maxsize, _NL_CURRENT_LOCALE, format, ap);
727 __no_long_double = 0;
728 va_end (ap);
729 return res;
731 libc_hidden_def (__nldbl___vstrfmon)
733 ssize_t
734 attribute_compat_text_section
735 __nldbl___vstrfmon_l (char *s, size_t maxsize, __locale_t loc,
736 const char *format, va_list ap)
738 ssize_t res;
739 __no_long_double = 1;
740 res = __vstrfmon_l (s, maxsize, loc, format, ap);
741 __no_long_double = 0;
742 va_end (ap);
743 return res;
745 libc_hidden_def (__nldbl___vstrfmon_l)
747 void
748 attribute_compat_text_section
749 __nldbl_syslog (int pri, const char *fmt, ...)
751 va_list ap;
752 va_start (ap, fmt);
753 __nldbl___vsyslog_chk (pri, -1, fmt, ap);
754 va_end (ap);
757 void
758 attribute_compat_text_section
759 __nldbl___syslog_chk (int pri, int flag, const char *fmt, ...)
761 va_list ap;
763 va_start (ap, fmt);
764 __nldbl___vsyslog_chk (pri, flag, fmt, ap);
765 va_end(ap);
768 void
769 attribute_compat_text_section
770 __nldbl___vsyslog_chk (int pri, int flag, const char *fmt, va_list ap)
772 set_no_long_double ();
773 __vsyslog_chk (pri, flag, fmt, ap);
774 clear_no_long_double ();
776 libc_hidden_def (__nldbl___vsyslog_chk)
778 void
779 attribute_compat_text_section
780 __nldbl_vsyslog (int pri, const char *fmt, va_list ap)
782 __nldbl___vsyslog_chk (pri, -1, fmt, ap);
785 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
786 compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0);
787 compat_symbol (libc, __nldbl__IO_sprintf, _IO_sprintf, GLIBC_2_0);
788 compat_symbol (libc, __nldbl__IO_vfprintf, _IO_vfprintf, GLIBC_2_0);
789 compat_symbol (libc, __nldbl__IO_vsprintf, _IO_vsprintf, GLIBC_2_0);
790 compat_symbol (libc, __nldbl_dprintf, dprintf, GLIBC_2_0);
791 compat_symbol (libc, __nldbl_fprintf, fprintf, GLIBC_2_0);
792 compat_symbol (libc, __nldbl_printf, printf, GLIBC_2_0);
793 compat_symbol (libc, __nldbl_sprintf, sprintf, GLIBC_2_0);
794 compat_symbol (libc, __nldbl_vfprintf, vfprintf, GLIBC_2_0);
795 compat_symbol (libc, __nldbl_vprintf, vprintf, GLIBC_2_0);
796 compat_symbol (libc, __nldbl__IO_fprintf, _IO_fprintf, GLIBC_2_0);
797 compat_symbol (libc, __nldbl___vsnprintf, __vsnprintf, GLIBC_2_0);
798 compat_symbol (libc, __nldbl_asprintf, asprintf, GLIBC_2_0);
799 compat_symbol (libc, __nldbl_obstack_printf, obstack_printf, GLIBC_2_0);
800 compat_symbol (libc, __nldbl_obstack_vprintf, obstack_vprintf, GLIBC_2_0);
801 compat_symbol (libc, __nldbl_snprintf, snprintf, GLIBC_2_0);
802 compat_symbol (libc, __nldbl_vasprintf, vasprintf, GLIBC_2_0);
803 compat_symbol (libc, __nldbl_vdprintf, vdprintf, GLIBC_2_0);
804 compat_symbol (libc, __nldbl_vsnprintf, vsnprintf, GLIBC_2_0);
805 compat_symbol (libc, __nldbl_vsprintf, vsprintf, GLIBC_2_0);
806 compat_symbol (libc, __nldbl__IO_sscanf, _IO_sscanf, GLIBC_2_0);
807 compat_symbol (libc, __nldbl__IO_vfscanf, _IO_vfscanf, GLIBC_2_0);
808 compat_symbol (libc, __nldbl___vfscanf, __vfscanf, GLIBC_2_0);
809 compat_symbol (libc, __nldbl___vsscanf, __vsscanf, GLIBC_2_0);
810 compat_symbol (libc, __nldbl_fscanf, fscanf, GLIBC_2_0);
811 compat_symbol (libc, __nldbl_scanf, scanf, GLIBC_2_0);
812 compat_symbol (libc, __nldbl_sscanf, sscanf, GLIBC_2_0);
813 compat_symbol (libc, __nldbl_vfscanf, vfscanf, GLIBC_2_0);
814 compat_symbol (libc, __nldbl_vscanf, vscanf, GLIBC_2_0);
815 compat_symbol (libc, __nldbl_vsscanf, vsscanf, GLIBC_2_0);
816 compat_symbol (libc, __nldbl___printf_fp, __printf_fp, GLIBC_2_0);
817 compat_symbol (libc, __nldbl_strfmon, strfmon, GLIBC_2_0);
818 compat_symbol (libc, __nldbl_syslog, syslog, GLIBC_2_0);
819 compat_symbol (libc, __nldbl_vsyslog, vsyslog, GLIBC_2_0);
820 #endif
821 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_1)
822 compat_symbol (libc, __nldbl___asprintf, __asprintf, GLIBC_2_1);
823 compat_symbol (libc, __nldbl_printf_size, printf_size, GLIBC_2_1);
824 compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1);
825 #endif
826 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
827 compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2);
828 compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
829 compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2);
830 compat_symbol (libc, __nldbl_fwprintf, fwprintf, GLIBC_2_2);
831 compat_symbol (libc, __nldbl_vfwprintf, vfwprintf, GLIBC_2_2);
832 compat_symbol (libc, __nldbl_vswprintf, vswprintf, GLIBC_2_2);
833 compat_symbol (libc, __nldbl_fwscanf, fwscanf, GLIBC_2_2);
834 compat_symbol (libc, __nldbl_swscanf, swscanf, GLIBC_2_2);
835 compat_symbol (libc, __nldbl_vfwscanf, vfwscanf, GLIBC_2_2);
836 compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2);
837 compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2);
838 compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2);
839 #endif
840 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3)
841 compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3);
842 #endif
843 #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3_4)
844 compat_symbol (libc, __nldbl___sprintf_chk, __sprintf_chk, GLIBC_2_3_4);
845 compat_symbol (libc, __nldbl___vsprintf_chk, __vsprintf_chk, GLIBC_2_3_4);
846 compat_symbol (libc, __nldbl___snprintf_chk, __snprintf_chk, GLIBC_2_3_4);
847 compat_symbol (libc, __nldbl___vsnprintf_chk, __vsnprintf_chk, GLIBC_2_3_4);
848 compat_symbol (libc, __nldbl___printf_chk, __printf_chk, GLIBC_2_3_4);
849 compat_symbol (libc, __nldbl___fprintf_chk, __fprintf_chk, GLIBC_2_3_4);
850 compat_symbol (libc, __nldbl___vprintf_chk, __vprintf_chk, GLIBC_2_3_4);
851 compat_symbol (libc, __nldbl___vfprintf_chk, __vfprintf_chk, GLIBC_2_3_4);
852 #endif