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 2026 Edgecast Cloud LLC. 23 * Copyright 2014 Garrett D'Amore <garrett@damore.org> 24 * 25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 26 * Use is subject to license terms. 27 */ 28 29 30 #ifndef _LIBINTL_H 31 #define _LIBINTL_H 32 33 #include <sys/feature_tests.h> 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 /* 40 * wchar_t is a built-in type in standard C++ and as such is not 41 * defined here when using standard C++. However, the GNU compiler 42 * fixincludes utility nonetheless creates its own version of this 43 * header for use by gcc and g++. In that version it adds a redundant 44 * guard for __cplusplus. To avoid the creation of a gcc/g++ specific 45 * header we need to include the following magic comment: 46 * 47 * we must use the C++ compiler's type 48 * 49 * The above comment should not be removed or changed until GNU 50 * gcc/fixinc/inclhack.def is updated to bypass this header. 51 */ 52 #if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__)) 53 #ifndef _WCHAR_T 54 #define _WCHAR_T 55 #if defined(_LP64) 56 typedef int wchar_t; 57 #else 58 typedef long wchar_t; 59 #endif 60 #endif /* !_WCHAR_T */ 61 #endif /* !defined(__cplusplus) ... */ 62 63 #define TEXTDOMAINMAX 256 64 65 #define __GNU_GETTEXT_SUPPORTED_REVISION(m) \ 66 ((((m) == 0) || ((m) == 1)) ? 1 : -1) 67 68 extern char *dcgettext(const char *, const char *, const int) __FORMAT_ARG(2); 69 extern char *dgettext(const char *, const char *) __FORMAT_ARG(2); 70 extern char *gettext(const char *) __FORMAT_ARG(1); 71 extern char *textdomain(const char *); 72 extern char *bindtextdomain(const char *, const char *); 73 74 /* 75 * LI18NUX 2000 Globalization Specification Version 1.0 76 * with Amendment 2 77 */ 78 extern char *dcngettext(const char *, const char *, 79 const char *, unsigned long int, int) __FORMAT_ARG(2) __FORMAT_ARG(3); 80 extern char *dngettext(const char *, const char *, 81 const char *, unsigned long int) __FORMAT_ARG(2) __FORMAT_ARG(3); 82 extern char *ngettext(const char *, const char *, unsigned long int) 83 __FORMAT_ARG(1) __FORMAT_ARG(2); 84 extern char *bind_textdomain_codeset(const char *, const char *); 85 86 /* Word handling functions --- requires dynamic linking */ 87 /* Warning: these are experimental and subject to change. */ 88 extern int wdinit(void); 89 extern int wdchkind(wchar_t); 90 extern int wdbindf(wchar_t, wchar_t, int); 91 extern wchar_t *wddelim(wchar_t, wchar_t, int); 92 extern wchar_t mcfiller(void); 93 extern int mcwrap(void); 94 95 #ifdef __cplusplus 96 } 97 #endif 98 99 #endif /* _LIBINTL_H */ 100