stdio-ldbl.h 4.2 KB

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