wchar-ldbl.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* -mlong-double-64 compatibility mode for <wchar.h> 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 _WCHAR_H
  16. # error "Never include <bits/wchar-ldbl.h> directly; use <wchar.h> instead."
  17. #endif
  18. #if defined __USE_ISOC95 || defined __USE_UNIX98
  19. __LDBL_REDIR_DECL (fwprintf);
  20. __LDBL_REDIR_DECL (wprintf);
  21. __LDBL_REDIR_DECL (swprintf);
  22. __LDBL_REDIR_DECL (vfwprintf);
  23. __LDBL_REDIR_DECL (vwprintf);
  24. __LDBL_REDIR_DECL (vswprintf);
  25. # if !__GLIBC_USE (DEPRECATED_SCANF)
  26. # if defined __LDBL_COMPAT
  27. # if __GLIBC_USE (C23_STRTOL)
  28. __LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc23_fwscanf)
  29. __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc23_wscanf)
  30. __LDBL_REDIR1_DECL (swscanf, __nldbl___isoc23_swscanf)
  31. # else
  32. __LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf)
  33. __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
  34. __LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
  35. # endif
  36. # elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
  37. # if __GLIBC_USE (C23_STRTOL)
  38. __LDBL_REDIR1_DECL (fwscanf, __isoc23_fwscanfieee128)
  39. __LDBL_REDIR1_DECL (wscanf, __isoc23_wscanfieee128)
  40. __LDBL_REDIR1_DECL (swscanf, __isoc23_swscanfieee128)
  41. # else
  42. __LDBL_REDIR1_DECL (fwscanf, __isoc99_fwscanfieee128)
  43. __LDBL_REDIR1_DECL (wscanf, __isoc99_wscanfieee128)
  44. __LDBL_REDIR1_DECL (swscanf, __isoc99_swscanfieee128)
  45. # endif
  46. # else
  47. # error bits/stdlib-ldbl.h included when no ldbl redirections are required.
  48. # endif
  49. # else
  50. __LDBL_REDIR_DECL (fwscanf);
  51. __LDBL_REDIR_DECL (wscanf);
  52. __LDBL_REDIR_DECL (swscanf);
  53. # endif
  54. #endif
  55. #ifdef __USE_ISOC99
  56. # ifdef __LDBL_COMPAT
  57. __LDBL_REDIR1_DECL (wcstold, wcstod);
  58. # else
  59. __LDBL_REDIR1_DECL (wcstold, __wcstoieee128)
  60. # endif
  61. # if !__GLIBC_USE (DEPRECATED_SCANF)
  62. # if defined __LDBL_COMPAT
  63. # if __GLIBC_USE (C23_STRTOL)
  64. __LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc23_vfwscanf)
  65. __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc23_vwscanf)
  66. __LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc23_vswscanf)
  67. # else
  68. __LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf)
  69. __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
  70. __LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
  71. # endif
  72. # elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
  73. # if __GLIBC_USE (C23_STRTOL)
  74. __LDBL_REDIR1_DECL (vfwscanf, __isoc23_vfwscanfieee128)
  75. __LDBL_REDIR1_DECL (vwscanf, __isoc23_vwscanfieee128)
  76. __LDBL_REDIR1_DECL (vswscanf, __isoc23_vswscanfieee128)
  77. # else
  78. __LDBL_REDIR1_DECL (vfwscanf, __isoc99_vfwscanfieee128)
  79. __LDBL_REDIR1_DECL (vwscanf, __isoc99_vwscanfieee128)
  80. __LDBL_REDIR1_DECL (vswscanf, __isoc99_vswscanfieee128)
  81. # endif
  82. # else
  83. # error bits/stdlib-ldbl.h included when no ldbl redirections are required.
  84. # endif
  85. # else
  86. __LDBL_REDIR_DECL (vfwscanf);
  87. __LDBL_REDIR_DECL (vwscanf);
  88. __LDBL_REDIR_DECL (vswscanf);
  89. # endif
  90. #endif
  91. #ifdef __USE_GNU
  92. # ifdef __LDBL_COMPAT
  93. __LDBL_REDIR1_DECL (wcstold_l, wcstod_l);
  94. # else
  95. __LDBL_REDIR1_DECL (wcstold_l, __wcstoieee128_l)
  96. # endif
  97. #endif
  98. #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
  99. __LDBL_REDIR2_DECL (swprintf_chk)
  100. __LDBL_REDIR2_DECL (vswprintf_chk)
  101. # if __USE_FORTIFY_LEVEL > 1
  102. __LDBL_REDIR2_DECL (fwprintf_chk)
  103. __LDBL_REDIR2_DECL (wprintf_chk)
  104. __LDBL_REDIR2_DECL (vfwprintf_chk)
  105. __LDBL_REDIR2_DECL (vwprintf_chk)
  106. # endif
  107. #endif