wchar_iso.h revision 4870e0a7381ec2ec57437062574e6ddc3dd48d7f
/*
* 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 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2014 PALO, Richard.
*
* 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
#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 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 */
extern wint_t __getwchar_xpg5(void);
#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) */
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 defined(_XPG7) || !defined(_STRICT_SYMBOLS)
#endif
#if __cplusplus >= 199711L
extern "C++" {
}
}
extern "C++" {
}
}
#else /* __cplusplus >= 199711L */
const wchar_t *_RESTRICT_KYWD);
#endif /* __cplusplus >= 199711L */
#endif /* not XPG4 and not XPG4v2 */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_WCHAR_ISO_H */