10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 56812Sraf * Common Development and Distribution License (the "License"). 66812Sraf * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 216812Sraf 220Sstevel@tonic-gate /* 23*13093SRoger.Faulkner@Oracle.COM * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _WCHAR_H 270Sstevel@tonic-gate #define _WCHAR_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #include <sys/feature_tests.h> 300Sstevel@tonic-gate #include <iso/wchar_iso.h> 310Sstevel@tonic-gate #include <iso/wchar_c99.h> 320Sstevel@tonic-gate 330Sstevel@tonic-gate /* 340Sstevel@tonic-gate * Allow global visibility for symbols defined in 350Sstevel@tonic-gate * C++ "std" namespace in <iso/wchar_iso.h>. 360Sstevel@tonic-gate */ 370Sstevel@tonic-gate #if __cplusplus >= 199711L 380Sstevel@tonic-gate using std::FILE; 390Sstevel@tonic-gate using std::wint_t; 400Sstevel@tonic-gate using std::clock_t; 410Sstevel@tonic-gate using std::size_t; 420Sstevel@tonic-gate using std::time_t; 430Sstevel@tonic-gate using std::tm; 440Sstevel@tonic-gate using std::mbstate_t; 450Sstevel@tonic-gate using std::fgetwc; 460Sstevel@tonic-gate using std::fgetws; 470Sstevel@tonic-gate using std::fputwc; 480Sstevel@tonic-gate using std::fputws; 490Sstevel@tonic-gate using std::ungetwc; 500Sstevel@tonic-gate using std::getwc; 510Sstevel@tonic-gate using std::getwchar; 520Sstevel@tonic-gate using std::putwc; 530Sstevel@tonic-gate using std::putwchar; 540Sstevel@tonic-gate using std::wcstod; 550Sstevel@tonic-gate using std::wcstol; 560Sstevel@tonic-gate using std::wcstoul; 570Sstevel@tonic-gate using std::wcscat; 580Sstevel@tonic-gate using std::wcschr; 590Sstevel@tonic-gate using std::wcscmp; 600Sstevel@tonic-gate using std::wcscoll; 610Sstevel@tonic-gate using std::wcscpy; 620Sstevel@tonic-gate using std::wcscspn; 630Sstevel@tonic-gate using std::wcslen; 640Sstevel@tonic-gate using std::wcsncat; 650Sstevel@tonic-gate using std::wcsncmp; 660Sstevel@tonic-gate using std::wcsncpy; 670Sstevel@tonic-gate using std::wcspbrk; 680Sstevel@tonic-gate using std::wcsrchr; 690Sstevel@tonic-gate using std::wcsspn; 700Sstevel@tonic-gate using std::wcsxfrm; 710Sstevel@tonic-gate using std::wcstok; 720Sstevel@tonic-gate using std::wcsftime; 730Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 740Sstevel@tonic-gate #if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5)) 750Sstevel@tonic-gate using std::btowc; 760Sstevel@tonic-gate using std::fwprintf; 770Sstevel@tonic-gate using std::fwscanf; 780Sstevel@tonic-gate using std::fwide; 790Sstevel@tonic-gate using std::mbsinit; 800Sstevel@tonic-gate using std::mbrlen; 810Sstevel@tonic-gate using std::mbrtowc; 820Sstevel@tonic-gate using std::mbsrtowcs; 830Sstevel@tonic-gate using std::swprintf; 840Sstevel@tonic-gate using std::swscanf; 850Sstevel@tonic-gate using std::vfwprintf; 860Sstevel@tonic-gate using std::vwprintf; 870Sstevel@tonic-gate using std::vswprintf; 880Sstevel@tonic-gate using std::wcrtomb; 890Sstevel@tonic-gate using std::wcsrtombs; 900Sstevel@tonic-gate using std::wcsstr; 910Sstevel@tonic-gate using std::wctob; 920Sstevel@tonic-gate using std::wmemchr; 930Sstevel@tonic-gate using std::wmemcmp; 940Sstevel@tonic-gate using std::wmemcpy; 950Sstevel@tonic-gate using std::wmemmove; 960Sstevel@tonic-gate using std::wmemset; 970Sstevel@tonic-gate using std::wprintf; 980Sstevel@tonic-gate using std::wscanf; 990Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 1000Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 1010Sstevel@tonic-gate 1020Sstevel@tonic-gate #ifdef __cplusplus 1030Sstevel@tonic-gate extern "C" { 1040Sstevel@tonic-gate #endif 1050Sstevel@tonic-gate 1060Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 1070Sstevel@tonic-gate #if !defined(_WCTYPE_T) || __cplusplus >= 199711L 1080Sstevel@tonic-gate #define _WCTYPE_T 1090Sstevel@tonic-gate typedef int wctype_t; 1100Sstevel@tonic-gate #endif 1110Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate /* 1140Sstevel@tonic-gate * XPG6 requires that va_list be defined as defined in <stdarg.h>, 1150Sstevel@tonic-gate * however, inclusion of <stdarg.h> breaks Standard C namespace. 1160Sstevel@tonic-gate */ 1170Sstevel@tonic-gate #if defined(_XPG6) && !defined(_VA_LIST) 1180Sstevel@tonic-gate #define _VA_LIST 1190Sstevel@tonic-gate typedef __va_list va_list; 1200Sstevel@tonic-gate #endif /* defined(_XPG6) && !defined(_VA_LIST) */ 1210Sstevel@tonic-gate 1220Sstevel@tonic-gate #ifdef __STDC__ 1230Sstevel@tonic-gate 1240Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 1250Sstevel@tonic-gate extern int iswalpha(wint_t); 1260Sstevel@tonic-gate extern int iswupper(wint_t); 1270Sstevel@tonic-gate extern int iswlower(wint_t); 1280Sstevel@tonic-gate extern int iswdigit(wint_t); 1290Sstevel@tonic-gate extern int iswxdigit(wint_t); 1300Sstevel@tonic-gate extern int iswalnum(wint_t); 1310Sstevel@tonic-gate extern int iswspace(wint_t); 1320Sstevel@tonic-gate extern int iswpunct(wint_t); 1330Sstevel@tonic-gate extern int iswprint(wint_t); 1340Sstevel@tonic-gate extern int iswgraph(wint_t); 1350Sstevel@tonic-gate extern int iswcntrl(wint_t); 1360Sstevel@tonic-gate extern int iswctype(wint_t, wctype_t); 1370Sstevel@tonic-gate extern wint_t towlower(wint_t); 1380Sstevel@tonic-gate extern wint_t towupper(wint_t); 1390Sstevel@tonic-gate extern wchar_t *wcswcs(const wchar_t *, const wchar_t *); 1400Sstevel@tonic-gate extern int wcswidth(const wchar_t *, size_t); 1416812Sraf extern int wcwidth(wchar_t); 1420Sstevel@tonic-gate extern wctype_t wctype(const char *); 1430Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 1440Sstevel@tonic-gate 145*13093SRoger.Faulkner@Oracle.COM #if defined(__EXTENSIONS__) || \ 146*13093SRoger.Faulkner@Oracle.COM (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) 147*13093SRoger.Faulkner@Oracle.COM /* || defined(_XPG7) */ 148*13093SRoger.Faulkner@Oracle.COM extern wchar_t *wcsdup(const wchar_t *); 149*13093SRoger.Faulkner@Oracle.COM extern size_t wcsnlen(const wchar_t *, size_t); 150*13093SRoger.Faulkner@Oracle.COM extern wchar_t *wcpcpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 151*13093SRoger.Faulkner@Oracle.COM extern wchar_t *wcpncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 152*13093SRoger.Faulkner@Oracle.COM size_t); 153*13093SRoger.Faulkner@Oracle.COM extern int wcscasecmp(const wchar_t *, const wchar_t *); 154*13093SRoger.Faulkner@Oracle.COM extern int wcsncasecmp(const wchar_t *, const wchar_t *, size_t); 155*13093SRoger.Faulkner@Oracle.COM #endif 156*13093SRoger.Faulkner@Oracle.COM 1570Sstevel@tonic-gate #else /* __STDC__ */ 1580Sstevel@tonic-gate 1590Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 1600Sstevel@tonic-gate extern int iswalpha(); 1610Sstevel@tonic-gate extern int iswupper(); 1620Sstevel@tonic-gate extern int iswlower(); 1630Sstevel@tonic-gate extern int iswdigit(); 1640Sstevel@tonic-gate extern int iswxdigit(); 1650Sstevel@tonic-gate extern int iswalnum(); 1660Sstevel@tonic-gate extern int iswspace(); 1670Sstevel@tonic-gate extern int iswpunct(); 1680Sstevel@tonic-gate extern int iswprint(); 1690Sstevel@tonic-gate extern int iswgraph(); 1700Sstevel@tonic-gate extern int iswcntrl(); 1710Sstevel@tonic-gate extern int iswctype(); 1720Sstevel@tonic-gate extern wint_t towlower(); 1730Sstevel@tonic-gate extern wint_t towupper(); 1740Sstevel@tonic-gate extern wchar_t *wcswcs(); 1750Sstevel@tonic-gate extern int wcswidth(); 1760Sstevel@tonic-gate extern int wcwidth(); 1770Sstevel@tonic-gate extern wctype_t wctype(); 1780Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 1790Sstevel@tonic-gate 180*13093SRoger.Faulkner@Oracle.COM #if defined(__EXTENSIONS__) || \ 181*13093SRoger.Faulkner@Oracle.COM (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) 182*13093SRoger.Faulkner@Oracle.COM /* || defined(_XPG7) */ 183*13093SRoger.Faulkner@Oracle.COM extern wchar_t *wcsdup(); 184*13093SRoger.Faulkner@Oracle.COM extern size_t wcsnlen(); 185*13093SRoger.Faulkner@Oracle.COM extern wchar_t *wcpcpy(); 186*13093SRoger.Faulkner@Oracle.COM extern wchar_t *wcpncpy(); 187*13093SRoger.Faulkner@Oracle.COM extern int wcscasecmp(); 188*13093SRoger.Faulkner@Oracle.COM extern int wcsncasecmp(); 189*13093SRoger.Faulkner@Oracle.COM #endif 190*13093SRoger.Faulkner@Oracle.COM 1910Sstevel@tonic-gate #endif /* __STDC__ */ 1920Sstevel@tonic-gate 1930Sstevel@tonic-gate #ifdef __cplusplus 1940Sstevel@tonic-gate } 1950Sstevel@tonic-gate #endif 1960Sstevel@tonic-gate 1970Sstevel@tonic-gate #endif /* _WCHAR_H */ 198