xref: /dflybsd-src/contrib/gcc-8.0/gcc/intl.h (revision 38fd149817dfbff97799f62fcb70be98c4e32523)
1*38fd1498Szrj /* intl.h - internationalization
2*38fd1498Szrj    Copyright (C) 1998-2018 Free Software Foundation, Inc.
3*38fd1498Szrj 
4*38fd1498Szrj    GCC is free software; you can redistribute it and/or modify
5*38fd1498Szrj    it under the terms of the GNU General Public License as published by
6*38fd1498Szrj    the Free Software Foundation; either version 3, or (at your option)
7*38fd1498Szrj    any later version.
8*38fd1498Szrj 
9*38fd1498Szrj    GCC is distributed in the hope that it will be useful,
10*38fd1498Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
11*38fd1498Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12*38fd1498Szrj    GNU General Public License for more details.
13*38fd1498Szrj 
14*38fd1498Szrj    You should have received a copy of the GNU General Public License
15*38fd1498Szrj    along with GCC; see the file COPYING3.  If not see
16*38fd1498Szrj    <http://www.gnu.org/licenses/>.  */
17*38fd1498Szrj 
18*38fd1498Szrj #ifndef GCC_INTL_H
19*38fd1498Szrj #define GCC_INTL_H
20*38fd1498Szrj 
21*38fd1498Szrj #ifdef HAVE_LOCALE_H
22*38fd1498Szrj # include <locale.h>
23*38fd1498Szrj #endif
24*38fd1498Szrj 
25*38fd1498Szrj #ifndef HAVE_SETLOCALE
26*38fd1498Szrj # define setlocale(category, locale) (locale)
27*38fd1498Szrj #endif
28*38fd1498Szrj 
29*38fd1498Szrj #ifdef ENABLE_NLS
30*38fd1498Szrj #include <libintl.h>
31*38fd1498Szrj extern void gcc_init_libintl (void);
32*38fd1498Szrj extern size_t gcc_gettext_width (const char *);
33*38fd1498Szrj #else
34*38fd1498Szrj /* Stubs.  */
35*38fd1498Szrj # undef textdomain
36*38fd1498Szrj # define textdomain(domain) (domain)
37*38fd1498Szrj # undef bindtextdomain
38*38fd1498Szrj # define bindtextdomain(domain, directory) (domain)
39*38fd1498Szrj # undef gettext
40*38fd1498Szrj # define gettext(msgid) (msgid)
41*38fd1498Szrj # define ngettext(singular,plural,n) fake_ngettext (singular, plural, n)
42*38fd1498Szrj # define gcc_init_libintl()	/* nothing */
43*38fd1498Szrj # define gcc_gettext_width(s) strlen (s)
44*38fd1498Szrj 
45*38fd1498Szrj extern const char *fake_ngettext (const char *singular, const char *plural,
46*38fd1498Szrj 				  unsigned long int n);
47*38fd1498Szrj 
48*38fd1498Szrj #endif
49*38fd1498Szrj 
50*38fd1498Szrj #ifndef _
51*38fd1498Szrj # define _(msgid) gettext (msgid)
52*38fd1498Szrj #endif
53*38fd1498Szrj 
54*38fd1498Szrj #ifndef N_
55*38fd1498Szrj # define N_(msgid) msgid
56*38fd1498Szrj #endif
57*38fd1498Szrj 
58*38fd1498Szrj #ifndef G_
59*38fd1498Szrj # define G_(gmsgid) gmsgid
60*38fd1498Szrj #endif
61*38fd1498Szrj 
62*38fd1498Szrj extern char *get_spaces (const char *);
63*38fd1498Szrj 
64*38fd1498Szrj extern const char *open_quote;
65*38fd1498Szrj extern const char *close_quote;
66*38fd1498Szrj extern const char *locale_encoding;
67*38fd1498Szrj extern bool locale_utf8;
68*38fd1498Szrj 
69*38fd1498Szrj #endif /* intl.h */
70