2012-03-02 Kees Cook <keescook@chromium.org>
[glibc.git] / include / libintl.h
blobd15a6c0a05f00766ba7df4f1e64c73d8dcfde5c6
1 #ifndef _LIBINTL_H
2 #include <intl/libintl.h>
3 #include <locale.h>
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 libc_hidden_proto (__dcgettext)
15 extern char *__dcgettext_internal (const char *__domainname,
16 const char *__msgid, int __category)
17 __attribute_format_arg__ (2)
18 attribute_hidden;
20 extern char *__ngettext (const char *__msgid1, const char *__msgid2,
21 unsigned long int __n)
22 __attribute_format_arg__ (1) __attribute_format_arg__ (2);
23 extern char *__dngettext (const char *__domainname,
24 const char *__msgid1, const char *__msgid2,
25 unsigned long int __n)
26 __attribute_format_arg__ (2) __attribute_format_arg__ (3);
27 extern char *__dcngettext (const char *__domainname,
28 const char *__msgid1, const char *__msgid2,
29 unsigned long int __n, int __category)
30 __attribute_format_arg__ (2) __attribute_format_arg__ (3);
31 extern char *__dcngettext_internal (const char *__domainname,
32 const char *__msgid1,
33 const char *__msgid2,
34 unsigned long int __n, int __category)
35 __attribute_format_arg__ (2) __attribute_format_arg__ (3)
36 attribute_hidden;
38 extern char *__textdomain (const char *__domainname);
39 extern char *__bindtextdomain (const char *__domainname,
40 const char *__dirname);
41 extern char *__bind_textdomain_codeset (const char *__domainname,
42 const char *__codeset);
44 extern const char _libc_intl_domainname[];
45 libc_hidden_proto (_libc_intl_domainname)
47 /* Define the macros `_' and `N_' for conveniently marking translatable
48 strings in the libc source code. We have to make sure we get the
49 correct definitions so we undefine the macros first. */
51 # undef N_
52 # define N_(msgid) msgid
54 # undef _
55 /* This is defined as an optimizing macro, so use it. */
56 # define _(msgid) \
57 __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
59 #endif