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