X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fwchar.h;h=12ddd4f49a632cc7a5b7bace935258a522be9615;hp=53d619b3f963fcec3d4ff36a6a9c70d9c94ecaf3;hb=43a5a00e4ab292e0a615b655f1e77837d6c1701e;hpb=c247ebdd989365d20da3ce41fdeb2002e0a1ba13 diff --git a/include/wchar.h b/include/wchar.h index 53d619b3..12ddd4f4 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -11,12 +11,19 @@ extern "C" { #define __NEED_wchar_t #define __NEED_wint_t +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +#define __NEED_locale_t +#endif + #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) #define __NEED_wctype_t #endif #include +#include + #undef NULL #ifdef __cplusplus #define NULL 0 @@ -24,15 +31,9 @@ extern "C" { #define NULL ((void*)0) #endif -#undef WCHAR_MIN -#undef WCHAR_MAX -#define WCHAR_MIN (-1-0x7fffffff) -#define WCHAR_MAX (0x7fffffff) - #undef WEOF #define WEOF (-1) - typedef struct { unsigned __opaque1, __opaque2; @@ -47,6 +48,7 @@ wchar_t *wcsncat (wchar_t *, const wchar_t *, size_t); int wcscmp (const wchar_t *, const wchar_t *); int wcsncmp (const wchar_t *, const wchar_t *, size_t); +int wcscoll(const wchar_t *, const wchar_t *); size_t wcsxfrm (wchar_t *, const wchar_t *, size_t n); wchar_t *wcschr (const wchar_t *, wchar_t); @@ -98,11 +100,11 @@ int fwide (FILE *, int); int wprintf (const wchar_t *, ...); int fwprintf (FILE *, const wchar_t *, ...); -int swprintf (wchar_t *, const wchar_t *, ...); +int swprintf (wchar_t *, size_t, const wchar_t *, ...); int vwprintf (const wchar_t *, va_list); int vfwprintf (FILE *, const wchar_t *, va_list); -int vswprintf (wchar_t *, const wchar_t *, va_list); +int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); int wscanf (const wchar_t *, ...); int fwscanf (FILE *, const wchar_t *, ...); @@ -130,6 +132,23 @@ size_t wcsftime (wchar_t *, size_t, const wchar_t *, const struct tm *); #undef iswdigit +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +FILE *open_wmemstream(wchar_t **, size_t *); +size_t mbsnrtowcs(wchar_t *, const char **, size_t, size_t, mbstate_t *); +size_t wcsnrtombs(char *, const wchar_t **, size_t, size_t, mbstate_t *); +wchar_t *wcsdup(const wchar_t *); +size_t wcsnlen (const wchar_t *, size_t); +wchar_t *wcpcpy (wchar_t *, const wchar_t *); +wchar_t *wcpncpy (wchar_t *, const wchar_t *, size_t); +int wcscasecmp(const wchar_t *, const wchar_t *); +int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); +int wcsncasecmp(const wchar_t *, const wchar_t *, size_t); +int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); +int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); +size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t n, locale_t); +#endif + #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) int wcwidth (wchar_t); int wcswidth (const wchar_t *, size_t);