| 1 | /* Checking macros for wchar functions. Declarations only. |
| 2 | Copyright (C) 2004-2023 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 _BITS_WCHAR2_DECL_H |
| 20 | #define _BITS_WCHAR2_DECL_H 1 |
| 21 | |
| 22 | #ifndef _WCHAR_H |
| 23 | # error "Never include <bits/wchar2-decl.h> directly; use <wchar.h> instead." |
| 24 | #endif |
| 25 | |
| 26 | |
| 27 | extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, |
| 28 | const wchar_t *__restrict __s2, size_t __n, |
| 29 | size_t __ns1) __THROW; |
| 30 | extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2, |
| 31 | size_t __n, size_t __ns1) __THROW; |
| 32 | |
| 33 | |
| 34 | #ifdef __USE_GNU |
| 35 | |
| 36 | extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, |
| 37 | const wchar_t *__restrict __s2, size_t __n, |
| 38 | size_t __ns1) __THROW; |
| 39 | |
| 40 | #endif |
| 41 | |
| 42 | |
| 43 | extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, |
| 44 | size_t __ns) __THROW; |
| 45 | extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, |
| 46 | const wchar_t *__restrict __src, |
| 47 | size_t __n) __THROW; |
| 48 | extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, |
| 49 | const wchar_t *__restrict __src, |
| 50 | size_t __destlen) __THROW; |
| 51 | extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, |
| 52 | const wchar_t *__restrict __src, size_t __n, |
| 53 | size_t __destlen) __THROW; |
| 54 | extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, |
| 55 | const wchar_t *__restrict __src, size_t __n, |
| 56 | size_t __destlen) __THROW; |
| 57 | extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, |
| 58 | const wchar_t *__restrict __src, |
| 59 | size_t __destlen) __THROW; |
| 60 | extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, |
| 61 | const wchar_t *__restrict __src, |
| 62 | size_t __n, size_t __destlen) __THROW; |
| 63 | extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, |
| 64 | int __flag, size_t __s_len, |
| 65 | const wchar_t *__restrict __format, ...) |
| 66 | __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */; |
| 67 | extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, |
| 68 | int __flag, size_t __s_len, |
| 69 | const wchar_t *__restrict __format, |
| 70 | __gnuc_va_list __arg) |
| 71 | __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */; |
| 72 | |
| 73 | #if __USE_FORTIFY_LEVEL > 1 |
| 74 | |
| 75 | extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, |
| 76 | const wchar_t *__restrict __format, ...); |
| 77 | extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format, |
| 78 | ...); |
| 79 | extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, |
| 80 | const wchar_t *__restrict __format, |
| 81 | __gnuc_va_list __ap); |
| 82 | extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format, |
| 83 | __gnuc_va_list __ap); |
| 84 | |
| 85 | #endif |
| 86 | |
| 87 | extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, |
| 88 | __FILE *__restrict __stream) __wur; |
| 89 | |
| 90 | #ifdef __USE_GNU |
| 91 | |
| 92 | extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, |
| 93 | int __n, __FILE *__restrict __stream) |
| 94 | __wur; |
| 95 | |
| 96 | #endif |
| 97 | |
| 98 | extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, |
| 99 | mbstate_t *__restrict __p, |
| 100 | size_t __buflen) __THROW __wur; |
| 101 | extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, |
| 102 | const char **__restrict __src, |
| 103 | size_t __len, mbstate_t *__restrict __ps, |
| 104 | size_t __dstlen) __THROW; |
| 105 | extern size_t __wcsrtombs_chk (char *__restrict __dst, |
| 106 | const wchar_t **__restrict __src, |
| 107 | size_t __len, mbstate_t *__restrict __ps, |
| 108 | size_t __dstlen) __THROW; |
| 109 | |
| 110 | #ifdef __USE_XOPEN2K8 |
| 111 | |
| 112 | extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, |
| 113 | const char **__restrict __src, size_t __nmc, |
| 114 | size_t __len, mbstate_t *__restrict __ps, |
| 115 | size_t __dstlen) __THROW; |
| 116 | extern size_t __wcsnrtombs_chk (char *__restrict __dst, |
| 117 | const wchar_t **__restrict __src, |
| 118 | size_t __nwc, size_t __len, |
| 119 | mbstate_t *__restrict __ps, size_t __dstlen) |
| 120 | __THROW; |
| 121 | |
| 122 | #endif |
| 123 | |
| 124 | #endif /* bits/wchar2-decl.h. */ |
| 125 | |