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