1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 27#ifndef _LIBINTL_H 28#define _LIBINTL_H 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 32#include <sys/isa_defs.h> 33 34#ifdef __cplusplus 35extern "C" { 36#endif 37 38/* 39 * wchar_t is a built-in type in standard C++ and as such is not 40 * defined here when using standard C++. However, the GNU compiler 41 * fixincludes utility nonetheless creates its own version of this 42 * header for use by gcc and g++. In that version it adds a redundant 43 * guard for __cplusplus. To avoid the creation of a gcc/g++ specific 44 * header we need to include the following magic comment: 45 * 46 * we must use the C++ compiler's type 47 * 48 * The above comment should not be removed or changed until GNU 49 * gcc/fixinc/inclhack.def is updated to bypass this header. 50 */ 51#if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__)) 52#ifndef _WCHAR_T 53#define _WCHAR_T 54#if defined(_LP64) 55typedef int wchar_t; 56#else 57typedef long wchar_t; 58#endif 59#endif /* !_WCHAR_T */ 60#endif /* !defined(__cplusplus) ... */ 61 62#define TEXTDOMAINMAX 256 63 64#define __GNU_GETTEXT_SUPPORTED_REVISION(m) \ 65 ((((m) == 0) || ((m) == 1)) ? 1 : -1) 66 67#ifdef __STDC__ 68extern char *dcgettext(const char *, const char *, const int); 69extern char *dgettext(const char *, const char *); 70extern char *gettext(const char *); 71extern char *textdomain(const char *); 72extern char *bindtextdomain(const char *, const char *); 73 74/* 75 * LI18NUX 2000 Globalization Specification Version 1.0 76 * with Amendment 2 77 */ 78extern char *dcngettext(const char *, const char *, 79 const char *, unsigned long int, int); 80extern char *dngettext(const char *, const char *, 81 const char *, unsigned long int); 82extern char *ngettext(const char *, const char *, unsigned long int); 83extern char *bind_textdomain_codeset(const char *, const char *); 84 85/* Word handling functions --- requires dynamic linking */ 86/* Warning: these are experimental and subject to change. */ 87extern int wdinit(void); 88extern int wdchkind(wchar_t); 89extern int wdbindf(wchar_t, wchar_t, int); 90extern wchar_t *wddelim(wchar_t, wchar_t, int); 91extern wchar_t mcfiller(void); 92extern int mcwrap(void); 93 94#else 95extern char *dcgettext(); 96extern char *dgettext(); 97extern char *gettext(); 98extern char *textdomain(); 99extern char *bindtextdomain(); 100 101/* 102 * LI18NUX 2000 Globalization Specification Version 1.0 103 * with Amendment 2 104 */ 105extern char *dcngettext(); 106extern char *dngettext(); 107extern char *ngettext(); 108extern char *bind_textdomain_codeset(); 109 110/* Word handling functions --- requires dynamic linking */ 111/* Warning: these are experimental and subject to change. */ 112extern int wdinit(); 113extern int wdchkind(); 114extern int wdbindf(); 115extern wchar_t *wddelim(); 116extern wchar_t mcfiller(); 117extern int mcwrap(); 118 119#endif 120 121#ifdef __cplusplus 122} 123#endif 124 125#endif /* _LIBINTL_H */ 126