diff options
Diffstat (limited to 'wcsmbs')
-rw-r--r-- | wcsmbs/Makefile | 3 | ||||
-rw-r--r-- | wcsmbs/bits/wchar2.h | 16 | ||||
-rw-r--r-- | wcsmbs/tst-wchar-h.c | 9 |
3 files changed, 19 insertions, 9 deletions
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index d033de931c..78b3e5b4e7 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -40,7 +40,7 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \ wcsmbsload mbsrtowcs_l tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ - tst-wcrtomb tst-wcpncpy tst-mbsrtowcs + tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h include ../Rules @@ -62,6 +62,7 @@ CFLAGS-wcstoull_l.c = $(strtox-CFLAGS) CFLAGS-wcstod_l.c = $(strtox-CFLAGS) CFLAGS-wcstold_l.c = $(strtox-CFLAGS) CFLAGS-wcstof_l.c = $(strtox-CFLAGS) +CFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2 tst-btowc-ENV = LOCPATH=$(common-objpfx)localedata tst-mbrtowc-ENV = LOCPATH=$(common-objpfx)localedata diff --git a/wcsmbs/bits/wchar2.h b/wcsmbs/bits/wchar2.h index 29bfad0110..5e6396f048 100644 --- a/wcsmbs/bits/wchar2.h +++ b/wcsmbs/bits/wchar2.h @@ -230,11 +230,11 @@ vswprintf (wchar_t *__s, size_t __n, __const wchar_t *__format, #if __USE_FORTIFY_LEVEL > 1 -extern int __fwprintf_chk (FILE *__restrict __stream, int __flag, +extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, __const wchar_t *__restrict __format, ...); extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format, ...); -extern int __vfwprintf_chk (FILE *__restrict __stream, int __flag, +extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, __const wchar_t *__restrict __format, __gnuc_va_list __ap); extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, @@ -252,13 +252,13 @@ extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, #endif extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, - FILE *__restrict __stream) __wur; + __FILE *__restrict __stream) __wur; extern wchar_t *__REDIRECT (__fgetws_alias, (wchar_t *__restrict __s, int __n, - FILE *__restrict __stream), fgetws) __wur; + __FILE *__restrict __stream), fgetws) __wur; extern __always_inline __wur wchar_t * -fgetws (wchar_t *__restrict __s, int __n, FILE *__restrict __stream) +fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) { if (__bos (__s) != (size_t) -1 && (!__builtin_constant_p (__n) || (size_t) __n > __bos (__s))) @@ -268,15 +268,15 @@ fgetws (wchar_t *__restrict __s, int __n, FILE *__restrict __stream) #ifdef __USE_GNU extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, - int __n, FILE *__restrict __stream) + int __n, __FILE *__restrict __stream) __wur; extern wchar_t *__REDIRECT (__fgetws_unlocked_alias, (wchar_t *__restrict __s, int __n, - FILE *__restrict __stream), fgetws_unlocked) + __FILE *__restrict __stream), fgetws_unlocked) __wur; extern __always_inline __wur wchar_t * -fgetws_unlocked (wchar_t *__restrict __s, int __n, FILE *__restrict __stream) +fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) { if (__bos (__s) != (size_t) -1 && (!__builtin_constant_p (__n) || (size_t) __n > __bos (__s))) diff --git a/wcsmbs/tst-wchar-h.c b/wcsmbs/tst-wchar-h.c new file mode 100644 index 0000000000..4cf2dd0690 --- /dev/null +++ b/wcsmbs/tst-wchar-h.c @@ -0,0 +1,9 @@ +#include <stdlib.h> +#include <wchar.h> + +int +main (void) +{ + mbstate_t x; + return sizeof (x) - sizeof (mbstate_t); +} |