ladanyi@130: /* Convenience header for conditional use of GNU . ladanyi@130: Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc. ladanyi@130: ladanyi@130: This program is free software; you can redistribute it and/or modify it ladanyi@130: under the terms of the GNU Library General Public License as published ladanyi@130: by the Free Software Foundation; either version 2, or (at your option) ladanyi@130: any later version. ladanyi@130: ladanyi@130: This program is distributed in the hope that it will be useful, ladanyi@130: but WITHOUT ANY WARRANTY; without even the implied warranty of ladanyi@130: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ladanyi@130: Library General Public License for more details. ladanyi@130: ladanyi@130: You should have received a copy of the GNU Library General Public ladanyi@130: License along with this program; if not, write to the Free Software ladanyi@130: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ladanyi@130: USA. */ ladanyi@130: ladanyi@130: #ifndef _LIBGETTEXT_H ladanyi@130: #define _LIBGETTEXT_H 1 ladanyi@130: ladanyi@130: /* NLS can be disabled through the configure --disable-nls option. */ ladanyi@130: #if ENABLE_NLS ladanyi@130: ladanyi@130: /* Get declarations of GNU message catalog functions. */ ladanyi@130: # include ladanyi@130: ladanyi@130: #else ladanyi@130: ladanyi@130: /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which ladanyi@130: chokes if dcgettext is defined as a macro. So include it now, to make ladanyi@130: later inclusions of a NOP. We don't include ladanyi@130: as well because people using "gettext.h" will not include , ladanyi@130: and also including would fail on SunOS 4, whereas ladanyi@130: is OK. */ ladanyi@130: #if defined(__sun) ladanyi@130: # include ladanyi@130: #endif ladanyi@130: ladanyi@130: /* Many header files from the libstdc++ coming with g++ 3.3 or newer include ladanyi@130: , which chokes if dcgettext is defined as a macro. So include ladanyi@130: it now, to make later inclusions of a NOP. */ ladanyi@130: #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) ladanyi@130: # include ladanyi@130: # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H ladanyi@130: # include ladanyi@130: # endif ladanyi@130: #endif ladanyi@130: ladanyi@130: /* Disabled NLS. ladanyi@130: The casts to 'const char *' serve the purpose of producing warnings ladanyi@130: for invalid uses of the value returned from these functions. ladanyi@130: On pre-ANSI systems without 'const', the config.h file is supposed to ladanyi@130: contain "#define const". */ ladanyi@130: # define gettext(Msgid) ((const char *) (Msgid)) ladanyi@130: # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) ladanyi@130: # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) ladanyi@130: # define ngettext(Msgid1, Msgid2, N) \ ladanyi@130: ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) ladanyi@130: # define dngettext(Domainname, Msgid1, Msgid2, N) \ ladanyi@130: ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) ladanyi@130: # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ladanyi@130: ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) ladanyi@130: # define textdomain(Domainname) ((const char *) (Domainname)) ladanyi@130: # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) ladanyi@130: # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) ladanyi@130: ladanyi@130: #endif ladanyi@130: ladanyi@130: /* A pseudo function call that serves as a marker for the automated ladanyi@130: extraction of messages, but does not call gettext(). The run-time ladanyi@130: translation is done at a different place in the code. ladanyi@130: The argument, String, should be a literal string. Concatenated strings ladanyi@130: and other string expressions won't work. ladanyi@130: The macro's expansion is not parenthesized, so that it is suitable as ladanyi@130: initializer for static 'char[]' or 'const char[]' variables. */ ladanyi@130: #define gettext_noop(String) String ladanyi@130: ladanyi@130: #endif /* _LIBGETTEXT_H */