xref: /onnv-gate/usr/src/head/iso/wchar_iso.h (revision 2270:495db15e43ee)
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
5*2270Sdamico  * Common Development and Distribution License (the "License").
6*2270Sdamico  * 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  */
21*2270Sdamico 
220Sstevel@tonic-gate /*
23*2270Sdamico  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate /*
280Sstevel@tonic-gate  * An application should not include this header directly.  Instead it
290Sstevel@tonic-gate  * should be included only through the inclusion of other Sun headers.
300Sstevel@tonic-gate  *
310Sstevel@tonic-gate  * The contents of this header is limited to identifiers specified in the
320Sstevel@tonic-gate  * C Standard.  Any new identifiers specified in future amendments to the
330Sstevel@tonic-gate  * C Standard must be placed in this header.  If these new identifiers
340Sstevel@tonic-gate  * are required to also be in the C++ Standard "std" namespace, then for
350Sstevel@tonic-gate  * anything other than macro definitions, corresponding "using" directives
360Sstevel@tonic-gate  * must also be added to <wchar.h>.
370Sstevel@tonic-gate  */
380Sstevel@tonic-gate 
390Sstevel@tonic-gate #ifndef	_ISO_WCHAR_ISO_H
400Sstevel@tonic-gate #define	_ISO_WCHAR_ISO_H
410Sstevel@tonic-gate 
420Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
430Sstevel@tonic-gate 
440Sstevel@tonic-gate #include <sys/feature_tests.h>
450Sstevel@tonic-gate #include <stdio_tag.h>
460Sstevel@tonic-gate #include <wchar_impl.h>
470Sstevel@tonic-gate #include <iso/time_iso.h>
480Sstevel@tonic-gate 
490Sstevel@tonic-gate #if (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) || \
500Sstevel@tonic-gate 	(!defined(__cplusplus) && !defined(_STRICT_STDC)) || \
510Sstevel@tonic-gate 	defined(__EXTENSIONS__)
520Sstevel@tonic-gate #include <stdio.h>
530Sstevel@tonic-gate #endif  /*  (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) ... */
540Sstevel@tonic-gate 
550Sstevel@tonic-gate #if !defined(_STRICT_STDC) || defined(__EXTENSIONS__)
560Sstevel@tonic-gate #include <ctype.h>
570Sstevel@tonic-gate #include <stddef.h>
580Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) || defined(__EXTENSIONS__) */
590Sstevel@tonic-gate 
600Sstevel@tonic-gate #include <sys/va_list.h>
610Sstevel@tonic-gate 
620Sstevel@tonic-gate #ifdef	__cplusplus
630Sstevel@tonic-gate extern "C" {
640Sstevel@tonic-gate #endif
650Sstevel@tonic-gate 
660Sstevel@tonic-gate #if __cplusplus >= 199711L
670Sstevel@tonic-gate namespace std {
680Sstevel@tonic-gate #endif
690Sstevel@tonic-gate 
700Sstevel@tonic-gate /*
710Sstevel@tonic-gate  * wchar_t is a built-in type in standard C++ and as such is not
720Sstevel@tonic-gate  * defined here when using standard C++. However, the GNU compiler
73376Swesolows  * fixincludes utility nonetheless creates its own version of this
740Sstevel@tonic-gate  * header for use by gcc and g++. In that version it adds a redundant
750Sstevel@tonic-gate  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
760Sstevel@tonic-gate  * header we need to include the following magic comment:
770Sstevel@tonic-gate  *
780Sstevel@tonic-gate  * we must use the C++ compiler's type
790Sstevel@tonic-gate  *
800Sstevel@tonic-gate  * The above comment should not be removed or changed until GNU
810Sstevel@tonic-gate  * gcc/fixinc/inclhack.def is updated to bypass this header.
820Sstevel@tonic-gate  */
830Sstevel@tonic-gate #if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__))
840Sstevel@tonic-gate #ifndef _WCHAR_T
850Sstevel@tonic-gate #define	_WCHAR_T
860Sstevel@tonic-gate #if defined(_LP64)
870Sstevel@tonic-gate typedef	int	wchar_t;
880Sstevel@tonic-gate #else
890Sstevel@tonic-gate typedef	long	wchar_t;
900Sstevel@tonic-gate #endif
910Sstevel@tonic-gate #endif	/* !_WCHAR_T */
920Sstevel@tonic-gate #endif	/* !defined(__cplusplus) ... */
930Sstevel@tonic-gate 
940Sstevel@tonic-gate #if !defined(_WINT_T) || __cplusplus >= 199711L
950Sstevel@tonic-gate #define	_WINT_T
960Sstevel@tonic-gate #if defined(_LP64)
970Sstevel@tonic-gate typedef	int	wint_t;
980Sstevel@tonic-gate #else
990Sstevel@tonic-gate typedef	long	wint_t;
1000Sstevel@tonic-gate #endif
1010Sstevel@tonic-gate #endif	/* !defined(_WINT_T) || __cplusplus >= 199711L */
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate #if !defined(_SIZE_T) || __cplusplus >= 199711L
1040Sstevel@tonic-gate #define	_SIZE_T
1050Sstevel@tonic-gate #if defined(_LP64) || defined(_I32LPx)
1060Sstevel@tonic-gate typedef	unsigned long	size_t;		/* size of something in bytes */
1070Sstevel@tonic-gate #else
1080Sstevel@tonic-gate typedef unsigned int	size_t;		/* (historical version) */
1090Sstevel@tonic-gate #endif
1100Sstevel@tonic-gate #endif  /* !defined(_SIZE_T) || __cplusplus >= 199711L */
1110Sstevel@tonic-gate 
1120Sstevel@tonic-gate #ifndef NULL
1130Sstevel@tonic-gate #if defined(_LP64)
1140Sstevel@tonic-gate #define	NULL	0L
1150Sstevel@tonic-gate #else
1160Sstevel@tonic-gate #define	NULL	0
1170Sstevel@tonic-gate #endif
1180Sstevel@tonic-gate #endif /* !NULL */
1190Sstevel@tonic-gate 
1200Sstevel@tonic-gate #ifndef WEOF
121*2270Sdamico #if __cplusplus >= 199711L
122*2270Sdamico #define	WEOF	((std::wint_t)(-1))
123*2270Sdamico #else
1240Sstevel@tonic-gate #define	WEOF	((wint_t)(-1))
1250Sstevel@tonic-gate #endif
126*2270Sdamico #endif /* WEOF */
1270Sstevel@tonic-gate 
1280Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */
1290Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5)
1300Sstevel@tonic-gate #ifndef	WCHAR_MAX
1310Sstevel@tonic-gate #define	WCHAR_MAX	2147483647
1320Sstevel@tonic-gate #endif
1330Sstevel@tonic-gate #ifndef	WCHAR_MIN
1340Sstevel@tonic-gate #define	WCHAR_MIN	(-2147483647-1)
1350Sstevel@tonic-gate #endif
1360Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */
1370Sstevel@tonic-gate 
1380Sstevel@tonic-gate #if !defined(_MBSTATE_T) || __cplusplus >= 199711L
1390Sstevel@tonic-gate #define	_MBSTATE_T
1400Sstevel@tonic-gate typedef __mbstate_t	mbstate_t;
1410Sstevel@tonic-gate #endif	/* _MBSTATE_T */
1420Sstevel@tonic-gate 
1430Sstevel@tonic-gate #if defined(_XPG4) && !defined(_FILEDEFED) || __cplusplus >= 199711L
1440Sstevel@tonic-gate #define	_FILEDEFED
1450Sstevel@tonic-gate typedef __FILE FILE;
1460Sstevel@tonic-gate #endif
1470Sstevel@tonic-gate 
1480Sstevel@tonic-gate #if !defined(_LP64) && !defined(_LONGLONG_TYPE)
1490Sstevel@tonic-gate 
1500Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME
1510Sstevel@tonic-gate #pragma	redefine_extname fwprintf	_fwprintf_c89
1520Sstevel@tonic-gate #pragma	redefine_extname swprintf	_swprintf_c89
1530Sstevel@tonic-gate #pragma	redefine_extname vfwprintf	_vfwprintf_c89
1540Sstevel@tonic-gate #pragma	redefine_extname vswprintf	_vswprintf_c89
1550Sstevel@tonic-gate #pragma	redefine_extname vwprintf	_vwprintf_c89
1560Sstevel@tonic-gate #pragma	redefine_extname wprintf	_wprintf_c89
1570Sstevel@tonic-gate #pragma	redefine_extname fwscanf	_fwscanf_c89
1580Sstevel@tonic-gate #pragma	redefine_extname swscanf	_swscanf_c89
1590Sstevel@tonic-gate #pragma	redefine_extname wscanf		_wscanf_c89
1600Sstevel@tonic-gate #else
1610Sstevel@tonic-gate #define	fwprintf	_fwprintf_c89
1620Sstevel@tonic-gate #define	swprintf	_swprintf_c89
1630Sstevel@tonic-gate #define	vfwprintf	_vfwprintf_c89
1640Sstevel@tonic-gate #define	vswprintf	_vswprintf_c89
1650Sstevel@tonic-gate #define	vwprintf	_vwprintf_c89
1660Sstevel@tonic-gate #define	wprintf		_wprintf_c89
1670Sstevel@tonic-gate #define	fwscanf		_fwscanf_c89
1680Sstevel@tonic-gate #define	swscanf		_swscanf_c89
1690Sstevel@tonic-gate #define	wscanf		_wscanf_c89
1700Sstevel@tonic-gate #endif
1710Sstevel@tonic-gate 
1720Sstevel@tonic-gate #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
1730Sstevel@tonic-gate 
1740Sstevel@tonic-gate #if (!defined(_MSE_INT_H))
1750Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */
1760Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5)
1770Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME
1780Sstevel@tonic-gate #pragma redefine_extname fgetwc	__fgetwc_xpg5
1790Sstevel@tonic-gate #pragma redefine_extname getwc	__getwc_xpg5
1800Sstevel@tonic-gate #pragma redefine_extname getwchar	__getwchar_xpg5
1810Sstevel@tonic-gate #pragma redefine_extname fputwc	__fputwc_xpg5
1820Sstevel@tonic-gate #pragma redefine_extname putwc	__putwc_xpg5
1830Sstevel@tonic-gate #pragma redefine_extname putwchar	__putwchar_xpg5
1840Sstevel@tonic-gate #pragma redefine_extname fgetws	__fgetws_xpg5
1850Sstevel@tonic-gate #pragma redefine_extname fputws	__fputws_xpg5
1860Sstevel@tonic-gate #pragma redefine_extname ungetwc	__ungetwc_xpg5
1870Sstevel@tonic-gate #else	/* __PRAGMA_REDEFINE_EXTNAME */
1880Sstevel@tonic-gate #ifdef __STDC__
1890Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(__FILE *);
1900Sstevel@tonic-gate extern wint_t __getwc_xpg5(__FILE *);
1910Sstevel@tonic-gate extern wint_t __getwchar_xpg5(void);
1920Sstevel@tonic-gate extern wint_t __fputwc_xpg5(wint_t, __FILE *);
1930Sstevel@tonic-gate extern wint_t __putwc_xpg5(wint_t, __FILE *);
1940Sstevel@tonic-gate extern wint_t __putwchar_xpg5(wint_t);
1950Sstevel@tonic-gate extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int,
1960Sstevel@tonic-gate 			__FILE *_RESTRICT_KYWD);
1970Sstevel@tonic-gate extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
1980Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(wint_t, __FILE *);
1990Sstevel@tonic-gate #else
2000Sstevel@tonic-gate extern wint_t __fgetwc_xpg5();
2010Sstevel@tonic-gate extern wint_t __getwc_xpg5();
2020Sstevel@tonic-gate extern wint_t __getwchar_xpg5();
2030Sstevel@tonic-gate extern wint_t __fputwc_xpg5();
2040Sstevel@tonic-gate extern wint_t __putwc_xpg5();
2050Sstevel@tonic-gate extern wint_t __putwchar_xpg5();
2060Sstevel@tonic-gate extern wchar_t *__fgetws_xpg5();
2070Sstevel@tonic-gate extern int __fputws_xpg5();
2080Sstevel@tonic-gate extern wint_t __ungetwc_xpg5();
2090Sstevel@tonic-gate #endif	/* __STDC__ */
2100Sstevel@tonic-gate #define	fgetwc	__fgetwc_xpg5
2110Sstevel@tonic-gate #define	getwc	__getwc_xpg5
2120Sstevel@tonic-gate #define	getwchar	__getwchar_xpg5
2130Sstevel@tonic-gate #define	fputwc	__fputwc_xpg5
2140Sstevel@tonic-gate #define	putwc	__putwc_xpg5
2150Sstevel@tonic-gate #define	putwchar	__putwchar_xpg5
2160Sstevel@tonic-gate #define	fgetws	__fgetws_xpg5
2170Sstevel@tonic-gate #define	fputws	__fputws_xpg5
2180Sstevel@tonic-gate #define	ungetwc	__ungetwc_xpg5
2190Sstevel@tonic-gate #endif	/* __PRAGMA_REDEFINE_EXTNAME */
2200Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */
2210Sstevel@tonic-gate #endif /* defined(_MSE_INT_H) */
2220Sstevel@tonic-gate 
2230Sstevel@tonic-gate #ifdef __STDC__
2240Sstevel@tonic-gate 
2250Sstevel@tonic-gate extern wint_t fgetwc(__FILE *);
2260Sstevel@tonic-gate extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
2270Sstevel@tonic-gate extern wint_t fputwc(wint_t, __FILE *);
2280Sstevel@tonic-gate extern int fputws(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
2290Sstevel@tonic-gate extern wint_t ungetwc(wint_t, __FILE *);
2300Sstevel@tonic-gate extern wint_t getwc(__FILE *);
2310Sstevel@tonic-gate extern wint_t getwchar(void);
2320Sstevel@tonic-gate extern wint_t putwc(wint_t, __FILE *);
2330Sstevel@tonic-gate extern wint_t putwchar(wint_t);
2340Sstevel@tonic-gate extern double wcstod(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
2350Sstevel@tonic-gate extern long wcstol(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD,
2360Sstevel@tonic-gate 	int);
2370Sstevel@tonic-gate extern unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD,
2380Sstevel@tonic-gate 	wchar_t **_RESTRICT_KYWD, int);
2390Sstevel@tonic-gate extern wchar_t *wcscat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
2400Sstevel@tonic-gate extern int wcscmp(const wchar_t *, const wchar_t *);
2410Sstevel@tonic-gate extern int wcscoll(const wchar_t *, const wchar_t *);
2420Sstevel@tonic-gate extern wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
2430Sstevel@tonic-gate extern size_t wcscspn(const wchar_t *, const wchar_t *);
2440Sstevel@tonic-gate extern size_t wcslen(const wchar_t *);
2450Sstevel@tonic-gate extern wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
2460Sstevel@tonic-gate 	size_t);
2470Sstevel@tonic-gate extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
2480Sstevel@tonic-gate extern wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
2490Sstevel@tonic-gate 	size_t);
2500Sstevel@tonic-gate extern size_t wcsspn(const wchar_t *, const wchar_t *);
2510Sstevel@tonic-gate extern size_t wcsxfrm(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
2520Sstevel@tonic-gate 	size_t);
2530Sstevel@tonic-gate #if __cplusplus >= 199711L
2540Sstevel@tonic-gate extern const wchar_t *wcschr(const wchar_t *, wchar_t);
2550Sstevel@tonic-gate extern "C++" {
wcschr(wchar_t * __ws,wchar_t __wc)2560Sstevel@tonic-gate 	inline wchar_t *wcschr(wchar_t *__ws, wchar_t __wc) {
2570Sstevel@tonic-gate 		return (wchar_t *)wcschr((const wchar_t *)__ws, __wc);
2580Sstevel@tonic-gate 	}
2590Sstevel@tonic-gate }
2600Sstevel@tonic-gate extern const wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
2610Sstevel@tonic-gate extern "C++" {
wcspbrk(wchar_t * __ws1,const wchar_t * __ws2)2620Sstevel@tonic-gate 	inline wchar_t *wcspbrk(wchar_t *__ws1, const wchar_t *__ws2) {
2630Sstevel@tonic-gate 		return (wchar_t *)wcspbrk((const wchar_t *)__ws1, __ws2);
2640Sstevel@tonic-gate 	}
2650Sstevel@tonic-gate }
2660Sstevel@tonic-gate extern const wchar_t *wcsrchr(const wchar_t *, wchar_t);
2670Sstevel@tonic-gate extern "C++" {
wcsrchr(wchar_t * __ws,wchar_t __wc)2680Sstevel@tonic-gate 	inline wchar_t *wcsrchr(wchar_t *__ws, wchar_t __wc) {
2690Sstevel@tonic-gate 		return (wchar_t *)wcsrchr((const wchar_t *)__ws, __wc);
2700Sstevel@tonic-gate 	}
2710Sstevel@tonic-gate }
2720Sstevel@tonic-gate #else /* __cplusplus >= 199711L */
2730Sstevel@tonic-gate extern wchar_t *wcschr(const wchar_t *, wchar_t);
2740Sstevel@tonic-gate extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
2750Sstevel@tonic-gate extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
2760Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */
2770Sstevel@tonic-gate 
2780Sstevel@tonic-gate #if (!defined(_MSE_INT_H))
2790Sstevel@tonic-gate #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */
2800Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *, const wchar_t *);
2810Sstevel@tonic-gate extern size_t wcsftime(wchar_t *, size_t, const char *, const struct tm *);
2820Sstevel@tonic-gate #else	/* XPG4 or XPG4v2 */
2830Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME
2840Sstevel@tonic-gate #pragma redefine_extname wcstok	__wcstok_xpg5
2850Sstevel@tonic-gate #pragma redefine_extname wcsftime	__wcsftime_xpg5
2860Sstevel@tonic-gate extern wchar_t *wcstok(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
2870Sstevel@tonic-gate 	wchar_t **_RESTRICT_KYWD);
2880Sstevel@tonic-gate extern size_t wcsftime(wchar_t *_RESTRICT_KYWD, size_t,
2890Sstevel@tonic-gate 	const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
2900Sstevel@tonic-gate #else	/* __PRAGMA_REDEFINE_EXTNAME */
2910Sstevel@tonic-gate extern wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
2920Sstevel@tonic-gate 	const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
2930Sstevel@tonic-gate extern size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
2940Sstevel@tonic-gate 	const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
2950Sstevel@tonic-gate #define	wcstok	__wcstok_xpg5
2960Sstevel@tonic-gate #define	wcsftime	__wcsftime_xpg5
2970Sstevel@tonic-gate #endif	/* __PRAGMA_REDEFINE_EXTNAME */
2980Sstevel@tonic-gate #endif	/* XPG4 or XPG4v2 */
2990Sstevel@tonic-gate #endif	/* !defined(_MSE_INT_H) */
3000Sstevel@tonic-gate 
3010Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */
3020Sstevel@tonic-gate #if !defined(_XPG4) || defined(_XPG5)
3030Sstevel@tonic-gate extern wint_t	btowc(int);
3040Sstevel@tonic-gate extern int	fwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
3050Sstevel@tonic-gate 			...);
3060Sstevel@tonic-gate extern int	fwscanf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
3070Sstevel@tonic-gate 			...);
3080Sstevel@tonic-gate extern int	fwide(__FILE *, int);
3090Sstevel@tonic-gate extern int	mbsinit(const mbstate_t *);
3100Sstevel@tonic-gate extern size_t	mbrlen(const char *_RESTRICT_KYWD, size_t,
3110Sstevel@tonic-gate 			mbstate_t *_RESTRICT_KYWD);
3120Sstevel@tonic-gate extern size_t	mbrtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
3130Sstevel@tonic-gate 			size_t, mbstate_t *_RESTRICT_KYWD);
3140Sstevel@tonic-gate extern size_t	mbsrtowcs(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD,
3150Sstevel@tonic-gate 			size_t, mbstate_t *_RESTRICT_KYWD);
3160Sstevel@tonic-gate extern int	swprintf(wchar_t *_RESTRICT_KYWD, size_t,
3170Sstevel@tonic-gate 			const wchar_t *_RESTRICT_KYWD, ...);
3180Sstevel@tonic-gate extern int	swscanf(const wchar_t *_RESTRICT_KYWD,
3190Sstevel@tonic-gate 			const wchar_t *_RESTRICT_KYWD, ...);
3200Sstevel@tonic-gate extern int	vfwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
3210Sstevel@tonic-gate 			__va_list);
3220Sstevel@tonic-gate extern int	vwprintf(const wchar_t *_RESTRICT_KYWD, __va_list);
3230Sstevel@tonic-gate extern int	vswprintf(wchar_t *_RESTRICT_KYWD, size_t,
3240Sstevel@tonic-gate 			const wchar_t *_RESTRICT_KYWD, __va_list);
3250Sstevel@tonic-gate extern size_t	wcrtomb(char *_RESTRICT_KYWD, wchar_t,
3260Sstevel@tonic-gate 			mbstate_t *_RESTRICT_KYWD);
3270Sstevel@tonic-gate extern size_t	wcsrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD,
3280Sstevel@tonic-gate 			size_t, mbstate_t *_RESTRICT_KYWD);
3290Sstevel@tonic-gate extern int	wctob(wint_t);
3300Sstevel@tonic-gate extern int	wmemcmp(const wchar_t *, const wchar_t *, size_t);
3310Sstevel@tonic-gate extern wchar_t	*wmemcpy(wchar_t *_RESTRICT_KYWD,
3320Sstevel@tonic-gate 			const wchar_t *_RESTRICT_KYWD, size_t);
3330Sstevel@tonic-gate extern wchar_t	*wmemmove(wchar_t *, const wchar_t *, size_t);
3340Sstevel@tonic-gate extern wchar_t	*wmemset(wchar_t *, wchar_t, size_t);
3350Sstevel@tonic-gate extern int	wprintf(const wchar_t *_RESTRICT_KYWD, ...);
3360Sstevel@tonic-gate extern int	wscanf(const wchar_t *_RESTRICT_KYWD, ...);
3370Sstevel@tonic-gate #if __cplusplus >= 199711L
3380Sstevel@tonic-gate extern const wchar_t *wcsstr(const wchar_t *, const wchar_t *);
3390Sstevel@tonic-gate extern "C++" {
wcsstr(wchar_t * __ws1,const wchar_t * __ws2)3400Sstevel@tonic-gate 	inline wchar_t *wcsstr(wchar_t *__ws1, const wchar_t *__ws2) {
3410Sstevel@tonic-gate 		return (wchar_t *)wcsstr((const wchar_t *)__ws1, __ws2);
3420Sstevel@tonic-gate 	}
3430Sstevel@tonic-gate }
3440Sstevel@tonic-gate extern const wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
3450Sstevel@tonic-gate extern "C++" {
wmemchr(wchar_t * __ws,wchar_t __wc,size_t __n)3460Sstevel@tonic-gate 	inline wchar_t *wmemchr(wchar_t *__ws, wchar_t __wc, size_t __n) {
3470Sstevel@tonic-gate 		return (wchar_t *)wmemchr((const wchar_t *)__ws, __wc, __n);
3480Sstevel@tonic-gate 	}
3490Sstevel@tonic-gate }
3500Sstevel@tonic-gate #else /* __cplusplus >= 199711L */
3510Sstevel@tonic-gate extern wchar_t	*wcsstr(const wchar_t *_RESTRICT_KYWD,
3520Sstevel@tonic-gate 	const wchar_t *_RESTRICT_KYWD);
3530Sstevel@tonic-gate extern wchar_t	*wmemchr(const wchar_t *, wchar_t, size_t);
3540Sstevel@tonic-gate #endif /* __cplusplus >= 199711L */
3550Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */
3560Sstevel@tonic-gate 
3570Sstevel@tonic-gate #else /* __STDC__ */
3580Sstevel@tonic-gate 
3590Sstevel@tonic-gate extern  wint_t fgetwc();
3600Sstevel@tonic-gate extern  wchar_t *fgetws();
3610Sstevel@tonic-gate extern  wint_t fputwc();
3620Sstevel@tonic-gate extern  int fputws();
3630Sstevel@tonic-gate extern  wint_t  ungetwc();
3640Sstevel@tonic-gate extern wint_t getwc();
3650Sstevel@tonic-gate extern wint_t getwchar();
3660Sstevel@tonic-gate extern wint_t putwc();
3670Sstevel@tonic-gate extern wint_t putwchar();
3680Sstevel@tonic-gate extern wint_t ungetwc();
3690Sstevel@tonic-gate extern double wcstod();
3700Sstevel@tonic-gate extern long wcstol();
3710Sstevel@tonic-gate extern unsigned long wcstoul();
3720Sstevel@tonic-gate extern wchar_t *wcscat();
3730Sstevel@tonic-gate extern wchar_t *wcschr();
3740Sstevel@tonic-gate extern int wcscmp();
3750Sstevel@tonic-gate extern int wcscoll();
3760Sstevel@tonic-gate extern wchar_t *wcscpy();
3770Sstevel@tonic-gate extern size_t wcscspn();
3780Sstevel@tonic-gate extern size_t wcslen();
3790Sstevel@tonic-gate extern wchar_t *wcsncat();
3800Sstevel@tonic-gate extern int wcsncmp();
3810Sstevel@tonic-gate extern wchar_t *wcsncpy();
3820Sstevel@tonic-gate extern wchar_t *wcspbrk();
3830Sstevel@tonic-gate extern wchar_t *wcsrchr();
3840Sstevel@tonic-gate extern size_t wcsspn();
3850Sstevel@tonic-gate extern size_t wcsxfrm();
3860Sstevel@tonic-gate 
3870Sstevel@tonic-gate #if (!defined(_MSE_INT_H))
3880Sstevel@tonic-gate #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */
3890Sstevel@tonic-gate extern wchar_t *wcstok();
3900Sstevel@tonic-gate extern size_t wcsftime();
3910Sstevel@tonic-gate #else	/* XPG4 or XPG4v2 */
3920Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME
3930Sstevel@tonic-gate #pragma redefine_extname wcstok	__wcstok_xpg5
3940Sstevel@tonic-gate #pragma redefine_extname wcsftime	__wcsftime_xpg5
3950Sstevel@tonic-gate extern wchar_t *wcstok();
3960Sstevel@tonic-gate extern size_t wcsftime();
3970Sstevel@tonic-gate #else	/* __PRAGMA_REDEFINE_EXTNAME */
3980Sstevel@tonic-gate extern wchar_t *__wcstok_xpg5();
3990Sstevel@tonic-gate extern size_t __wcsftime_xpg5();
4000Sstevel@tonic-gate #define	wcstok	__wcstok_xpg5
4010Sstevel@tonic-gate #define	wcsftime	__wcsftime_xpg5
4020Sstevel@tonic-gate #endif	/* __PRAGMA_REDEFINE_EXTNAME */
4030Sstevel@tonic-gate #endif	/* XPG4 or XPG4v2 */
4040Sstevel@tonic-gate #endif	/* defined(_MSE_INT_H) */
4050Sstevel@tonic-gate 
4060Sstevel@tonic-gate /* not XPG4 and not XPG4v2 */
4070Sstevel@tonic-gate #if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5))
4080Sstevel@tonic-gate extern wint_t	btowc();
4090Sstevel@tonic-gate extern int	fwprintf();
4100Sstevel@tonic-gate extern int	fwscanf();
4110Sstevel@tonic-gate extern int	fwide();
4120Sstevel@tonic-gate extern int	mbsinit();
4130Sstevel@tonic-gate extern size_t	mbrlen();
4140Sstevel@tonic-gate extern size_t	mbrtowc();
4150Sstevel@tonic-gate extern size_t	mbsrtowcs();
4160Sstevel@tonic-gate extern int	swprintf();
4170Sstevel@tonic-gate extern int	swscanf();
4180Sstevel@tonic-gate extern int	vfwprintf();
4190Sstevel@tonic-gate extern int	vwprintf();
4200Sstevel@tonic-gate extern int	vswprintf();
4210Sstevel@tonic-gate extern size_t	wcrtomb();
4220Sstevel@tonic-gate extern size_t	wcsrtombs();
4230Sstevel@tonic-gate extern wchar_t	*wcsstr();
4240Sstevel@tonic-gate extern int	wctob();
4250Sstevel@tonic-gate extern wchar_t	*wmemchr();
4260Sstevel@tonic-gate extern int	wmemcmp();
4270Sstevel@tonic-gate extern wchar_t	*wmemcpy();
4280Sstevel@tonic-gate extern wchar_t	*wmemmove();
4290Sstevel@tonic-gate extern wchar_t	*wmemset();
4300Sstevel@tonic-gate extern int	wprintf();
4310Sstevel@tonic-gate extern int	wscanf();
4320Sstevel@tonic-gate #endif /* not XPG4 and not XPG4v2 */
4330Sstevel@tonic-gate 
4340Sstevel@tonic-gate #endif /* __STDC__ */
4350Sstevel@tonic-gate 
4360Sstevel@tonic-gate #if __cplusplus >= 199711L
4370Sstevel@tonic-gate }
4380Sstevel@tonic-gate #endif /* end of namespace std */
4390Sstevel@tonic-gate 
4400Sstevel@tonic-gate #ifdef	__cplusplus
4410Sstevel@tonic-gate }
4420Sstevel@tonic-gate #endif
4430Sstevel@tonic-gate 
4440Sstevel@tonic-gate #endif	/* _ISO_WCHAR_ISO_H */
445