fix regression from a745c4bfc8a9b5db4e48387170da0dc1d39e3abe
[uclibc-ng.git] / include / libintl.h
blobb7123a9638bc28a71665ee5f01a283765760db46
1 #ifndef LIBINTL_H
2 #define LIBINTL_H
4 char *gettext(const char *msgid);
5 char *dgettext(const char *domainname, const char *msgid);
6 char *dcgettext(const char *domainname, const char *msgid, int category);
7 char *ngettext(const char *msgid1, const char *msgid2, unsigned long n);
8 char *dngettext(const char *domainname, const char *msgid1, const char *msgid2, unsigned long n);
9 char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, int category);
11 char *textdomain(const char *domainname);
12 char *bind_textdomain_codeset(const char *domainname, const char *codeset);
13 char *bindtextdomain(const char *domainname, const char *dirname);
15 #undef gettext_noop
16 #define gettext_noop(X) X
18 #ifndef LIBINTL_NO_MACROS
19 /* if these macros are defined, configure checks will detect libintl as
20 * built into the libc because test programs will work without -lintl.
21 * for example:
22 * checking for ngettext in libc ... yes
23 * the consequence is that -lintl will not be added to the LDFLAGS.
24 * so if for some reason you want that libintl.a gets linked,
25 * add -DLIBINTL_NO_MACROS=1 to your CPPFLAGS. */
27 #define gettext(X) ((char*) (X))
28 #define dgettext(dom, X) ((void)(dom), (char*) (X))
29 #define dcgettext(dom, X, cat) ((void)(dom), (void)(cat), (char*) (X))
30 #define ngettext(X, Y, N) \
31 ((char*) (((N) == 1) ? ((void)(Y), (X)) : ((void)(X), (Y))))
32 #define dngettext(dom, X, Y, N) \
33 ((dom), (char*) (((N) == 1) ? ((void)(Y), (X)) : ((void)(X), (Y))))
34 #define dcngettext(dom, X, Y, N, cat) \
35 ((dom), (cat), (char*) (((N) == 1) ? ((void)(Y), (X)) : ((void)(X), (Y))))
36 #define bindtextdomain(X, Y) ((void)(X), (void)(Y), (char*) "/")
37 #define bind_textdomain_codeset(dom, codeset) \
38 ((void)(dom), (void)(codeset), (char*) 0)
39 #define textdomain(X) ((void)(X), (char*) "messages")
41 #undef ENABLE_NLS
42 #undef DISABLE_NLS
43 #define DISABLE_NLS 1
45 #if __GNUC__ +0 > 3
46 /* most ppl call bindtextdomain() without using its return value
47 thus we get tons of warnings about "statement with no effect" */
48 #pragma GCC diagnostic ignored "-Wunused-value"
49 #endif
51 #endif
53 #include <stdio.h>
54 #define gettext_printf(args...) printf(args)
56 /* to supply LC_MESSAGES and other stuff GNU expects to be exported when
57 including libintl.h */
58 #include <locale.h>
60 #endif