master
  1/* -mlong-double-64 compatibility mode for stdio functions.
  2   Copyright (C) 2006-2025 Free Software Foundation, Inc.
  3   This file is part of the GNU C Library.
  4
  5   The GNU C Library is free software; you can redistribute it and/or
  6   modify it under the terms of the GNU Lesser General Public
  7   License as published by the Free Software Foundation; either
  8   version 2.1 of the License, or (at your option) any later version.
  9
 10   The GNU C Library is distributed in the hope that it will be useful,
 11   but WITHOUT ANY WARRANTY; without even the implied warranty of
 12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13   Lesser General Public License for more details.
 14
 15   You should have received a copy of the GNU Lesser General Public
 16   License along with the GNU C Library; if not, see
 17   <https://www.gnu.org/licenses/>.  */
 18
 19#ifndef _STDIO_H
 20# error "Never include <bits/stdio-ldbl.h> directly; use <stdio.h> instead."
 21#endif
 22
 23__LDBL_REDIR_DECL (fprintf)
 24__LDBL_REDIR_DECL (printf)
 25__LDBL_REDIR_DECL (sprintf)
 26__LDBL_REDIR_DECL (vfprintf)
 27__LDBL_REDIR_DECL (vprintf)
 28__LDBL_REDIR_DECL (vsprintf)
 29#if !__GLIBC_USE (DEPRECATED_SCANF)
 30# if defined __LDBL_COMPAT
 31#  if __GLIBC_USE (C23_STRTOL)
 32__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc23_fscanf)
 33__LDBL_REDIR1_DECL (scanf, __nldbl___isoc23_scanf)
 34__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc23_sscanf)
 35#  else
 36__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf)
 37__LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)
 38__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
 39#  endif
 40# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
 41#  if __GLIBC_USE (C23_STRTOL)
 42__LDBL_REDIR1_DECL (fscanf, __isoc23_fscanfieee128)
 43__LDBL_REDIR1_DECL (scanf, __isoc23_scanfieee128)
 44__LDBL_REDIR1_DECL (sscanf, __isoc23_sscanfieee128)
 45#  else
 46__LDBL_REDIR1_DECL (fscanf, __isoc99_fscanfieee128)
 47__LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128)
 48__LDBL_REDIR1_DECL (sscanf, __isoc99_sscanfieee128)
 49#  endif
 50# else
 51#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
 52# endif
 53#else
 54__LDBL_REDIR_DECL (fscanf)
 55__LDBL_REDIR_DECL (scanf)
 56__LDBL_REDIR_DECL (sscanf)
 57#endif
 58
 59#if defined __USE_ISOC99 || defined __USE_UNIX98
 60__LDBL_REDIR_DECL (snprintf)
 61__LDBL_REDIR_DECL (vsnprintf)
 62#endif
 63
 64#ifdef	__USE_ISOC99
 65# if !__GLIBC_USE (DEPRECATED_SCANF)
 66#  if defined __LDBL_COMPAT
 67#   if __GLIBC_USE (C23_STRTOL)
 68__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc23_vfscanf)
 69__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc23_vscanf)
 70__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc23_vsscanf)
 71#   else
 72__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf)
 73__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)
 74__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
 75#   endif
 76#  elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
 77#   if __GLIBC_USE (C23_STRTOL)
 78__LDBL_REDIR1_DECL (vfscanf, __isoc23_vfscanfieee128)
 79__LDBL_REDIR1_DECL (vscanf, __isoc23_vscanfieee128)
 80__LDBL_REDIR1_DECL (vsscanf, __isoc23_vsscanfieee128)
 81#   else
 82__LDBL_REDIR1_DECL (vfscanf, __isoc99_vfscanfieee128)
 83__LDBL_REDIR1_DECL (vscanf, __isoc99_vscanfieee128)
 84__LDBL_REDIR1_DECL (vsscanf, __isoc99_vsscanfieee128)
 85#   endif
 86#  else
 87#   error bits/stdlib-ldbl.h included when no ldbl redirections are required.
 88#  endif
 89# else
 90__LDBL_REDIR_DECL (vfscanf)
 91__LDBL_REDIR_DECL (vsscanf)
 92__LDBL_REDIR_DECL (vscanf)
 93# endif
 94#endif
 95
 96#ifdef __USE_XOPEN2K8
 97__LDBL_REDIR_DECL (vdprintf)
 98__LDBL_REDIR_DECL (dprintf)
 99#endif
100
101#ifdef __USE_GNU
102__LDBL_REDIR_DECL (vasprintf)
103__LDBL_REDIR2_DECL (asprintf)
104__LDBL_REDIR_DECL (asprintf)
105__LDBL_REDIR_DECL (obstack_printf)
106__LDBL_REDIR_DECL (obstack_vprintf)
107#endif
108
109#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
110__LDBL_REDIR2_DECL (sprintf_chk)
111__LDBL_REDIR2_DECL (vsprintf_chk)
112# if defined __USE_ISOC99 || defined __USE_UNIX98
113__LDBL_REDIR2_DECL (snprintf_chk)
114__LDBL_REDIR2_DECL (vsnprintf_chk)
115# endif
116# if __USE_FORTIFY_LEVEL > 1
117__LDBL_REDIR2_DECL (fprintf_chk)
118__LDBL_REDIR2_DECL (printf_chk)
119__LDBL_REDIR2_DECL (vfprintf_chk)
120__LDBL_REDIR2_DECL (vprintf_chk)
121#  ifdef __USE_XOPEN2K8
122__LDBL_REDIR2_DECL (dprintf_chk)
123__LDBL_REDIR2_DECL (vdprintf_chk)
124#  endif
125#  ifdef __USE_GNU
126__LDBL_REDIR2_DECL (asprintf_chk)
127__LDBL_REDIR2_DECL (vasprintf_chk)
128__LDBL_REDIR2_DECL (obstack_printf_chk)
129__LDBL_REDIR2_DECL (obstack_vprintf_chk)
130#  endif
131# endif
132#endif