VirtualBox

source: kBuild/trunk/src/kmk/gettext.h@ 3387

Last change on this file since 3387 was 3140, checked in by bird, 6 years ago

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1/* Convenience header for conditional use of GNU <libintl.h>.
2Copyright (C) 1995-2016 Free Software Foundation, Inc.
3This file is part of GNU Make.
4
5GNU Make is free software; you can redistribute it and/or modify it under the
6terms of the GNU General Public License as published by the Free Software
7Foundation; either version 3 of the License, or (at your option) any later
8version.
9
10GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
11WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License along with
15this program. If not, see <http://www.gnu.org/licenses/>. */
16
17#ifndef _LIBGETTEXT_H
18#define _LIBGETTEXT_H 1
19
20/* NLS can be disabled through the configure --disable-nls option. */
21#if ENABLE_NLS
22
23/* Get declarations of GNU message catalog functions. */
24# include <libintl.h>
25
26#else
27
28/* Disabled NLS.
29 The casts to 'const char *' serve the purpose of producing warnings
30 for invalid uses of the value returned from these functions.
31 On pre-ANSI systems without 'const', the config.h file is supposed to
32 contain "#define const". */
33# define gettext(Msgid) ((const char *) (Msgid))
34# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
35# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
36# define ngettext(Msgid1, Msgid2, N) \
37 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
38# define dngettext(Domainname, Msgid1, Msgid2, N) \
39 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
40# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
41 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
42# define textdomain(Domainname) ((const char *) (Domainname))
43# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
44# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
45
46#endif
47
48/* A pseudo function call that serves as a marker for the automated
49 extraction of messages, but does not call gettext(). The run-time
50 translation is done at a different place in the code.
51 The argument, String, should be a literal string. Concatenated strings
52 and other string expressions won't work.
53 The macro's expansion is not parenthesized, so that it is suitable as
54 initializer for static 'char[]' or 'const char[]' variables. */
55#define gettext_noop(String) String
56
57#endif /* _LIBGETTEXT_H */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use