Update.
[platform/upstream/glibc.git] / include / libintl.h
1 #ifndef _LIBINTL_H
2 #include <intl/libintl.h>
3 #include <locale.h>
4
5 /* Now define the internal interfaces.  */
6 extern char *__gettext (__const char *__msgid);
7 extern char *__dgettext (__const char *__domainname,
8                          __const char *__msgid);
9 extern char *__dcgettext (__const char *__domainname,
10                           __const char *__msgid, int __category);
11 extern char *__dcgettext_internal (__const char *__domainname,
12                                    __const char *__msgid, int __category)
13      attribute_hidden;
14 extern char *__textdomain (__const char *__domainname);
15 extern char *__bindtextdomain (__const char *__domainname,
16                                __const char *__dirname);
17 extern char *__bind_textdomain_codeset (__const char *__domainname,
18                                         __const char *__codeset);
19 extern const char _libc_intl_domainname[];
20 extern const char _libc_intl_domainname_internal[] attribute_hidden;
21
22 /* Define the macros `_' and `N_' for conveniently marking translatable
23    strings in the libc source code.  We have to make sure we get the
24    correct definitions so we undefine the macros first.  */
25
26 # undef N_
27 # define N_(msgid)      msgid
28
29 # undef _
30 /* This is defined as an optimizing macro, so use it.  */
31 # if !defined NOT_IN_LIBC && defined SHARED
32 #  define _(msgid) \
33   __dcgettext_internal (_libc_intl_domainname_internal, (msgid), LC_MESSAGES)
34 # else
35 #  define _(msgid) \
36   __dcgettext (_libc_intl_domainname, (msgid), LC_MESSAGES)
37 #endif
38
39 #endif