1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. 24 */ 25 26#ifndef _WCHAR_H 27#define _WCHAR_H 28 29#include <sys/feature_tests.h> 30#include <iso/wchar_iso.h> 31#include <iso/wchar_c99.h> 32 33/* 34 * Allow global visibility for symbols defined in 35 * C++ "std" namespace in <iso/wchar_iso.h>. 36 */ 37#if __cplusplus >= 199711L 38using std::FILE; 39using std::wint_t; 40using std::clock_t; 41using std::size_t; 42using std::time_t; 43using std::tm; 44using std::mbstate_t; 45using std::fgetwc; 46using std::fgetws; 47using std::fputwc; 48using std::fputws; 49using std::ungetwc; 50using std::getwc; 51using std::getwchar; 52using std::putwc; 53using std::putwchar; 54using std::wcstod; 55using std::wcstol; 56using std::wcstoul; 57using std::wcscat; 58using std::wcschr; 59using std::wcscmp; 60using std::wcscoll; 61using std::wcscpy; 62using std::wcscspn; 63using std::wcslen; 64using std::wcsncat; 65using std::wcsncmp; 66using std::wcsncpy; 67using std::wcspbrk; 68using std::wcsrchr; 69using std::wcsspn; 70using std::wcsxfrm; 71using std::wcstok; 72using std::wcsftime; 73/* not XPG4 and not XPG4v2 */ 74#if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5)) 75using std::btowc; 76using std::fwprintf; 77using std::fwscanf; 78using std::fwide; 79using std::mbsinit; 80using std::mbrlen; 81using std::mbrtowc; 82using std::mbsrtowcs; 83using std::swprintf; 84using std::swscanf; 85using std::vfwprintf; 86using std::vwprintf; 87using std::vswprintf; 88using std::wcrtomb; 89using std::wcsrtombs; 90using std::wcsstr; 91using std::wctob; 92using std::wmemchr; 93using std::wmemcmp; 94using std::wmemcpy; 95using std::wmemmove; 96using std::wmemset; 97using std::wprintf; 98using std::wscanf; 99#endif /* not XPG4 and not XPG4v2 */ 100#endif /* __cplusplus >= 199711L */ 101 102#ifdef __cplusplus 103extern "C" { 104#endif 105 106#if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 107#if !defined(_WCTYPE_T) || __cplusplus >= 199711L 108#define _WCTYPE_T 109typedef int wctype_t; 110#endif 111#endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 112 113/* 114 * XPG6 requires that va_list be defined as defined in <stdarg.h>, 115 * however, inclusion of <stdarg.h> breaks Standard C namespace. 116 */ 117#if defined(_XPG6) && !defined(_VA_LIST) 118#define _VA_LIST 119typedef __va_list va_list; 120#endif /* defined(_XPG6) && !defined(_VA_LIST) */ 121 122#ifdef __STDC__ 123 124#if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 125extern int iswalpha(wint_t); 126extern int iswupper(wint_t); 127extern int iswlower(wint_t); 128extern int iswdigit(wint_t); 129extern int iswxdigit(wint_t); 130extern int iswalnum(wint_t); 131extern int iswspace(wint_t); 132extern int iswpunct(wint_t); 133extern int iswprint(wint_t); 134extern int iswgraph(wint_t); 135extern int iswcntrl(wint_t); 136extern int iswctype(wint_t, wctype_t); 137extern wint_t towlower(wint_t); 138extern wint_t towupper(wint_t); 139extern wchar_t *wcswcs(const wchar_t *, const wchar_t *); 140extern int wcswidth(const wchar_t *, size_t); 141extern int wcwidth(wchar_t); 142extern wctype_t wctype(const char *); 143#endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 144 145#if defined(__EXTENSIONS__) || \ 146 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) 147 /* || defined(_XPG7) */ 148extern wchar_t *wcsdup(const wchar_t *); 149extern size_t wcsnlen(const wchar_t *, size_t); 150extern wchar_t *wcpcpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 151extern wchar_t *wcpncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 152 size_t); 153extern int wcscasecmp(const wchar_t *, const wchar_t *); 154extern int wcsncasecmp(const wchar_t *, const wchar_t *, size_t); 155#endif 156 157#else /* __STDC__ */ 158 159#if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) 160extern int iswalpha(); 161extern int iswupper(); 162extern int iswlower(); 163extern int iswdigit(); 164extern int iswxdigit(); 165extern int iswalnum(); 166extern int iswspace(); 167extern int iswpunct(); 168extern int iswprint(); 169extern int iswgraph(); 170extern int iswcntrl(); 171extern int iswctype(); 172extern wint_t towlower(); 173extern wint_t towupper(); 174extern wchar_t *wcswcs(); 175extern int wcswidth(); 176extern int wcwidth(); 177extern wctype_t wctype(); 178#endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ 179 180#if defined(__EXTENSIONS__) || \ 181 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) 182 /* || defined(_XPG7) */ 183extern wchar_t *wcsdup(); 184extern size_t wcsnlen(); 185extern wchar_t *wcpcpy(); 186extern wchar_t *wcpncpy(); 187extern int wcscasecmp(); 188extern int wcsncasecmp(); 189#endif 190 191#endif /* __STDC__ */ 192 193#ifdef __cplusplus 194} 195#endif 196 197#endif /* _WCHAR_H */ 198