wchar_iso.h revision eec1faa811b20b01f0173edcf9179c3c6ad48243
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <wchar.h>.
*/
#ifndef _ISO_WCHAR_ISO_H
#define _ISO_WCHAR_ISO_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/feature_tests.h>
#include <stdio_tag.h>
#include <wchar_impl.h>
#include <iso/time_iso.h>
(!defined(__cplusplus) && !defined(_STRICT_STDC)) || \
defined(__EXTENSIONS__)
#include <stdio.h>
#endif /* (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) ... */
#if !defined(_STRICT_STDC) || defined(__EXTENSIONS__)
#include <ctype.h>
#include <stddef.h>
#endif /* !defined(_STRICT_STDC) || defined(__EXTENSIONS__) */
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
#endif
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
* fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
*
* we must use the C++ compiler's type
*
* The above comment should not be removed or changed until GNU
* gcc/fixinc/inclhack.def is updated to bypass this header.
*/
#ifndef _WCHAR_T
#define _WCHAR_T
#if defined(_LP64)
typedef int wchar_t;
#else
typedef long wchar_t;
#endif
#endif /* !_WCHAR_T */
#endif /* !defined(__cplusplus) ... */
#define _WINT_T
#if defined(_LP64)
typedef int wint_t;
#else
typedef long wint_t;
#endif
#endif /* !defined(_WINT_T) || __cplusplus >= 199711L */
#define _SIZE_T
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !defined(_SIZE_T) || __cplusplus >= 199711L */
#ifndef NULL
#if defined(_LP64)
#define NULL 0L
#else
#define NULL 0
#endif
#endif /* !NULL */
#ifndef WEOF
#if __cplusplus >= 199711L
#else
#endif
#endif /* WEOF */
/* not XPG4 and not XPG4v2 */
#ifndef WCHAR_MAX
#define WCHAR_MAX 2147483647
#endif
#ifndef WCHAR_MIN
#endif
#endif /* not XPG4 and not XPG4v2 */
#define _MBSTATE_T
typedef __mbstate_t mbstate_t;
#endif /* _MBSTATE_T */
#define _FILEDEFED
#endif
#if !defined(_LP64) && !defined(_LONGLONG_TYPE)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#define fwprintf _fwprintf_c89
#define swprintf _swprintf_c89
#define vfwprintf _vfwprintf_c89
#define vswprintf _vswprintf_c89
#define vwprintf _vwprintf_c89
#define wprintf _wprintf_c89
#define fwscanf _fwscanf_c89
#define swscanf _swscanf_c89
#define wscanf _wscanf_c89
#endif
#endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
#if (!defined(_MSE_INT_H))
/* not XPG4 and not XPG4v2 */
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else /* __PRAGMA_REDEFINE_EXTNAME */
#ifdef __STDC__
extern wint_t __getwchar_xpg5(void);
#else
extern wint_t __fgetwc_xpg5();
extern wint_t __getwc_xpg5();
extern wint_t __getwchar_xpg5();
extern wint_t __fputwc_xpg5();
extern wint_t __putwc_xpg5();
extern wint_t __putwchar_xpg5();
extern wchar_t *__fgetws_xpg5();
extern int __fputws_xpg5();
extern wint_t __ungetwc_xpg5();
#endif /* __STDC__ */
#define fgetwc __fgetwc_xpg5
#define getwc __getwc_xpg5
#define getwchar __getwchar_xpg5
#define fputwc __fputwc_xpg5
#define putwc __putwc_xpg5
#define putwchar __putwchar_xpg5
#define fgetws __fgetws_xpg5
#define fputws __fputws_xpg5
#define ungetwc __ungetwc_xpg5
#endif /* __PRAGMA_REDEFINE_EXTNAME */
#endif /* not XPG4 and not XPG4v2 */
#endif /* defined(_MSE_INT_H) */
#ifdef __STDC__
int);
wchar_t **_RESTRICT_KYWD, int);
size_t);
size_t);
size_t);
#if __cplusplus >= 199711L
extern "C++" {
}
}
extern "C++" {
}
}
extern "C++" {
}
}
#else /* __cplusplus >= 199711L */
#endif /* __cplusplus >= 199711L */
#if (!defined(_MSE_INT_H))
#else /* XPG4 or XPG4v2 */
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else /* __PRAGMA_REDEFINE_EXTNAME */
#define wcstok __wcstok_xpg5
#define wcsftime __wcsftime_xpg5
#endif /* __PRAGMA_REDEFINE_EXTNAME */
#endif /* XPG4 or XPG4v2 */
#endif /* !defined(_MSE_INT_H) */
/* not XPG4 and not XPG4v2 */
...);
...);
const wchar_t *_RESTRICT_KYWD, ...);
const wchar_t *_RESTRICT_KYWD, ...);
#if __cplusplus >= 199711L
extern "C++" {
}
}
extern "C++" {
}
}
#else /* __cplusplus >= 199711L */
const wchar_t *_RESTRICT_KYWD);
#endif /* __cplusplus >= 199711L */
#endif /* not XPG4 and not XPG4v2 */
#else /* __STDC__ */
extern int fputws();
extern double wcstod();
extern long wcstol();
extern unsigned long wcstoul();
extern int wcscmp();
extern int wcscoll();
extern int wcsncmp();
#if (!defined(_MSE_INT_H))
#else /* XPG4 or XPG4v2 */
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else /* __PRAGMA_REDEFINE_EXTNAME */
extern wchar_t *__wcstok_xpg5();
extern size_t __wcsftime_xpg5();
#define wcstok __wcstok_xpg5
#define wcsftime __wcsftime_xpg5
#endif /* __PRAGMA_REDEFINE_EXTNAME */
#endif /* XPG4 or XPG4v2 */
#endif /* defined(_MSE_INT_H) */
/* not XPG4 and not XPG4v2 */
extern int fwprintf();
extern int fwscanf();
extern int fwide();
extern int mbsinit();
extern int swprintf();
extern int swscanf();
extern int vfwprintf();
extern int vwprintf();
extern int vswprintf();
extern int wctob();
extern int wmemcmp();
extern int wprintf();
extern int wscanf();
#endif /* not XPG4 and not XPG4v2 */
#endif /* __STDC__ */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_WCHAR_ISO_H */