wchar-ldbl.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* -mlong-double-64 compatibility mode for <wchar.h> functions.
  2. Copyright (C) 2006-2021 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. __LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf)
  28. __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
  29. __LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
  30. # elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
  31. __LDBL_REDIR1_DECL (fwscanf, __isoc99_fwscanfieee128)
  32. __LDBL_REDIR1_DECL (wscanf, __isoc99_wscanfieee128)
  33. __LDBL_REDIR1_DECL (swscanf, __isoc99_swscanfieee128)
  34. # else
  35. # error bits/stdlib-ldbl.h included when no ldbl redirections are required.
  36. # endif
  37. # else
  38. __LDBL_REDIR_DECL (fwscanf);
  39. __LDBL_REDIR_DECL (wscanf);
  40. __LDBL_REDIR_DECL (swscanf);
  41. # endif
  42. #endif
  43. #ifdef __USE_ISOC99
  44. # ifdef __LDBL_COMPAT
  45. __LDBL_REDIR1_DECL (wcstold, wcstod);
  46. # else
  47. __LDBL_REDIR1_DECL (wcstold, __wcstoieee128)
  48. # endif
  49. # if !__GLIBC_USE (DEPRECATED_SCANF)
  50. # if defined __LDBL_COMPAT
  51. __LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf)
  52. __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
  53. __LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
  54. # elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
  55. __LDBL_REDIR1_DECL (vfwscanf, __isoc99_vfwscanfieee128)
  56. __LDBL_REDIR1_DECL (vwscanf, __isoc99_vwscanfieee128)
  57. __LDBL_REDIR1_DECL (vswscanf, __isoc99_vswscanfieee128)
  58. # else
  59. # error bits/stdlib-ldbl.h included when no ldbl redirections are required.
  60. # endif
  61. # else
  62. __LDBL_REDIR_DECL (vfwscanf);
  63. __LDBL_REDIR_DECL (vwscanf);
  64. __LDBL_REDIR_DECL (vswscanf);
  65. # endif
  66. #endif
  67. #ifdef __USE_GNU
  68. # ifdef __LDBL_COMPAT
  69. __LDBL_REDIR1_DECL (wcstold_l, wcstod_l);
  70. # else
  71. __LDBL_REDIR1_DECL (wcstold_l, __wcstoieee128_l)
  72. # endif
  73. #endif
  74. #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
  75. __LDBL_REDIR2_DECL (swprintf_chk)
  76. __LDBL_REDIR2_DECL (vswprintf_chk)
  77. # if __USE_FORTIFY_LEVEL > 1
  78. __LDBL_REDIR2_DECL (fwprintf_chk)
  79. __LDBL_REDIR2_DECL (wprintf_chk)
  80. __LDBL_REDIR2_DECL (vfwprintf_chk)
  81. __LDBL_REDIR2_DECL (vwprintf_chk)
  82. # endif
  83. #endif