1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* 28*7c478bd9Sstevel@tonic-gate * An application should not include this header directly. Instead it 29*7c478bd9Sstevel@tonic-gate * should be included only through the inclusion of other Sun headers. 30*7c478bd9Sstevel@tonic-gate * 31*7c478bd9Sstevel@tonic-gate * The contents of this header is limited to identifiers specified in the 32*7c478bd9Sstevel@tonic-gate * C Standard. Any new identifiers specified in future amendments to the 33*7c478bd9Sstevel@tonic-gate * C Standard must be placed in this header. If these new identifiers 34*7c478bd9Sstevel@tonic-gate * are required to also be in the C++ Standard "std" namespace, then for 35*7c478bd9Sstevel@tonic-gate * anything other than macro definitions, corresponding "using" directives 36*7c478bd9Sstevel@tonic-gate * must also be added to <wchar.h>. 37*7c478bd9Sstevel@tonic-gate */ 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate #ifndef _ISO_WCHAR_ISO_H 40*7c478bd9Sstevel@tonic-gate #define _ISO_WCHAR_ISO_H 41*7c478bd9Sstevel@tonic-gate 42*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gate #include <sys/feature_tests.h> 45*7c478bd9Sstevel@tonic-gate #include <stdio_tag.h> 46*7c478bd9Sstevel@tonic-gate #include <wchar_impl.h> 47*7c478bd9Sstevel@tonic-gate #include <iso/time_iso.h> 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate #if (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) || \ 50*7c478bd9Sstevel@tonic-gate (!defined(__cplusplus) && !defined(_STRICT_STDC)) || \ 51*7c478bd9Sstevel@tonic-gate defined(__EXTENSIONS__) 52*7c478bd9Sstevel@tonic-gate #include <stdio.h> 53*7c478bd9Sstevel@tonic-gate #endif /* (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) ... */ 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(__EXTENSIONS__) 56*7c478bd9Sstevel@tonic-gate #include <ctype.h> 57*7c478bd9Sstevel@tonic-gate #include <stddef.h> 58*7c478bd9Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(__EXTENSIONS__) */ 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gate #include <sys/va_list.h> 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 63*7c478bd9Sstevel@tonic-gate extern "C" { 64*7c478bd9Sstevel@tonic-gate #endif 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 67*7c478bd9Sstevel@tonic-gate namespace std { 68*7c478bd9Sstevel@tonic-gate #endif 69*7c478bd9Sstevel@tonic-gate 70*7c478bd9Sstevel@tonic-gate /* 71*7c478bd9Sstevel@tonic-gate * wchar_t is a built-in type in standard C++ and as such is not 72*7c478bd9Sstevel@tonic-gate * defined here when using standard C++. However, the GNU compiler 73*7c478bd9Sstevel@tonic-gate * fixincludes utility nonetheless creates it's own version of this 74*7c478bd9Sstevel@tonic-gate * header for use by gcc and g++. In that version it adds a redundant 75*7c478bd9Sstevel@tonic-gate * guard for __cplusplus. To avoid the creation of a gcc/g++ specific 76*7c478bd9Sstevel@tonic-gate * header we need to include the following magic comment: 77*7c478bd9Sstevel@tonic-gate * 78*7c478bd9Sstevel@tonic-gate * we must use the C++ compiler's type 79*7c478bd9Sstevel@tonic-gate * 80*7c478bd9Sstevel@tonic-gate * The above comment should not be removed or changed until GNU 81*7c478bd9Sstevel@tonic-gate * gcc/fixinc/inclhack.def is updated to bypass this header. 82*7c478bd9Sstevel@tonic-gate */ 83*7c478bd9Sstevel@tonic-gate #if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__)) 84*7c478bd9Sstevel@tonic-gate #ifndef _WCHAR_T 85*7c478bd9Sstevel@tonic-gate #define _WCHAR_T 86*7c478bd9Sstevel@tonic-gate #if defined(_LP64) 87*7c478bd9Sstevel@tonic-gate typedef int wchar_t; 88*7c478bd9Sstevel@tonic-gate #else 89*7c478bd9Sstevel@tonic-gate typedef long wchar_t; 90*7c478bd9Sstevel@tonic-gate #endif 91*7c478bd9Sstevel@tonic-gate #endif /* !_WCHAR_T */ 92*7c478bd9Sstevel@tonic-gate #endif /* !defined(__cplusplus) ... */ 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate #if !defined(_WINT_T) || __cplusplus >= 199711L 95*7c478bd9Sstevel@tonic-gate #define _WINT_T 96*7c478bd9Sstevel@tonic-gate #if defined(_LP64) 97*7c478bd9Sstevel@tonic-gate typedef int wint_t; 98*7c478bd9Sstevel@tonic-gate #else 99*7c478bd9Sstevel@tonic-gate typedef long wint_t; 100*7c478bd9Sstevel@tonic-gate #endif 101*7c478bd9Sstevel@tonic-gate #endif /* !defined(_WINT_T) || __cplusplus >= 199711L */ 102*7c478bd9Sstevel@tonic-gate 103*7c478bd9Sstevel@tonic-gate #if !defined(_SIZE_T) || __cplusplus >= 199711L 104*7c478bd9Sstevel@tonic-gate #define _SIZE_T 105*7c478bd9Sstevel@tonic-gate #if defined(_LP64) || defined(_I32LPx) 106*7c478bd9Sstevel@tonic-gate typedef unsigned long size_t; /* size of something in bytes */ 107*7c478bd9Sstevel@tonic-gate #else 108*7c478bd9Sstevel@tonic-gate typedef unsigned int size_t; /* (historical version) */ 109*7c478bd9Sstevel@tonic-gate #endif 110*7c478bd9Sstevel@tonic-gate #endif /* !defined(_SIZE_T) || __cplusplus >= 199711L */ 111*7c478bd9Sstevel@tonic-gate 112*7c478bd9Sstevel@tonic-gate #ifndef NULL 113*7c478bd9Sstevel@tonic-gate #if defined(_LP64) 114*7c478bd9Sstevel@tonic-gate #define NULL 0L 115*7c478bd9Sstevel@tonic-gate #else 116*7c478bd9Sstevel@tonic-gate #define NULL 0 117*7c478bd9Sstevel@tonic-gate #endif 118*7c478bd9Sstevel@tonic-gate #endif /* !NULL */ 119*7c478bd9Sstevel@tonic-gate 120*7c478bd9Sstevel@tonic-gate #ifndef WEOF 121*7c478bd9Sstevel@tonic-gate #define WEOF ((wint_t)(-1)) 122*7c478bd9Sstevel@tonic-gate #endif 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 125*7c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 126*7c478bd9Sstevel@tonic-gate #ifndef WCHAR_MAX 127*7c478bd9Sstevel@tonic-gate #define WCHAR_MAX 2147483647 128*7c478bd9Sstevel@tonic-gate #endif 129*7c478bd9Sstevel@tonic-gate #ifndef WCHAR_MIN 130*7c478bd9Sstevel@tonic-gate #define WCHAR_MIN (-2147483647-1) 131*7c478bd9Sstevel@tonic-gate #endif 132*7c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 133*7c478bd9Sstevel@tonic-gate 134*7c478bd9Sstevel@tonic-gate #if !defined(_MBSTATE_T) || __cplusplus >= 199711L 135*7c478bd9Sstevel@tonic-gate #define _MBSTATE_T 136*7c478bd9Sstevel@tonic-gate typedef __mbstate_t mbstate_t; 137*7c478bd9Sstevel@tonic-gate #endif /* _MBSTATE_T */ 138*7c478bd9Sstevel@tonic-gate 139*7c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_FILEDEFED) || __cplusplus >= 199711L 140*7c478bd9Sstevel@tonic-gate #define _FILEDEFED 141*7c478bd9Sstevel@tonic-gate typedef __FILE FILE; 142*7c478bd9Sstevel@tonic-gate #endif 143*7c478bd9Sstevel@tonic-gate 144*7c478bd9Sstevel@tonic-gate #if !defined(_LP64) && !defined(_LONGLONG_TYPE) 145*7c478bd9Sstevel@tonic-gate 146*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 147*7c478bd9Sstevel@tonic-gate #pragma redefine_extname fwprintf _fwprintf_c89 148*7c478bd9Sstevel@tonic-gate #pragma redefine_extname swprintf _swprintf_c89 149*7c478bd9Sstevel@tonic-gate #pragma redefine_extname vfwprintf _vfwprintf_c89 150*7c478bd9Sstevel@tonic-gate #pragma redefine_extname vswprintf _vswprintf_c89 151*7c478bd9Sstevel@tonic-gate #pragma redefine_extname vwprintf _vwprintf_c89 152*7c478bd9Sstevel@tonic-gate #pragma redefine_extname wprintf _wprintf_c89 153*7c478bd9Sstevel@tonic-gate #pragma redefine_extname fwscanf _fwscanf_c89 154*7c478bd9Sstevel@tonic-gate #pragma redefine_extname swscanf _swscanf_c89 155*7c478bd9Sstevel@tonic-gate #pragma redefine_extname wscanf _wscanf_c89 156*7c478bd9Sstevel@tonic-gate #else 157*7c478bd9Sstevel@tonic-gate #define fwprintf _fwprintf_c89 158*7c478bd9Sstevel@tonic-gate #define swprintf _swprintf_c89 159*7c478bd9Sstevel@tonic-gate #define vfwprintf _vfwprintf_c89 160*7c478bd9Sstevel@tonic-gate #define vswprintf _vswprintf_c89 161*7c478bd9Sstevel@tonic-gate #define vwprintf _vwprintf_c89 162*7c478bd9Sstevel@tonic-gate #define wprintf _wprintf_c89 163*7c478bd9Sstevel@tonic-gate #define fwscanf _fwscanf_c89 164*7c478bd9Sstevel@tonic-gate #define swscanf _swscanf_c89 165*7c478bd9Sstevel@tonic-gate #define wscanf _wscanf_c89 166*7c478bd9Sstevel@tonic-gate #endif 167*7c478bd9Sstevel@tonic-gate 168*7c478bd9Sstevel@tonic-gate #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */ 169*7c478bd9Sstevel@tonic-gate 170*7c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 171*7c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 172*7c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 173*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 174*7c478bd9Sstevel@tonic-gate #pragma redefine_extname fgetwc __fgetwc_xpg5 175*7c478bd9Sstevel@tonic-gate #pragma redefine_extname getwc __getwc_xpg5 176*7c478bd9Sstevel@tonic-gate #pragma redefine_extname getwchar __getwchar_xpg5 177*7c478bd9Sstevel@tonic-gate #pragma redefine_extname fputwc __fputwc_xpg5 178*7c478bd9Sstevel@tonic-gate #pragma redefine_extname putwc __putwc_xpg5 179*7c478bd9Sstevel@tonic-gate #pragma redefine_extname putwchar __putwchar_xpg5 180*7c478bd9Sstevel@tonic-gate #pragma redefine_extname fgetws __fgetws_xpg5 181*7c478bd9Sstevel@tonic-gate #pragma redefine_extname fputws __fputws_xpg5 182*7c478bd9Sstevel@tonic-gate #pragma redefine_extname ungetwc __ungetwc_xpg5 183*7c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 184*7c478bd9Sstevel@tonic-gate #ifdef __STDC__ 185*7c478bd9Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(__FILE *); 186*7c478bd9Sstevel@tonic-gate extern wint_t __getwc_xpg5(__FILE *); 187*7c478bd9Sstevel@tonic-gate extern wint_t __getwchar_xpg5(void); 188*7c478bd9Sstevel@tonic-gate extern wint_t __fputwc_xpg5(wint_t, __FILE *); 189*7c478bd9Sstevel@tonic-gate extern wint_t __putwc_xpg5(wint_t, __FILE *); 190*7c478bd9Sstevel@tonic-gate extern wint_t __putwchar_xpg5(wint_t); 191*7c478bd9Sstevel@tonic-gate extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, 192*7c478bd9Sstevel@tonic-gate __FILE *_RESTRICT_KYWD); 193*7c478bd9Sstevel@tonic-gate extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); 194*7c478bd9Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(wint_t, __FILE *); 195*7c478bd9Sstevel@tonic-gate #else 196*7c478bd9Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(); 197*7c478bd9Sstevel@tonic-gate extern wint_t __getwc_xpg5(); 198*7c478bd9Sstevel@tonic-gate extern wint_t __getwchar_xpg5(); 199*7c478bd9Sstevel@tonic-gate extern wint_t __fputwc_xpg5(); 200*7c478bd9Sstevel@tonic-gate extern wint_t __putwc_xpg5(); 201*7c478bd9Sstevel@tonic-gate extern wint_t __putwchar_xpg5(); 202*7c478bd9Sstevel@tonic-gate extern wchar_t *__fgetws_xpg5(); 203*7c478bd9Sstevel@tonic-gate extern int __fputws_xpg5(); 204*7c478bd9Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(); 205*7c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 206*7c478bd9Sstevel@tonic-gate #define fgetwc __fgetwc_xpg5 207*7c478bd9Sstevel@tonic-gate #define getwc __getwc_xpg5 208*7c478bd9Sstevel@tonic-gate #define getwchar __getwchar_xpg5 209*7c478bd9Sstevel@tonic-gate #define fputwc __fputwc_xpg5 210*7c478bd9Sstevel@tonic-gate #define putwc __putwc_xpg5 211*7c478bd9Sstevel@tonic-gate #define putwchar __putwchar_xpg5 212*7c478bd9Sstevel@tonic-gate #define fgetws __fgetws_xpg5 213*7c478bd9Sstevel@tonic-gate #define fputws __fputws_xpg5 214*7c478bd9Sstevel@tonic-gate #define ungetwc __ungetwc_xpg5 215*7c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 216*7c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 217*7c478bd9Sstevel@tonic-gate #endif /* defined(_MSE_INT_H) */ 218*7c478bd9Sstevel@tonic-gate 219*7c478bd9Sstevel@tonic-gate #ifdef __STDC__ 220*7c478bd9Sstevel@tonic-gate 221*7c478bd9Sstevel@tonic-gate extern wint_t fgetwc(__FILE *); 222*7c478bd9Sstevel@tonic-gate extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD); 223*7c478bd9Sstevel@tonic-gate extern wint_t fputwc(wint_t, __FILE *); 224*7c478bd9Sstevel@tonic-gate extern int fputws(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); 225*7c478bd9Sstevel@tonic-gate extern wint_t ungetwc(wint_t, __FILE *); 226*7c478bd9Sstevel@tonic-gate extern wint_t getwc(__FILE *); 227*7c478bd9Sstevel@tonic-gate extern wint_t getwchar(void); 228*7c478bd9Sstevel@tonic-gate extern wint_t putwc(wint_t, __FILE *); 229*7c478bd9Sstevel@tonic-gate extern wint_t putwchar(wint_t); 230*7c478bd9Sstevel@tonic-gate extern double wcstod(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD); 231*7c478bd9Sstevel@tonic-gate extern long wcstol(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD, 232*7c478bd9Sstevel@tonic-gate int); 233*7c478bd9Sstevel@tonic-gate extern unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD, 234*7c478bd9Sstevel@tonic-gate wchar_t **_RESTRICT_KYWD, int); 235*7c478bd9Sstevel@tonic-gate extern wchar_t *wcscat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 236*7c478bd9Sstevel@tonic-gate extern int wcscmp(const wchar_t *, const wchar_t *); 237*7c478bd9Sstevel@tonic-gate extern int wcscoll(const wchar_t *, const wchar_t *); 238*7c478bd9Sstevel@tonic-gate extern wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD); 239*7c478bd9Sstevel@tonic-gate extern size_t wcscspn(const wchar_t *, const wchar_t *); 240*7c478bd9Sstevel@tonic-gate extern size_t wcslen(const wchar_t *); 241*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 242*7c478bd9Sstevel@tonic-gate size_t); 243*7c478bd9Sstevel@tonic-gate extern int wcsncmp(const wchar_t *, const wchar_t *, size_t); 244*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 245*7c478bd9Sstevel@tonic-gate size_t); 246*7c478bd9Sstevel@tonic-gate extern size_t wcsspn(const wchar_t *, const wchar_t *); 247*7c478bd9Sstevel@tonic-gate extern size_t wcsxfrm(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 248*7c478bd9Sstevel@tonic-gate size_t); 249*7c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 250*7c478bd9Sstevel@tonic-gate extern const wchar_t *wcschr(const wchar_t *, wchar_t); 251*7c478bd9Sstevel@tonic-gate extern "C++" { 252*7c478bd9Sstevel@tonic-gate inline wchar_t *wcschr(wchar_t *__ws, wchar_t __wc) { 253*7c478bd9Sstevel@tonic-gate return (wchar_t *)wcschr((const wchar_t *)__ws, __wc); 254*7c478bd9Sstevel@tonic-gate } 255*7c478bd9Sstevel@tonic-gate } 256*7c478bd9Sstevel@tonic-gate extern const wchar_t *wcspbrk(const wchar_t *, const wchar_t *); 257*7c478bd9Sstevel@tonic-gate extern "C++" { 258*7c478bd9Sstevel@tonic-gate inline wchar_t *wcspbrk(wchar_t *__ws1, const wchar_t *__ws2) { 259*7c478bd9Sstevel@tonic-gate return (wchar_t *)wcspbrk((const wchar_t *)__ws1, __ws2); 260*7c478bd9Sstevel@tonic-gate } 261*7c478bd9Sstevel@tonic-gate } 262*7c478bd9Sstevel@tonic-gate extern const wchar_t *wcsrchr(const wchar_t *, wchar_t); 263*7c478bd9Sstevel@tonic-gate extern "C++" { 264*7c478bd9Sstevel@tonic-gate inline wchar_t *wcsrchr(wchar_t *__ws, wchar_t __wc) { 265*7c478bd9Sstevel@tonic-gate return (wchar_t *)wcsrchr((const wchar_t *)__ws, __wc); 266*7c478bd9Sstevel@tonic-gate } 267*7c478bd9Sstevel@tonic-gate } 268*7c478bd9Sstevel@tonic-gate #else /* __cplusplus >= 199711L */ 269*7c478bd9Sstevel@tonic-gate extern wchar_t *wcschr(const wchar_t *, wchar_t); 270*7c478bd9Sstevel@tonic-gate extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *); 271*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsrchr(const wchar_t *, wchar_t); 272*7c478bd9Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 273*7c478bd9Sstevel@tonic-gate 274*7c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 275*7c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */ 276*7c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *, const wchar_t *); 277*7c478bd9Sstevel@tonic-gate extern size_t wcsftime(wchar_t *, size_t, const char *, const struct tm *); 278*7c478bd9Sstevel@tonic-gate #else /* XPG4 or XPG4v2 */ 279*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 280*7c478bd9Sstevel@tonic-gate #pragma redefine_extname wcstok __wcstok_xpg5 281*7c478bd9Sstevel@tonic-gate #pragma redefine_extname wcsftime __wcsftime_xpg5 282*7c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 283*7c478bd9Sstevel@tonic-gate wchar_t **_RESTRICT_KYWD); 284*7c478bd9Sstevel@tonic-gate extern size_t wcsftime(wchar_t *_RESTRICT_KYWD, size_t, 285*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); 286*7c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 287*7c478bd9Sstevel@tonic-gate extern wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD, 288*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD); 289*7c478bd9Sstevel@tonic-gate extern size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t, 290*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); 291*7c478bd9Sstevel@tonic-gate #define wcstok __wcstok_xpg5 292*7c478bd9Sstevel@tonic-gate #define wcsftime __wcsftime_xpg5 293*7c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 294*7c478bd9Sstevel@tonic-gate #endif /* XPG4 or XPG4v2 */ 295*7c478bd9Sstevel@tonic-gate #endif /* !defined(_MSE_INT_H) */ 296*7c478bd9Sstevel@tonic-gate 297*7c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 298*7c478bd9Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5) 299*7c478bd9Sstevel@tonic-gate extern wint_t btowc(int); 300*7c478bd9Sstevel@tonic-gate extern int fwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 301*7c478bd9Sstevel@tonic-gate ...); 302*7c478bd9Sstevel@tonic-gate extern int fwscanf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 303*7c478bd9Sstevel@tonic-gate ...); 304*7c478bd9Sstevel@tonic-gate extern int fwide(__FILE *, int); 305*7c478bd9Sstevel@tonic-gate extern int mbsinit(const mbstate_t *); 306*7c478bd9Sstevel@tonic-gate extern size_t mbrlen(const char *_RESTRICT_KYWD, size_t, 307*7c478bd9Sstevel@tonic-gate mbstate_t *_RESTRICT_KYWD); 308*7c478bd9Sstevel@tonic-gate extern size_t mbrtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, 309*7c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 310*7c478bd9Sstevel@tonic-gate extern size_t mbsrtowcs(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD, 311*7c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 312*7c478bd9Sstevel@tonic-gate extern int swprintf(wchar_t *_RESTRICT_KYWD, size_t, 313*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, ...); 314*7c478bd9Sstevel@tonic-gate extern int swscanf(const wchar_t *_RESTRICT_KYWD, 315*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, ...); 316*7c478bd9Sstevel@tonic-gate extern int vfwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, 317*7c478bd9Sstevel@tonic-gate __va_list); 318*7c478bd9Sstevel@tonic-gate extern int vwprintf(const wchar_t *_RESTRICT_KYWD, __va_list); 319*7c478bd9Sstevel@tonic-gate extern int vswprintf(wchar_t *_RESTRICT_KYWD, size_t, 320*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, __va_list); 321*7c478bd9Sstevel@tonic-gate extern size_t wcrtomb(char *_RESTRICT_KYWD, wchar_t, 322*7c478bd9Sstevel@tonic-gate mbstate_t *_RESTRICT_KYWD); 323*7c478bd9Sstevel@tonic-gate extern size_t wcsrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD, 324*7c478bd9Sstevel@tonic-gate size_t, mbstate_t *_RESTRICT_KYWD); 325*7c478bd9Sstevel@tonic-gate extern int wctob(wint_t); 326*7c478bd9Sstevel@tonic-gate extern int wmemcmp(const wchar_t *, const wchar_t *, size_t); 327*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemcpy(wchar_t *_RESTRICT_KYWD, 328*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD, size_t); 329*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); 330*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemset(wchar_t *, wchar_t, size_t); 331*7c478bd9Sstevel@tonic-gate extern int wprintf(const wchar_t *_RESTRICT_KYWD, ...); 332*7c478bd9Sstevel@tonic-gate extern int wscanf(const wchar_t *_RESTRICT_KYWD, ...); 333*7c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 334*7c478bd9Sstevel@tonic-gate extern const wchar_t *wcsstr(const wchar_t *, const wchar_t *); 335*7c478bd9Sstevel@tonic-gate extern "C++" { 336*7c478bd9Sstevel@tonic-gate inline wchar_t *wcsstr(wchar_t *__ws1, const wchar_t *__ws2) { 337*7c478bd9Sstevel@tonic-gate return (wchar_t *)wcsstr((const wchar_t *)__ws1, __ws2); 338*7c478bd9Sstevel@tonic-gate } 339*7c478bd9Sstevel@tonic-gate } 340*7c478bd9Sstevel@tonic-gate extern const wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); 341*7c478bd9Sstevel@tonic-gate extern "C++" { 342*7c478bd9Sstevel@tonic-gate inline wchar_t *wmemchr(wchar_t *__ws, wchar_t __wc, size_t __n) { 343*7c478bd9Sstevel@tonic-gate return (wchar_t *)wmemchr((const wchar_t *)__ws, __wc, __n); 344*7c478bd9Sstevel@tonic-gate } 345*7c478bd9Sstevel@tonic-gate } 346*7c478bd9Sstevel@tonic-gate #else /* __cplusplus >= 199711L */ 347*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsstr(const wchar_t *_RESTRICT_KYWD, 348*7c478bd9Sstevel@tonic-gate const wchar_t *_RESTRICT_KYWD); 349*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); 350*7c478bd9Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */ 351*7c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 352*7c478bd9Sstevel@tonic-gate 353*7c478bd9Sstevel@tonic-gate #else /* __STDC__ */ 354*7c478bd9Sstevel@tonic-gate 355*7c478bd9Sstevel@tonic-gate extern wint_t fgetwc(); 356*7c478bd9Sstevel@tonic-gate extern wchar_t *fgetws(); 357*7c478bd9Sstevel@tonic-gate extern wint_t fputwc(); 358*7c478bd9Sstevel@tonic-gate extern int fputws(); 359*7c478bd9Sstevel@tonic-gate extern wint_t ungetwc(); 360*7c478bd9Sstevel@tonic-gate extern wint_t getwc(); 361*7c478bd9Sstevel@tonic-gate extern wint_t getwchar(); 362*7c478bd9Sstevel@tonic-gate extern wint_t putwc(); 363*7c478bd9Sstevel@tonic-gate extern wint_t putwchar(); 364*7c478bd9Sstevel@tonic-gate extern wint_t ungetwc(); 365*7c478bd9Sstevel@tonic-gate extern double wcstod(); 366*7c478bd9Sstevel@tonic-gate extern long wcstol(); 367*7c478bd9Sstevel@tonic-gate extern unsigned long wcstoul(); 368*7c478bd9Sstevel@tonic-gate extern wchar_t *wcscat(); 369*7c478bd9Sstevel@tonic-gate extern wchar_t *wcschr(); 370*7c478bd9Sstevel@tonic-gate extern int wcscmp(); 371*7c478bd9Sstevel@tonic-gate extern int wcscoll(); 372*7c478bd9Sstevel@tonic-gate extern wchar_t *wcscpy(); 373*7c478bd9Sstevel@tonic-gate extern size_t wcscspn(); 374*7c478bd9Sstevel@tonic-gate extern size_t wcslen(); 375*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsncat(); 376*7c478bd9Sstevel@tonic-gate extern int wcsncmp(); 377*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsncpy(); 378*7c478bd9Sstevel@tonic-gate extern wchar_t *wcspbrk(); 379*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsrchr(); 380*7c478bd9Sstevel@tonic-gate extern size_t wcsspn(); 381*7c478bd9Sstevel@tonic-gate extern size_t wcsxfrm(); 382*7c478bd9Sstevel@tonic-gate 383*7c478bd9Sstevel@tonic-gate #if (!defined(_MSE_INT_H)) 384*7c478bd9Sstevel@tonic-gate #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */ 385*7c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(); 386*7c478bd9Sstevel@tonic-gate extern size_t wcsftime(); 387*7c478bd9Sstevel@tonic-gate #else /* XPG4 or XPG4v2 */ 388*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 389*7c478bd9Sstevel@tonic-gate #pragma redefine_extname wcstok __wcstok_xpg5 390*7c478bd9Sstevel@tonic-gate #pragma redefine_extname wcsftime __wcsftime_xpg5 391*7c478bd9Sstevel@tonic-gate extern wchar_t *wcstok(); 392*7c478bd9Sstevel@tonic-gate extern size_t wcsftime(); 393*7c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 394*7c478bd9Sstevel@tonic-gate extern wchar_t *__wcstok_xpg5(); 395*7c478bd9Sstevel@tonic-gate extern size_t __wcsftime_xpg5(); 396*7c478bd9Sstevel@tonic-gate #define wcstok __wcstok_xpg5 397*7c478bd9Sstevel@tonic-gate #define wcsftime __wcsftime_xpg5 398*7c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 399*7c478bd9Sstevel@tonic-gate #endif /* XPG4 or XPG4v2 */ 400*7c478bd9Sstevel@tonic-gate #endif /* defined(_MSE_INT_H) */ 401*7c478bd9Sstevel@tonic-gate 402*7c478bd9Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */ 403*7c478bd9Sstevel@tonic-gate #if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5)) 404*7c478bd9Sstevel@tonic-gate extern wint_t btowc(); 405*7c478bd9Sstevel@tonic-gate extern int fwprintf(); 406*7c478bd9Sstevel@tonic-gate extern int fwscanf(); 407*7c478bd9Sstevel@tonic-gate extern int fwide(); 408*7c478bd9Sstevel@tonic-gate extern int mbsinit(); 409*7c478bd9Sstevel@tonic-gate extern size_t mbrlen(); 410*7c478bd9Sstevel@tonic-gate extern size_t mbrtowc(); 411*7c478bd9Sstevel@tonic-gate extern size_t mbsrtowcs(); 412*7c478bd9Sstevel@tonic-gate extern int swprintf(); 413*7c478bd9Sstevel@tonic-gate extern int swscanf(); 414*7c478bd9Sstevel@tonic-gate extern int vfwprintf(); 415*7c478bd9Sstevel@tonic-gate extern int vwprintf(); 416*7c478bd9Sstevel@tonic-gate extern int vswprintf(); 417*7c478bd9Sstevel@tonic-gate extern size_t wcrtomb(); 418*7c478bd9Sstevel@tonic-gate extern size_t wcsrtombs(); 419*7c478bd9Sstevel@tonic-gate extern wchar_t *wcsstr(); 420*7c478bd9Sstevel@tonic-gate extern int wctob(); 421*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemchr(); 422*7c478bd9Sstevel@tonic-gate extern int wmemcmp(); 423*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemcpy(); 424*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemmove(); 425*7c478bd9Sstevel@tonic-gate extern wchar_t *wmemset(); 426*7c478bd9Sstevel@tonic-gate extern int wprintf(); 427*7c478bd9Sstevel@tonic-gate extern int wscanf(); 428*7c478bd9Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */ 429*7c478bd9Sstevel@tonic-gate 430*7c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 431*7c478bd9Sstevel@tonic-gate 432*7c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 433*7c478bd9Sstevel@tonic-gate } 434*7c478bd9Sstevel@tonic-gate #endif /* end of namespace std */ 435*7c478bd9Sstevel@tonic-gate 436*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 437*7c478bd9Sstevel@tonic-gate } 438*7c478bd9Sstevel@tonic-gate #endif 439*7c478bd9Sstevel@tonic-gate 440*7c478bd9Sstevel@tonic-gate #endif /* _ISO_WCHAR_ISO_H */ 441