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 /* 23eec1faa8Sdamico * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 27*538aa54dSGarrett D'Amore /* 28*538aa54dSGarrett D'Amore * Copyright 2014 Garrett D'Amore <garrett@damore.org> 29*538aa54dSGarrett D'Amore */ 30*538aa54dSGarrett D'Amore 317c478bd9Sstevel@tonic-gate /* 327c478bd9Sstevel@tonic-gate * An application should not include this header directly. Instead it 337c478bd9Sstevel@tonic-gate * should be included only through the inclusion of other Sun headers. 347c478bd9Sstevel@tonic-gate * 357c478bd9Sstevel@tonic-gate * The contents of this header is limited to identifiers specified in the 367c478bd9Sstevel@tonic-gate * C Standard. Any new identifiers specified in future amendments to the 377c478bd9Sstevel@tonic-gate * C Standard must be placed in this header. If these new identifiers 387c478bd9Sstevel@tonic-gate * are required to also be in the C++ Standard "std" namespace, then for 397c478bd9Sstevel@tonic-gate * anything other than macro definitions, corresponding "using" directives 407c478bd9Sstevel@tonic-gate * must also be added to <wchar.h>. 417c478bd9Sstevel@tonic-gate */ 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate #ifndef _ISO_WCHAR_ISO_H 447c478bd9Sstevel@tonic-gate #define _ISO_WCHAR_ISO_H 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate #include <sys/feature_tests.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 NULL 1157c478bd9Sstevel@tonic-gate #if defined(_LP64) 1167c478bd9Sstevel@tonic-gate #define NULL 0L 1177c478bd9Sstevel@tonic-gate #else 1187c478bd9Sstevel@tonic-gate #define NULL 0 1197c478bd9Sstevel@tonic-gate #endif 1207c478bd9Sstevel@tonic-gate #endif /* !NULL */ 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate #ifndef WEOF 123eec1faa8Sdamico #if __cplusplus >= 199711L 124eec1faa8Sdamico #define WEOF ((std::wint_t)(-1)) 125eec1faa8Sdamico #else 1267c478bd9Sstevel@tonic-gate #define WEOF ((wint_t)(-1)) 1277c478bd9Sstevel@tonic-gate #endif 128eec1faa8Sdamico #endif /* WEOF */ 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 1317c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 1327c478bd9Sstevel@tonic-gate #ifndef WCHAR_MAX 1337c478bd9Sstevel@tonic-gate #define WCHAR_MAX 2147483647 1347c478bd9Sstevel@tonic-gate #endif 1357c478bd9Sstevel@tonic-gate #ifndef WCHAR_MIN 1367c478bd9Sstevel@tonic-gate #define WCHAR_MIN (-2147483647-1) 1377c478bd9Sstevel@tonic-gate #endif 1387c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gate #if !defined(_MBSTATE_T) || __cplusplus >= 199711L 1417c478bd9Sstevel@tonic-gate #define _MBSTATE_T 1427c478bd9Sstevel@tonic-gate typedef __mbstate_t mbstate_t; 1437c478bd9Sstevel@tonic-gate #endif /* _MBSTATE_T */ 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_FILEDEFED) || __cplusplus >= 199711L 1467c478bd9Sstevel@tonic-gate #define _FILEDEFED 1477c478bd9Sstevel@tonic-gate typedef __FILE FILE; 1487c478bd9Sstevel@tonic-gate #endif 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate #if !defined(_LP64) && !defined(_LONGLONG_TYPE) 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 1537c478bd9Sstevel@tonic-gate #pragma redefine_extname fwprintf _fwprintf_c89 1547c478bd9Sstevel@tonic-gate #pragma redefine_extname swprintf _swprintf_c89 1557c478bd9Sstevel@tonic-gate #pragma redefine_extname vfwprintf _vfwprintf_c89 1567c478bd9Sstevel@tonic-gate #pragma redefine_extname vswprintf _vswprintf_c89 1577c478bd9Sstevel@tonic-gate #pragma redefine_extname vwprintf _vwprintf_c89 1587c478bd9Sstevel@tonic-gate #pragma redefine_extname wprintf _wprintf_c89 1597c478bd9Sstevel@tonic-gate #pragma redefine_extname fwscanf _fwscanf_c89 1607c478bd9Sstevel@tonic-gate #pragma redefine_extname swscanf _swscanf_c89 1617c478bd9Sstevel@tonic-gate #pragma redefine_extname wscanf _wscanf_c89 1627c478bd9Sstevel@tonic-gate #else 1637c478bd9Sstevel@tonic-gate #define fwprintf _fwprintf_c89 1647c478bd9Sstevel@tonic-gate #define swprintf _swprintf_c89 1657c478bd9Sstevel@tonic-gate #define vfwprintf _vfwprintf_c89 1667c478bd9Sstevel@tonic-gate #define vswprintf _vswprintf_c89 1677c478bd9Sstevel@tonic-gate #define vwprintf _vwprintf_c89 1687c478bd9Sstevel@tonic-gate #define wprintf _wprintf_c89 1697c478bd9Sstevel@tonic-gate #define fwscanf _fwscanf_c89 1707c478bd9Sstevel@tonic-gate #define swscanf _swscanf_c89 1717c478bd9Sstevel@tonic-gate #define wscanf _wscanf_c89 1727c478bd9Sstevel@tonic-gate #endif 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */ 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 1777c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 1787c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 1797c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 1807c478bd9Sstevel@tonic-gate #pragma redefine_extname fgetwc __fgetwc_xpg5 1817c478bd9Sstevel@tonic-gate #pragma redefine_extname getwc __getwc_xpg5 1827c478bd9Sstevel@tonic-gate #pragma redefine_extname getwchar __getwchar_xpg5 1837c478bd9Sstevel@tonic-gate #pragma redefine_extname fputwc __fputwc_xpg5 1847c478bd9Sstevel@tonic-gate #pragma redefine_extname putwc __putwc_xpg5 1857c478bd9Sstevel@tonic-gate #pragma redefine_extname putwchar __putwchar_xpg5 1867c478bd9Sstevel@tonic-gate #pragma redefine_extname fgetws __fgetws_xpg5 1877c478bd9Sstevel@tonic-gate #pragma redefine_extname fputws __fputws_xpg5 1887c478bd9Sstevel@tonic-gate #pragma redefine_extname ungetwc __ungetwc_xpg5 1897c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 1907c478bd9Sstevel@tonic-gate #ifdef __STDC__ 1917c478bd9Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(__FILE *); 1927c478bd9Sstevel@tonic-gate extern wint_t __getwc_xpg5(__FILE *); 1937c478bd9Sstevel@tonic-gate extern wint_t __getwchar_xpg5(void); 1947c478bd9Sstevel@tonic-gate extern wint_t __fputwc_xpg5(wint_t, __FILE *); 1957c478bd9Sstevel@tonic-gate extern wint_t __putwc_xpg5(wint_t, __FILE *); 1967c478bd9Sstevel@tonic-gate extern wint_t __putwchar_xpg5(wint_t); 1977c478bd9Sstevel@tonic-gate extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, 1987c478bd9Sstevel@tonic-gate __FILE *_RESTRICT_KYWD); 1997c478bd9Sstevel@tonic-gate extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); 2007c478bd9Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(wint_t, __FILE *); 2017c478bd9Sstevel@tonic-gate #else 2027c478bd9Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(); 2037c478bd9Sstevel@tonic-gate extern wint_t __getwc_xpg5(); 2047c478bd9Sstevel@tonic-gate extern wint_t __getwchar_xpg5(); 2057c478bd9Sstevel@tonic-gate extern wint_t __fputwc_xpg5(); 2067c478bd9Sstevel@tonic-gate extern wint_t __putwc_xpg5(); 2077c478bd9Sstevel@tonic-gate extern wint_t __putwchar_xpg5(); 2087c478bd9Sstevel@tonic-gate extern wchar_t *__fgetws_xpg5(); 2097c478bd9Sstevel@tonic-gate extern int __fputws_xpg5(); 2107c478bd9Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(); 2117c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 2127c478bd9Sstevel@tonic-gate #define fgetwc __fgetwc_xpg5 2137c478bd9Sstevel@tonic-gate #define getwc __getwc_xpg5 2147c478bd9Sstevel@tonic-gate #define getwchar __getwchar_xpg5 2157c478bd9Sstevel@tonic-gate #define fputwc __fputwc_xpg5 2167c478bd9Sstevel@tonic-gate #define putwc __putwc_xpg5 2177c478bd9Sstevel@tonic-gate #define putwchar __putwchar_xpg5 2187c478bd9Sstevel@tonic-gate #define fgetws __fgetws_xpg5 2197c478bd9Sstevel@tonic-gate #define fputws __fputws_xpg5 2207c478bd9Sstevel@tonic-gate #define ungetwc __ungetwc_xpg5 2217c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 2227c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 2237c478bd9Sstevel@tonic-gate #endif /* defined(_MSE_INT_H) */ 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gate #ifdef __STDC__ 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gate extern wint_t fgetwc(__FILE *); 2287c478bd9Sstevel@tonic-gate extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD); 2297c478bd9Sstevel@tonic-gate extern wint_t fputwc(wint_t, __FILE *); 2307c478bd9Sstevel@tonic-gate extern int fputws(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); 2317c478bd9Sstevel@tonic-gate extern wint_t ungetwc(wint_t, __FILE *); 2327c478bd9Sstevel@tonic-gate extern wint_t getwc(__FILE *); 2337c478bd9Sstevel@tonic-gate extern wint_t getwchar(void); 2347c478bd9Sstevel@tonic-gate extern wint_t putwc(wint_t, __FILE *); 2357c478bd9Sstevel@tonic-gate extern wint_t putwchar(wint_t); 2367c478bd9Sstevel@tonic-gate extern double wcstod(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD); 2377c478bd9Sstevel@tonic-gate extern long wcstol(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD, 2387c478bd9Sstevel@tonic-gate int); 2397c478bd9Sstevel@tonic-gate extern unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD, 2407c478bd9Sstevel@tonic-gate wchar_t **_RESTRICT_KYWD, int); 2417c478bd9Sstevel@tonic-gate extern wchar_t *wcscat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 2427c478bd9Sstevel@tonic-gate extern int wcscmp(const wchar_t *, const wchar_t *); 2437c478bd9Sstevel@tonic-gate extern int wcscoll(const wchar_t *, const wchar_t *); 2447c478bd9Sstevel@tonic-gate extern wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 2457c478bd9Sstevel@tonic-gate extern size_t wcscspn(const wchar_t *, const wchar_t *); 2467c478bd9Sstevel@tonic-gate extern size_t wcslen(const wchar_t *); 2477c478bd9Sstevel@tonic-gate extern wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2487c478bd9Sstevel@tonic-gate size_t); 2497c478bd9Sstevel@tonic-gate extern int wcsncmp(const wchar_t *, const wchar_t *, size_t); 2507c478bd9Sstevel@tonic-gate extern wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2517c478bd9Sstevel@tonic-gate size_t); 2527c478bd9Sstevel@tonic-gate extern size_t wcsspn(const wchar_t *, const wchar_t *); 2537c478bd9Sstevel@tonic-gate extern size_t wcsxfrm(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2547c478bd9Sstevel@tonic-gate size_t); 2557c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 2567c478bd9Sstevel@tonic-gate extern const wchar_t *wcschr(const wchar_t *, wchar_t); 2577c478bd9Sstevel@tonic-gate extern "C++" { 2587c478bd9Sstevel@tonic-gate inline wchar_t *wcschr(wchar_t *__ws, wchar_t __wc) { 2597c478bd9Sstevel@tonic-gate return (wchar_t *)wcschr((const wchar_t *)__ws, __wc); 2607c478bd9Sstevel@tonic-gate } 2617c478bd9Sstevel@tonic-gate } 2627c478bd9Sstevel@tonic-gate extern const wchar_t *wcspbrk(const wchar_t *, const wchar_t *); 2637c478bd9Sstevel@tonic-gate extern "C++" { 2647c478bd9Sstevel@tonic-gate inline wchar_t *wcspbrk(wchar_t *__ws1, const wchar_t *__ws2) { 2657c478bd9Sstevel@tonic-gate return (wchar_t *)wcspbrk((const wchar_t *)__ws1, __ws2); 2667c478bd9Sstevel@tonic-gate } 2677c478bd9Sstevel@tonic-gate } 2687c478bd9Sstevel@tonic-gate extern const wchar_t *wcsrchr(const wchar_t *, wchar_t); 2697c478bd9Sstevel@tonic-gate extern "C++" { 2707c478bd9Sstevel@tonic-gate inline wchar_t *wcsrchr(wchar_t *__ws, wchar_t __wc) { 2717c478bd9Sstevel@tonic-gate return (wchar_t *)wcsrchr((const wchar_t *)__ws, __wc); 2727c478bd9Sstevel@tonic-gate } 2737c478bd9Sstevel@tonic-gate } 2747c478bd9Sstevel@tonic-gate #else /* __cplusplus >= 199711L */ 2757c478bd9Sstevel@tonic-gate extern wchar_t *wcschr(const wchar_t *, wchar_t); 2767c478bd9Sstevel@tonic-gate extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *); 2777c478bd9Sstevel@tonic-gate extern wchar_t *wcsrchr(const wchar_t *, wchar_t); 2787c478bd9Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 2797c478bd9Sstevel@tonic-gate 2807c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 2817c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */ 2827c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *, const wchar_t *); 2837c478bd9Sstevel@tonic-gate extern size_t wcsftime(wchar_t *, size_t, const char *, const struct tm *); 2847c478bd9Sstevel@tonic-gate #else /* XPG4 or XPG4v2 */ 2857c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 2867c478bd9Sstevel@tonic-gate #pragma redefine_extname wcstok __wcstok_xpg5 2877c478bd9Sstevel@tonic-gate #pragma redefine_extname wcsftime __wcsftime_xpg5 2887c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 2897c478bd9Sstevel@tonic-gate wchar_t **_RESTRICT_KYWD); 2907c478bd9Sstevel@tonic-gate extern size_t wcsftime(wchar_t *_RESTRICT_KYWD, size_t, 2917c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); 2927c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 2937c478bd9Sstevel@tonic-gate extern wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD, 2947c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD); 2957c478bd9Sstevel@tonic-gate extern size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t, 2967c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); 2977c478bd9Sstevel@tonic-gate #define wcstok __wcstok_xpg5 2987c478bd9Sstevel@tonic-gate #define wcsftime __wcsftime_xpg5 2997c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 3007c478bd9Sstevel@tonic-gate #endif /* XPG4 or XPG4v2 */ 3017c478bd9Sstevel@tonic-gate #endif /* !defined(_MSE_INT_H) */ 3027c478bd9Sstevel@tonic-gate 3037c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 3047c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 3057c478bd9Sstevel@tonic-gate extern wint_t btowc(int); 3067c478bd9Sstevel@tonic-gate extern int fwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 3077c478bd9Sstevel@tonic-gate ...); 3087c478bd9Sstevel@tonic-gate extern int fwscanf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 3097c478bd9Sstevel@tonic-gate ...); 3107c478bd9Sstevel@tonic-gate extern int fwide(__FILE *, int); 3117c478bd9Sstevel@tonic-gate extern int mbsinit(const mbstate_t *); 3127c478bd9Sstevel@tonic-gate extern size_t mbrlen(const char *_RESTRICT_KYWD, size_t, 3137c478bd9Sstevel@tonic-gate mbstate_t *_RESTRICT_KYWD); 3147c478bd9Sstevel@tonic-gate extern size_t mbrtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, 3157c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 3167c478bd9Sstevel@tonic-gate extern size_t mbsrtowcs(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD, 3177c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 3187c478bd9Sstevel@tonic-gate extern int swprintf(wchar_t *_RESTRICT_KYWD, size_t, 3197c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, ...); 3207c478bd9Sstevel@tonic-gate extern int swscanf(const wchar_t *_RESTRICT_KYWD, 3217c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, ...); 3227c478bd9Sstevel@tonic-gate extern int vfwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 3237c478bd9Sstevel@tonic-gate __va_list); 3247c478bd9Sstevel@tonic-gate extern int vwprintf(const wchar_t *_RESTRICT_KYWD, __va_list); 3257c478bd9Sstevel@tonic-gate extern int vswprintf(wchar_t *_RESTRICT_KYWD, size_t, 3267c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, __va_list); 3277c478bd9Sstevel@tonic-gate extern size_t wcrtomb(char *_RESTRICT_KYWD, wchar_t, 3287c478bd9Sstevel@tonic-gate mbstate_t *_RESTRICT_KYWD); 3297c478bd9Sstevel@tonic-gate extern size_t wcsrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD, 3307c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 331*538aa54dSGarrett D'Amore #if defined(_XPG7) || !defined(_STRICT_SYMBOLS) 332*538aa54dSGarrett D'Amore extern size_t wcsnrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD, 333*538aa54dSGarrett D'Amore size_t, size_t, mbstate_t *_RESTRICT_KYWD); 334*538aa54dSGarrett D'Amore #endif 3357c478bd9Sstevel@tonic-gate extern int wctob(wint_t); 3367c478bd9Sstevel@tonic-gate extern int wmemcmp(const wchar_t *, const wchar_t *, size_t); 3377c478bd9Sstevel@tonic-gate extern wchar_t *wmemcpy(wchar_t *_RESTRICT_KYWD, 3387c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, size_t); 3397c478bd9Sstevel@tonic-gate extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); 3407c478bd9Sstevel@tonic-gate extern wchar_t *wmemset(wchar_t *, wchar_t, size_t); 3417c478bd9Sstevel@tonic-gate extern int wprintf(const wchar_t *_RESTRICT_KYWD, ...); 3427c478bd9Sstevel@tonic-gate extern int wscanf(const wchar_t *_RESTRICT_KYWD, ...); 3437c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 3447c478bd9Sstevel@tonic-gate extern const wchar_t *wcsstr(const wchar_t *, const wchar_t *); 3457c478bd9Sstevel@tonic-gate extern "C++" { 3467c478bd9Sstevel@tonic-gate inline wchar_t *wcsstr(wchar_t *__ws1, const wchar_t *__ws2) { 3477c478bd9Sstevel@tonic-gate return (wchar_t *)wcsstr((const wchar_t *)__ws1, __ws2); 3487c478bd9Sstevel@tonic-gate } 3497c478bd9Sstevel@tonic-gate } 3507c478bd9Sstevel@tonic-gate extern const wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); 3517c478bd9Sstevel@tonic-gate extern "C++" { 3527c478bd9Sstevel@tonic-gate inline wchar_t *wmemchr(wchar_t *__ws, wchar_t __wc, size_t __n) { 3537c478bd9Sstevel@tonic-gate return (wchar_t *)wmemchr((const wchar_t *)__ws, __wc, __n); 3547c478bd9Sstevel@tonic-gate } 3557c478bd9Sstevel@tonic-gate } 3567c478bd9Sstevel@tonic-gate #else /* __cplusplus >= 199711L */ 3577c478bd9Sstevel@tonic-gate extern wchar_t *wcsstr(const wchar_t *_RESTRICT_KYWD, 3587c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD); 3597c478bd9Sstevel@tonic-gate extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); 3607c478bd9Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 3617c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 3627c478bd9Sstevel@tonic-gate 3637c478bd9Sstevel@tonic-gate #else /* __STDC__ */ 3647c478bd9Sstevel@tonic-gate 3657c478bd9Sstevel@tonic-gate extern wint_t fgetwc(); 3667c478bd9Sstevel@tonic-gate extern wchar_t *fgetws(); 3677c478bd9Sstevel@tonic-gate extern wint_t fputwc(); 3687c478bd9Sstevel@tonic-gate extern int fputws(); 3697c478bd9Sstevel@tonic-gate extern wint_t ungetwc(); 3707c478bd9Sstevel@tonic-gate extern wint_t getwc(); 3717c478bd9Sstevel@tonic-gate extern wint_t getwchar(); 3727c478bd9Sstevel@tonic-gate extern wint_t putwc(); 3737c478bd9Sstevel@tonic-gate extern wint_t putwchar(); 3747c478bd9Sstevel@tonic-gate extern wint_t ungetwc(); 3757c478bd9Sstevel@tonic-gate extern double wcstod(); 3767c478bd9Sstevel@tonic-gate extern long wcstol(); 3777c478bd9Sstevel@tonic-gate extern unsigned long wcstoul(); 3787c478bd9Sstevel@tonic-gate extern wchar_t *wcscat(); 3797c478bd9Sstevel@tonic-gate extern wchar_t *wcschr(); 3807c478bd9Sstevel@tonic-gate extern int wcscmp(); 3817c478bd9Sstevel@tonic-gate extern int wcscoll(); 3827c478bd9Sstevel@tonic-gate extern wchar_t *wcscpy(); 3837c478bd9Sstevel@tonic-gate extern size_t wcscspn(); 3847c478bd9Sstevel@tonic-gate extern size_t wcslen(); 3857c478bd9Sstevel@tonic-gate extern wchar_t *wcsncat(); 3867c478bd9Sstevel@tonic-gate extern int wcsncmp(); 3877c478bd9Sstevel@tonic-gate extern wchar_t *wcsncpy(); 3887c478bd9Sstevel@tonic-gate extern wchar_t *wcspbrk(); 3897c478bd9Sstevel@tonic-gate extern wchar_t *wcsrchr(); 3907c478bd9Sstevel@tonic-gate extern size_t wcsspn(); 3917c478bd9Sstevel@tonic-gate extern size_t wcsxfrm(); 3927c478bd9Sstevel@tonic-gate 3937c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 3947c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */ 3957c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(); 3967c478bd9Sstevel@tonic-gate extern size_t wcsftime(); 3977c478bd9Sstevel@tonic-gate #else /* XPG4 or XPG4v2 */ 3987c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 3997c478bd9Sstevel@tonic-gate #pragma redefine_extname wcstok __wcstok_xpg5 4007c478bd9Sstevel@tonic-gate #pragma redefine_extname wcsftime __wcsftime_xpg5 4017c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(); 4027c478bd9Sstevel@tonic-gate extern size_t wcsftime(); 4037c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 4047c478bd9Sstevel@tonic-gate extern wchar_t *__wcstok_xpg5(); 4057c478bd9Sstevel@tonic-gate extern size_t __wcsftime_xpg5(); 4067c478bd9Sstevel@tonic-gate #define wcstok __wcstok_xpg5 4077c478bd9Sstevel@tonic-gate #define wcsftime __wcsftime_xpg5 4087c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 4097c478bd9Sstevel@tonic-gate #endif /* XPG4 or XPG4v2 */ 4107c478bd9Sstevel@tonic-gate #endif /* defined(_MSE_INT_H) */ 4117c478bd9Sstevel@tonic-gate 4127c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 4137c478bd9Sstevel@tonic-gate #if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5)) 4147c478bd9Sstevel@tonic-gate extern wint_t btowc(); 4157c478bd9Sstevel@tonic-gate extern int fwprintf(); 4167c478bd9Sstevel@tonic-gate extern int fwscanf(); 4177c478bd9Sstevel@tonic-gate extern int fwide(); 4187c478bd9Sstevel@tonic-gate extern int mbsinit(); 4197c478bd9Sstevel@tonic-gate extern size_t mbrlen(); 4207c478bd9Sstevel@tonic-gate extern size_t mbrtowc(); 4217c478bd9Sstevel@tonic-gate extern size_t mbsrtowcs(); 4227c478bd9Sstevel@tonic-gate extern int swprintf(); 4237c478bd9Sstevel@tonic-gate extern int swscanf(); 4247c478bd9Sstevel@tonic-gate extern int vfwprintf(); 4257c478bd9Sstevel@tonic-gate extern int vwprintf(); 4267c478bd9Sstevel@tonic-gate extern int vswprintf(); 4277c478bd9Sstevel@tonic-gate extern size_t wcrtomb(); 4287c478bd9Sstevel@tonic-gate extern size_t wcsrtombs(); 429*538aa54dSGarrett D'Amore #if defined(_XPG7) || !defined(_STRICT_SYMBOLS) 430*538aa54dSGarrett D'Amore extern size_t wcsnrtombs(); 431*538aa54dSGarrett D'Amore #endif 432*538aa54dSGarrett D'Amore 4337c478bd9Sstevel@tonic-gate extern wchar_t *wcsstr(); 4347c478bd9Sstevel@tonic-gate extern int wctob(); 4357c478bd9Sstevel@tonic-gate extern wchar_t *wmemchr(); 4367c478bd9Sstevel@tonic-gate extern int wmemcmp(); 4377c478bd9Sstevel@tonic-gate extern wchar_t *wmemcpy(); 4387c478bd9Sstevel@tonic-gate extern wchar_t *wmemmove(); 4397c478bd9Sstevel@tonic-gate extern wchar_t *wmemset(); 4407c478bd9Sstevel@tonic-gate extern int wprintf(); 4417c478bd9Sstevel@tonic-gate extern int wscanf(); 4427c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 4437c478bd9Sstevel@tonic-gate 4447c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 4457c478bd9Sstevel@tonic-gate 4467c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 4477c478bd9Sstevel@tonic-gate } 4487c478bd9Sstevel@tonic-gate #endif /* end of namespace std */ 4497c478bd9Sstevel@tonic-gate 4507c478bd9Sstevel@tonic-gate #ifdef __cplusplus 4517c478bd9Sstevel@tonic-gate } 4527c478bd9Sstevel@tonic-gate #endif 4537c478bd9Sstevel@tonic-gate 4547c478bd9Sstevel@tonic-gate #endif /* _ISO_WCHAR_ISO_H */ 455