174462Salfred/*
21900Swollman * CDDL HEADER START
31900Swollman *
41900Swollman * The contents of this file are subject to the terms of the
51900Swollman * Common Development and Distribution License (the "License").
61900Swollman * You may not use this file except in compliance with the License.
71900Swollman *
81900Swollman * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91900Swollman * or http://www.opensolaris.org/os/licensing.
108874Srgrimes * See the License for the specific language governing permissions
111900Swollman * and limitations under the License.
121900Swollman *
131900Swollman * When distributing Covered Code, include this CDDL HEADER in each
148874Srgrimes * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151900Swollman * If applicable, add the following below this CDDL HEADER, with the
161900Swollman * fields enclosed by brackets "[]" replaced with your own identifying
171900Swollman * information: Portions Copyright [yyyy] [name of copyright owner]
188874Srgrimes *
191900Swollman * CDDL HEADER END
201900Swollman */
211900Swollman/*
228874Srgrimes * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
231900Swollman * Use is subject to license terms.
241900Swollman */
251900Swollman
268874Srgrimes
271900Swollman#ifndef	_LIBINTL_H
281900Swollman#define	_LIBINTL_H
291900Swollman
301900Swollman#pragma ident	"%Z%%M%	%I%	%E% SMI"
311900Swollman
3274462Salfred#include <sys/isa_defs.h>
3374462Salfred
3474462Salfred#ifdef	__cplusplus
3574462Salfredextern "C" {
3674462Salfred#endif
3774462Salfred
3874462Salfred/*
3974462Salfred * wchar_t is a built-in type in standard C++ and as such is not
4074462Salfred * defined here when using standard C++. However, the GNU compiler
4174462Salfred * fixincludes utility nonetheless creates its own version of this
4274462Salfred * header for use by gcc and g++. In that version it adds a redundant
4374462Salfred * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
44119849Scharnier * header we need to include the following magic comment:
45119849Scharnier *
46119849Scharnier * we must use the C++ compiler's type
4774462Salfred *
4874462Salfred * The above comment should not be removed or changed until GNU
49218909Sbrucec * gcc/fixinc/inclhack.def is updated to bypass this header.
5074462Salfred */
5174462Salfred#if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__))
5274462Salfred#ifndef _WCHAR_T
53228992Suqs#define	_WCHAR_T
5474462Salfred#if defined(_LP64)
5574462Salfredtypedef int	wchar_t;
5674462Salfred#else
5774462Salfredtypedef long	wchar_t;
5874462Salfred#endif
5974462Salfred#endif	/* !_WCHAR_T */
6074462Salfred#endif	/* !defined(__cplusplus) ... */
6174462Salfred
6274462Salfred#define	TEXTDOMAINMAX	256
6374462Salfred
6474462Salfred#define	__GNU_GETTEXT_SUPPORTED_REVISION(m)	\
6574462Salfred	((((m) == 0) || ((m) == 1)) ? 1 : -1)
6674462Salfred
6774462Salfred#ifdef __STDC__
6874462Salfredextern char *dcgettext(const char *, const char *, const int);
6974462Salfredextern char *dgettext(const char *, const char *);
7074462Salfredextern char *gettext(const char *);
7174462Salfredextern char *textdomain(const char *);
7274462Salfredextern char *bindtextdomain(const char *, const char *);
7374462Salfred
7474462Salfred/*
7574462Salfred * LI18NUX 2000 Globalization Specification Version 1.0
7674462Salfred * with Amendment 2
7774462Salfred */
7827936Scharnierextern char *dcngettext(const char *, const char *,
7927936Scharnier	const char *, unsigned long int, int);
8074462Salfredextern char *dngettext(const char *, const char *,
8174462Salfred	const char *, unsigned long int);
8274462Salfredextern char *ngettext(const char *, const char *, unsigned long int);
831900Swollmanextern char *bind_textdomain_codeset(const char *, const char *);
8474462Salfred
851900Swollman/* Word handling functions --- requires dynamic linking */
861900Swollman/* Warning: these are experimental and subject to change. */
8774462Salfredextern int wdinit(void);
881900Swollmanextern int wdchkind(wchar_t);
891900Swollmanextern int wdbindf(wchar_t, wchar_t, int);
901900Swollmanextern wchar_t *wddelim(wchar_t, wchar_t, int);
911900Swollmanextern wchar_t mcfiller(void);
9274462Salfredextern int mcwrap(void);
931900Swollman
941900Swollman#else
951900Swollmanextern char *dcgettext();
961900Swollmanextern char *dgettext();
971900Swollmanextern char *gettext();
981900Swollmanextern char *textdomain();
991900Swollmanextern char *bindtextdomain();
1001900Swollman
10174462Salfred/*
10274462Salfred * LI18NUX 2000 Globalization Specification Version 1.0
10374462Salfred * with Amendment 2
10474462Salfred */
10574462Salfredextern char *dcngettext();
10674462Salfredextern char *dngettext();
10774462Salfredextern char *ngettext();
10874462Salfredextern char *bind_textdomain_codeset();
1091900Swollman
11074462Salfred/* Word handling functions --- requires dynamic linking */
11174462Salfred/* Warning: these are experimental and subject to change. */
11274462Salfredextern int wdinit();
11374462Salfredextern int wdchkind();
11474462Salfredextern int wdbindf();
11574462Salfredextern wchar_t *wddelim();
11674462Salfredextern wchar_t mcfiller();
11774462Salfredextern int mcwrap();
11874462Salfred
11974462Salfred#endif
12074462Salfred
12174462Salfred#ifdef	__cplusplus
12274462Salfred}
12374462Salfred#endif
12474462Salfred
12574462Salfred#endif /* _LIBINTL_H */
12674462Salfred