[BZ #284, BZ #721]
[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      __attribute_format_arg__ (1);
8 extern char *__dgettext (__const char *__domainname,
9                          __const char *__msgid)
10      __attribute_format_arg__ (2);
11 extern char *__dcgettext (__const char *__domainname,
12                           __const char *__msgid, int __category)
13      __attribute_format_arg__ (2);
14 extern char *__dcgettext_internal (__const char *__domainname,
15                                    __const char *__msgid, int __category)
16      __attribute_format_arg__ (2)
17      attribute_hidden;
18
19 extern char *__ngettext (__const char *__msgid1, __const char *__msgid2,
20                          unsigned long int __n)
21      __attribute_format_arg__ (1) __attribute_format_arg__ (2);
22 extern char *__dngettext (__const char *__domainname,
23                           __const char *__msgid1, __const char *__msgid2,
24                           unsigned long int __n)
25      __attribute_format_arg__ (2) __attribute_format_arg__ (3);
26 extern char *__dcngettext (__const char *__domainname,
27                            __const char *__msgid1, __const char *__msgid2,
28                            unsigned long int __n, int __category)
29      __attribute_format_arg__ (2) __attribute_format_arg__ (3);
30 extern char *__dcngettext_internal (__const char *__domainname,
31                                     __const char *__msgid1,
32                                     __const char *__msgid2,
33                                     unsigned long int __n, int __category)
34      __attribute_format_arg__ (2) __attribute_format_arg__ (3)
35      attribute_hidden;
36
37 extern char *__textdomain (__const char *__domainname);
38 extern char *__bindtextdomain (__const char *__domainname,
39                                __const char *__dirname);
40 extern char *__bind_textdomain_codeset (__const char *__domainname,
41                                         __const char *__codeset);
42
43 extern const char _libc_intl_domainname[];
44 libc_hidden_proto (_libc_intl_domainname)
45
46 /* Define the macros `_' and `N_' for conveniently marking translatable
47    strings in the libc source code.  We have to make sure we get the
48    correct definitions so we undefine the macros first.  */
49
50 # undef N_
51 # define N_(msgid)      msgid
52
53 # undef _
54 /* This is defined as an optimizing macro, so use it.  */
55 # define _(msgid) \
56   __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
57
58 #endif