1 #ifndef LIBINTL_H
2 #define LIBINTL_H
3 
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);
10 
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);
14 
15 #undef gettext_noop
16 #define gettext_noop(X) X
17 
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. */
26 
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")
40 
41 #undef ENABLE_NLS
42 #undef DISABLE_NLS
43 #define DISABLE_NLS 1
44 
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
50 
51 #endif
52 
53 /* to supply LC_MESSAGES and other stuff GNU expects to be exported when
54    including libintl.h */
55 #include <locale.h>
56 
57 #endif
58 
59