Path: blob/main/cddl/contrib/opensolaris/head/libintl.h
39488 views
/*1* CDDL HEADER START2*3* The contents of this file are subject to the terms of the4* Common Development and Distribution License (the "License").5* You may not use this file except in compliance with the License.6*7* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE8* or http://www.opensolaris.org/os/licensing.9* See the License for the specific language governing permissions10* and limitations under the License.11*12* When distributing Covered Code, include this CDDL HEADER in each13* file and include the License file at usr/src/OPENSOLARIS.LICENSE.14* If applicable, add the following below this CDDL HEADER, with the15* fields enclosed by brackets "[]" replaced with your own identifying16* information: Portions Copyright [yyyy] [name of copyright owner]17*18* CDDL HEADER END19*/20/*21* Copyright 2014 Garrett D'Amore <[email protected]>22*23* Copyright 2008 Sun Microsystems, Inc. All rights reserved.24* Use is subject to license terms.25*/262728#ifndef _LIBINTL_H29#define _LIBINTL_H3031#include <sys/isa_defs.h>3233#ifdef __cplusplus34extern "C" {35#endif3637/*38* wchar_t is a built-in type in standard C++ and as such is not39* defined here when using standard C++. However, the GNU compiler40* fixincludes utility nonetheless creates its own version of this41* header for use by gcc and g++. In that version it adds a redundant42* guard for __cplusplus. To avoid the creation of a gcc/g++ specific43* header we need to include the following magic comment:44*45* we must use the C++ compiler's type46*47* The above comment should not be removed or changed until GNU48* gcc/fixinc/inclhack.def is updated to bypass this header.49*/50#if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__))51#ifndef _WCHAR_T52#define _WCHAR_T53#if defined(_LP64)54typedef int wchar_t;55#else56typedef long wchar_t;57#endif58#endif /* !_WCHAR_T */59#endif /* !defined(__cplusplus) ... */6061#define TEXTDOMAINMAX 2566263#define __GNU_GETTEXT_SUPPORTED_REVISION(m) \64((((m) == 0) || ((m) == 1)) ? 1 : -1)6566extern char *dcgettext(const char *, const char *, const int);67extern char *dgettext(const char *, const char *);68extern char *gettext(const char *);69extern char *textdomain(const char *);70extern char *bindtextdomain(const char *, const char *);7172/*73* LI18NUX 2000 Globalization Specification Version 1.074* with Amendment 275*/76extern char *dcngettext(const char *, const char *,77const char *, unsigned long int, int);78extern char *dngettext(const char *, const char *,79const char *, unsigned long int);80extern char *ngettext(const char *, const char *, unsigned long int);81extern char *bind_textdomain_codeset(const char *, const char *);8283/* Word handling functions --- requires dynamic linking */84/* Warning: these are experimental and subject to change. */85extern int wdinit(void);86extern int wdchkind(wchar_t);87extern int wdbindf(wchar_t, wchar_t, int);88extern wchar_t *wddelim(wchar_t, wchar_t, int);89extern wchar_t mcfiller(void);90extern int mcwrap(void);9192#ifdef __cplusplus93}94#endif9596#endif /* _LIBINTL_H */979899