17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5eec1faa8Sdamico * Common Development and Distribution License (the "License"). 6eec1faa8Sdamico * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21eec1faa8Sdamico 227c478bd9Sstevel@tonic-gate /* 23ba3594baSGarrett D'Amore * Copyright 2014 Garrett D'Amore <garrett@damore.org> 24*4870e0a7SRichard PALO * Copyright 2014 PALO, Richard. 25ba3594baSGarrett D'Amore * 26eec1faa8Sdamico * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 277c478bd9Sstevel@tonic-gate * Use is subject to license terms. 287c478bd9Sstevel@tonic-gate */ 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate /* 317c478bd9Sstevel@tonic-gate * An application should not include this header directly. Instead it 327c478bd9Sstevel@tonic-gate * should be included only through the inclusion of other Sun headers. 337c478bd9Sstevel@tonic-gate * 347c478bd9Sstevel@tonic-gate * The contents of this header is limited to identifiers specified in the 357c478bd9Sstevel@tonic-gate * C Standard. Any new identifiers specified in future amendments to the 367c478bd9Sstevel@tonic-gate * C Standard must be placed in this header. If these new identifiers 377c478bd9Sstevel@tonic-gate * are required to also be in the C++ Standard "std" namespace, then for 387c478bd9Sstevel@tonic-gate * anything other than macro definitions, corresponding "using" directives 397c478bd9Sstevel@tonic-gate * must also be added to <wchar.h>. 407c478bd9Sstevel@tonic-gate */ 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate #ifndef _ISO_WCHAR_ISO_H 437c478bd9Sstevel@tonic-gate #define _ISO_WCHAR_ISO_H 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate #include <sys/feature_tests.h> 46*4870e0a7SRichard PALO #include <sys/null.h> 477c478bd9Sstevel@tonic-gate #include <stdio_tag.h> 487c478bd9Sstevel@tonic-gate #include <wchar_impl.h> 497c478bd9Sstevel@tonic-gate #include <iso/time_iso.h> 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate #if (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) || \ 527c478bd9Sstevel@tonic-gate (!defined(__cplusplus) && !defined(_STRICT_STDC)) || \ 537c478bd9Sstevel@tonic-gate defined(__EXTENSIONS__) 547c478bd9Sstevel@tonic-gate #include <stdio.h> 557c478bd9Sstevel@tonic-gate #endif /* (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) ... */ 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(__EXTENSIONS__) 587c478bd9Sstevel@tonic-gate #include <ctype.h> 597c478bd9Sstevel@tonic-gate #include <stddef.h> 607c478bd9Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(__EXTENSIONS__) */ 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate #include <sys/va_list.h> 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate #ifdef __cplusplus 657c478bd9Sstevel@tonic-gate extern "C" { 667c478bd9Sstevel@tonic-gate #endif 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 697c478bd9Sstevel@tonic-gate namespace std { 707c478bd9Sstevel@tonic-gate #endif 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate /* 737c478bd9Sstevel@tonic-gate * wchar_t is a built-in type in standard C++ and as such is not 747c478bd9Sstevel@tonic-gate * defined here when using standard C++. However, the GNU compiler 75159cf8a6Swesolows * fixincludes utility nonetheless creates its own version of this 767c478bd9Sstevel@tonic-gate * header for use by gcc and g++. In that version it adds a redundant 777c478bd9Sstevel@tonic-gate * guard for __cplusplus. To avoid the creation of a gcc/g++ specific 787c478bd9Sstevel@tonic-gate * header we need to include the following magic comment: 797c478bd9Sstevel@tonic-gate * 807c478bd9Sstevel@tonic-gate * we must use the C++ compiler's type 817c478bd9Sstevel@tonic-gate * 827c478bd9Sstevel@tonic-gate * The above comment should not be removed or changed until GNU 837c478bd9Sstevel@tonic-gate * gcc/fixinc/inclhack.def is updated to bypass this header. 847c478bd9Sstevel@tonic-gate */ 857c478bd9Sstevel@tonic-gate #if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__)) 867c478bd9Sstevel@tonic-gate #ifndef _WCHAR_T 877c478bd9Sstevel@tonic-gate #define _WCHAR_T 887c478bd9Sstevel@tonic-gate #if defined(_LP64) 897c478bd9Sstevel@tonic-gate typedef int wchar_t; 907c478bd9Sstevel@tonic-gate #else 917c478bd9Sstevel@tonic-gate typedef long wchar_t; 927c478bd9Sstevel@tonic-gate #endif 937c478bd9Sstevel@tonic-gate #endif /* !_WCHAR_T */ 947c478bd9Sstevel@tonic-gate #endif /* !defined(__cplusplus) ... */ 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate #if !defined(_WINT_T) || __cplusplus >= 199711L 977c478bd9Sstevel@tonic-gate #define _WINT_T 987c478bd9Sstevel@tonic-gate #if defined(_LP64) 997c478bd9Sstevel@tonic-gate typedef int wint_t; 1007c478bd9Sstevel@tonic-gate #else 1017c478bd9Sstevel@tonic-gate typedef long wint_t; 1027c478bd9Sstevel@tonic-gate #endif 1037c478bd9Sstevel@tonic-gate #endif /* !defined(_WINT_T) || __cplusplus >= 199711L */ 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate #if !defined(_SIZE_T) || __cplusplus >= 199711L 1067c478bd9Sstevel@tonic-gate #define _SIZE_T 1077c478bd9Sstevel@tonic-gate #if defined(_LP64) || defined(_I32LPx) 1087c478bd9Sstevel@tonic-gate typedef unsigned long size_t; /* size of something in bytes */ 1097c478bd9Sstevel@tonic-gate #else 1107c478bd9Sstevel@tonic-gate typedef unsigned int size_t; /* (historical version) */ 1117c478bd9Sstevel@tonic-gate #endif 1127c478bd9Sstevel@tonic-gate #endif /* !defined(_SIZE_T) || __cplusplus >= 199711L */ 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate #ifndef WEOF 115eec1faa8Sdamico #if __cplusplus >= 199711L 116eec1faa8Sdamico #define WEOF ((std::wint_t)(-1)) 117eec1faa8Sdamico #else 1187c478bd9Sstevel@tonic-gate #define WEOF ((wint_t)(-1)) 1197c478bd9Sstevel@tonic-gate #endif 120eec1faa8Sdamico #endif /* WEOF */ 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 1237c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 1247c478bd9Sstevel@tonic-gate #ifndef WCHAR_MAX 1257c478bd9Sstevel@tonic-gate #define WCHAR_MAX 2147483647 1267c478bd9Sstevel@tonic-gate #endif 1277c478bd9Sstevel@tonic-gate #ifndef WCHAR_MIN 1287c478bd9Sstevel@tonic-gate #define WCHAR_MIN (-2147483647-1) 1297c478bd9Sstevel@tonic-gate #endif 1307c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate #if !defined(_MBSTATE_T) || __cplusplus >= 199711L 1337c478bd9Sstevel@tonic-gate #define _MBSTATE_T 1347c478bd9Sstevel@tonic-gate typedef __mbstate_t mbstate_t; 1357c478bd9Sstevel@tonic-gate #endif /* _MBSTATE_T */ 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_FILEDEFED) || __cplusplus >= 199711L 1387c478bd9Sstevel@tonic-gate #define _FILEDEFED 1397c478bd9Sstevel@tonic-gate typedef __FILE FILE; 1407c478bd9Sstevel@tonic-gate #endif 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate #if !defined(_LP64) && !defined(_LONGLONG_TYPE) 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 1457c478bd9Sstevel@tonic-gate #pragma redefine_extname fwprintf _fwprintf_c89 1467c478bd9Sstevel@tonic-gate #pragma redefine_extname swprintf _swprintf_c89 1477c478bd9Sstevel@tonic-gate #pragma redefine_extname vfwprintf _vfwprintf_c89 1487c478bd9Sstevel@tonic-gate #pragma redefine_extname vswprintf _vswprintf_c89 1497c478bd9Sstevel@tonic-gate #pragma redefine_extname vwprintf _vwprintf_c89 1507c478bd9Sstevel@tonic-gate #pragma redefine_extname wprintf _wprintf_c89 1517c478bd9Sstevel@tonic-gate #pragma redefine_extname fwscanf _fwscanf_c89 1527c478bd9Sstevel@tonic-gate #pragma redefine_extname swscanf _swscanf_c89 1537c478bd9Sstevel@tonic-gate #pragma redefine_extname wscanf _wscanf_c89 1547c478bd9Sstevel@tonic-gate #else 1557c478bd9Sstevel@tonic-gate #define fwprintf _fwprintf_c89 1567c478bd9Sstevel@tonic-gate #define swprintf _swprintf_c89 1577c478bd9Sstevel@tonic-gate #define vfwprintf _vfwprintf_c89 1587c478bd9Sstevel@tonic-gate #define vswprintf _vswprintf_c89 1597c478bd9Sstevel@tonic-gate #define vwprintf _vwprintf_c89 1607c478bd9Sstevel@tonic-gate #define wprintf _wprintf_c89 1617c478bd9Sstevel@tonic-gate #define fwscanf _fwscanf_c89 1627c478bd9Sstevel@tonic-gate #define swscanf _swscanf_c89 1637c478bd9Sstevel@tonic-gate #define wscanf _wscanf_c89 1647c478bd9Sstevel@tonic-gate #endif 1657c478bd9Sstevel@tonic-gate 1667c478bd9Sstevel@tonic-gate #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */ 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 1697c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 1707c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 1717c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 1727c478bd9Sstevel@tonic-gate #pragma redefine_extname fgetwc __fgetwc_xpg5 1737c478bd9Sstevel@tonic-gate #pragma redefine_extname getwc __getwc_xpg5 1747c478bd9Sstevel@tonic-gate #pragma redefine_extname getwchar __getwchar_xpg5 1757c478bd9Sstevel@tonic-gate #pragma redefine_extname fputwc __fputwc_xpg5 1767c478bd9Sstevel@tonic-gate #pragma redefine_extname putwc __putwc_xpg5 1777c478bd9Sstevel@tonic-gate #pragma redefine_extname putwchar __putwchar_xpg5 1787c478bd9Sstevel@tonic-gate #pragma redefine_extname fgetws __fgetws_xpg5 1797c478bd9Sstevel@tonic-gate #pragma redefine_extname fputws __fputws_xpg5 1807c478bd9Sstevel@tonic-gate #pragma redefine_extname ungetwc __ungetwc_xpg5 1817c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 1827c478bd9Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(__FILE *); 1837c478bd9Sstevel@tonic-gate extern wint_t __getwc_xpg5(__FILE *); 1847c478bd9Sstevel@tonic-gate extern wint_t __getwchar_xpg5(void); 1857c478bd9Sstevel@tonic-gate extern wint_t __fputwc_xpg5(wint_t, __FILE *); 1867c478bd9Sstevel@tonic-gate extern wint_t __putwc_xpg5(wint_t, __FILE *); 1877c478bd9Sstevel@tonic-gate extern wint_t __putwchar_xpg5(wint_t); 1887c478bd9Sstevel@tonic-gate extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, 1897c478bd9Sstevel@tonic-gate __FILE *_RESTRICT_KYWD); 1907c478bd9Sstevel@tonic-gate extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); 1917c478bd9Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(wint_t, __FILE *); 1927c478bd9Sstevel@tonic-gate #define fgetwc __fgetwc_xpg5 1937c478bd9Sstevel@tonic-gate #define getwc __getwc_xpg5 1947c478bd9Sstevel@tonic-gate #define getwchar __getwchar_xpg5 1957c478bd9Sstevel@tonic-gate #define fputwc __fputwc_xpg5 1967c478bd9Sstevel@tonic-gate #define putwc __putwc_xpg5 1977c478bd9Sstevel@tonic-gate #define putwchar __putwchar_xpg5 1987c478bd9Sstevel@tonic-gate #define fgetws __fgetws_xpg5 1997c478bd9Sstevel@tonic-gate #define fputws __fputws_xpg5 2007c478bd9Sstevel@tonic-gate #define ungetwc __ungetwc_xpg5 2017c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 2027c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 2037c478bd9Sstevel@tonic-gate #endif /* defined(_MSE_INT_H) */ 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate extern wint_t fgetwc(__FILE *); 2067c478bd9Sstevel@tonic-gate extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD); 2077c478bd9Sstevel@tonic-gate extern wint_t fputwc(wint_t, __FILE *); 2087c478bd9Sstevel@tonic-gate extern int fputws(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); 2097c478bd9Sstevel@tonic-gate extern wint_t ungetwc(wint_t, __FILE *); 2107c478bd9Sstevel@tonic-gate extern wint_t getwc(__FILE *); 2117c478bd9Sstevel@tonic-gate extern wint_t getwchar(void); 2127c478bd9Sstevel@tonic-gate extern wint_t putwc(wint_t, __FILE *); 2137c478bd9Sstevel@tonic-gate extern wint_t putwchar(wint_t); 2147c478bd9Sstevel@tonic-gate extern double wcstod(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD); 2157c478bd9Sstevel@tonic-gate extern long wcstol(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD, 2167c478bd9Sstevel@tonic-gate int); 2177c478bd9Sstevel@tonic-gate extern unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD, 2187c478bd9Sstevel@tonic-gate wchar_t **_RESTRICT_KYWD, int); 2197c478bd9Sstevel@tonic-gate extern wchar_t *wcscat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 2207c478bd9Sstevel@tonic-gate extern int wcscmp(const wchar_t *, const wchar_t *); 2217c478bd9Sstevel@tonic-gate extern int wcscoll(const wchar_t *, const wchar_t *); 2227c478bd9Sstevel@tonic-gate extern wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 2237c478bd9Sstevel@tonic-gate extern size_t wcscspn(const wchar_t *, const wchar_t *); 2247c478bd9Sstevel@tonic-gate extern size_t wcslen(const wchar_t *); 2257c478bd9Sstevel@tonic-gate extern wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2267c478bd9Sstevel@tonic-gate size_t); 2277c478bd9Sstevel@tonic-gate extern int wcsncmp(const wchar_t *, const wchar_t *, size_t); 2287c478bd9Sstevel@tonic-gate extern wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2297c478bd9Sstevel@tonic-gate size_t); 2307c478bd9Sstevel@tonic-gate extern size_t wcsspn(const wchar_t *, const wchar_t *); 2317c478bd9Sstevel@tonic-gate extern size_t wcsxfrm(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2327c478bd9Sstevel@tonic-gate size_t); 2337c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 2347c478bd9Sstevel@tonic-gate extern const wchar_t *wcschr(const wchar_t *, wchar_t); 2357c478bd9Sstevel@tonic-gate extern "C++" { 2367c478bd9Sstevel@tonic-gate inline wchar_t *wcschr(wchar_t *__ws, wchar_t __wc) { 2377c478bd9Sstevel@tonic-gate return (wchar_t *)wcschr((const wchar_t *)__ws, __wc); 2387c478bd9Sstevel@tonic-gate } 2397c478bd9Sstevel@tonic-gate } 2407c478bd9Sstevel@tonic-gate extern const wchar_t *wcspbrk(const wchar_t *, const wchar_t *); 2417c478bd9Sstevel@tonic-gate extern "C++" { 2427c478bd9Sstevel@tonic-gate inline wchar_t *wcspbrk(wchar_t *__ws1, const wchar_t *__ws2) { 2437c478bd9Sstevel@tonic-gate return (wchar_t *)wcspbrk((const wchar_t *)__ws1, __ws2); 2447c478bd9Sstevel@tonic-gate } 2457c478bd9Sstevel@tonic-gate } 2467c478bd9Sstevel@tonic-gate extern const wchar_t *wcsrchr(const wchar_t *, wchar_t); 2477c478bd9Sstevel@tonic-gate extern "C++" { 2487c478bd9Sstevel@tonic-gate inline wchar_t *wcsrchr(wchar_t *__ws, wchar_t __wc) { 2497c478bd9Sstevel@tonic-gate return (wchar_t *)wcsrchr((const wchar_t *)__ws, __wc); 2507c478bd9Sstevel@tonic-gate } 2517c478bd9Sstevel@tonic-gate } 2527c478bd9Sstevel@tonic-gate #else /* __cplusplus >= 199711L */ 2537c478bd9Sstevel@tonic-gate extern wchar_t *wcschr(const wchar_t *, wchar_t); 2547c478bd9Sstevel@tonic-gate extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *); 2557c478bd9Sstevel@tonic-gate extern wchar_t *wcsrchr(const wchar_t *, wchar_t); 2567c478bd9Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 2597c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */ 2607c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *, const wchar_t *); 2617c478bd9Sstevel@tonic-gate extern size_t wcsftime(wchar_t *, size_t, const char *, const struct tm *); 2627c478bd9Sstevel@tonic-gate #else /* XPG4 or XPG4v2 */ 2637c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 2647c478bd9Sstevel@tonic-gate #pragma redefine_extname wcstok __wcstok_xpg5 2657c478bd9Sstevel@tonic-gate #pragma redefine_extname wcsftime __wcsftime_xpg5 2667c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2677c478bd9Sstevel@tonic-gate wchar_t **_RESTRICT_KYWD); 2687c478bd9Sstevel@tonic-gate extern size_t wcsftime(wchar_t *_RESTRICT_KYWD, size_t, 2697c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); 2707c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 2717c478bd9Sstevel@tonic-gate extern wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD, 2727c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD); 2737c478bd9Sstevel@tonic-gate extern size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t, 2747c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); 2757c478bd9Sstevel@tonic-gate #define wcstok __wcstok_xpg5 2767c478bd9Sstevel@tonic-gate #define wcsftime __wcsftime_xpg5 2777c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 2787c478bd9Sstevel@tonic-gate #endif /* XPG4 or XPG4v2 */ 2797c478bd9Sstevel@tonic-gate #endif /* !defined(_MSE_INT_H) */ 2807c478bd9Sstevel@tonic-gate 2817c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 2827c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 2837c478bd9Sstevel@tonic-gate extern wint_t btowc(int); 2847c478bd9Sstevel@tonic-gate extern int fwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2857c478bd9Sstevel@tonic-gate ...); 2867c478bd9Sstevel@tonic-gate extern int fwscanf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2877c478bd9Sstevel@tonic-gate ...); 2887c478bd9Sstevel@tonic-gate extern int fwide(__FILE *, int); 2897c478bd9Sstevel@tonic-gate extern int mbsinit(const mbstate_t *); 2907c478bd9Sstevel@tonic-gate extern size_t mbrlen(const char *_RESTRICT_KYWD, size_t, 2917c478bd9Sstevel@tonic-gate mbstate_t *_RESTRICT_KYWD); 2927c478bd9Sstevel@tonic-gate extern size_t mbrtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, 2937c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 2947c478bd9Sstevel@tonic-gate extern size_t mbsrtowcs(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD, 2957c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 2967c478bd9Sstevel@tonic-gate extern int swprintf(wchar_t *_RESTRICT_KYWD, size_t, 2977c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, ...); 2987c478bd9Sstevel@tonic-gate extern int swscanf(const wchar_t *_RESTRICT_KYWD, 2997c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, ...); 3007c478bd9Sstevel@tonic-gate extern int vfwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 3017c478bd9Sstevel@tonic-gate __va_list); 3027c478bd9Sstevel@tonic-gate extern int vwprintf(const wchar_t *_RESTRICT_KYWD, __va_list); 3037c478bd9Sstevel@tonic-gate extern int vswprintf(wchar_t *_RESTRICT_KYWD, size_t, 3047c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, __va_list); 3057c478bd9Sstevel@tonic-gate extern size_t wcrtomb(char *_RESTRICT_KYWD, wchar_t, 3067c478bd9Sstevel@tonic-gate mbstate_t *_RESTRICT_KYWD); 3077c478bd9Sstevel@tonic-gate extern size_t wcsrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD, 3087c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 309538aa54dSGarrett D'Amore #if defined(_XPG7) || !defined(_STRICT_SYMBOLS) 310538aa54dSGarrett D'Amore extern size_t wcsnrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD, 311538aa54dSGarrett D'Amore size_t, size_t, mbstate_t *_RESTRICT_KYWD); 312538aa54dSGarrett D'Amore #endif 3137c478bd9Sstevel@tonic-gate extern int wctob(wint_t); 3147c478bd9Sstevel@tonic-gate extern int wmemcmp(const wchar_t *, const wchar_t *, size_t); 3157c478bd9Sstevel@tonic-gate extern wchar_t *wmemcpy(wchar_t *_RESTRICT_KYWD, 3167c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, size_t); 3177c478bd9Sstevel@tonic-gate extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); 3187c478bd9Sstevel@tonic-gate extern wchar_t *wmemset(wchar_t *, wchar_t, size_t); 3197c478bd9Sstevel@tonic-gate extern int wprintf(const wchar_t *_RESTRICT_KYWD, ...); 3207c478bd9Sstevel@tonic-gate extern int wscanf(const wchar_t *_RESTRICT_KYWD, ...); 3217c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 3227c478bd9Sstevel@tonic-gate extern const wchar_t *wcsstr(const wchar_t *, const wchar_t *); 3237c478bd9Sstevel@tonic-gate extern "C++" { 3247c478bd9Sstevel@tonic-gate inline wchar_t *wcsstr(wchar_t *__ws1, const wchar_t *__ws2) { 3257c478bd9Sstevel@tonic-gate return (wchar_t *)wcsstr((const wchar_t *)__ws1, __ws2); 3267c478bd9Sstevel@tonic-gate } 3277c478bd9Sstevel@tonic-gate } 3287c478bd9Sstevel@tonic-gate extern const wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); 3297c478bd9Sstevel@tonic-gate extern "C++" { 3307c478bd9Sstevel@tonic-gate inline wchar_t *wmemchr(wchar_t *__ws, wchar_t __wc, size_t __n) { 3317c478bd9Sstevel@tonic-gate return (wchar_t *)wmemchr((const wchar_t *)__ws, __wc, __n); 3327c478bd9Sstevel@tonic-gate } 3337c478bd9Sstevel@tonic-gate } 3347c478bd9Sstevel@tonic-gate #else /* __cplusplus >= 199711L */ 3357c478bd9Sstevel@tonic-gate extern wchar_t *wcsstr(const wchar_t *_RESTRICT_KYWD, 3367c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD); 3377c478bd9Sstevel@tonic-gate extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); 3387c478bd9Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 3397c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 3407c478bd9Sstevel@tonic-gate 3417c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 3427c478bd9Sstevel@tonic-gate } 3437c478bd9Sstevel@tonic-gate #endif /* end of namespace std */ 3447c478bd9Sstevel@tonic-gate 3457c478bd9Sstevel@tonic-gate #ifdef __cplusplus 3467c478bd9Sstevel@tonic-gate } 3477c478bd9Sstevel@tonic-gate #endif 3487c478bd9Sstevel@tonic-gate 3497c478bd9Sstevel@tonic-gate #endif /* _ISO_WCHAR_ISO_H */ 350