1 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext library. */
3 /* Copyright (C) 1995, 2000-2003, 2005-2009 Free Software Foundation, Inc.
5 This file is part of GNU Bash.
7 Bash is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 Bash is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Bash. If not, see <http://www.gnu.org/licenses/>.
27 /* @@ end of prolog @@ */
29 /* This file redirects the gettext functions (without prefix) to those
30 defined in the included GNU libintl library (with "libintl_" prefix).
31 It is compiled into libintl in order to make the AM_GNU_GETTEXT test
32 of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
33 has the redirections primarily in the <libintl.h> include file.
34 It is also compiled into libgnuintl so that libgnuintl.so can be used
35 as LD_PRELOADable library on glibc systems, to provide the extra
36 features that the functions in the libc don't have (namely, logging). */
47 #undef bind_textdomain_codeset
50 /* When building a DLL, we must export some functions. Note that because
51 the functions are only defined for binary backward compatibility, we
52 don't need to use __declspec(dllimport) in any case. */
53 #if defined _MSC_VER && BUILDING_DLL
54 # define DLL_EXPORTED __declspec(dllexport)
65 return libintl_gettext (msgid
);
71 dgettext (domainname
, msgid
)
72 const char *domainname
;
75 return libintl_dgettext (domainname
, msgid
);
81 dcgettext (domainname
, msgid
, category
)
82 const char *domainname
;
86 return libintl_dcgettext (domainname
, msgid
, category
);
92 ngettext (msgid1
, msgid2
, n
)
97 return libintl_ngettext (msgid1
, msgid2
, n
);
103 dngettext (domainname
, msgid1
, msgid2
, n
)
104 const char *domainname
;
109 return libintl_dngettext (domainname
, msgid1
, msgid2
, n
);
115 dcngettext (domainname
, msgid1
, msgid2
, n
, category
)
116 const char *domainname
;
122 return libintl_dcngettext (domainname
, msgid1
, msgid2
, n
, category
);
128 textdomain (domainname
)
129 const char *domainname
;
131 return libintl_textdomain (domainname
);
137 bindtextdomain (domainname
, dirname
)
138 const char *domainname
;
141 return libintl_bindtextdomain (domainname
, dirname
);
147 bind_textdomain_codeset (domainname
, codeset
)
148 const char *domainname
;
151 return libintl_bind_textdomain_codeset (domainname
, codeset
);