Rev 41539 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
/* intl-compat.c - Stub functions to call gettext functions from GNU gettextLibrary.Copyright (C) 1995, 2000-2003, 2005 Software Foundation, Inc.This program is free software; you can redistribute it and/or modify itunder the terms of the GNU Library General Public License as publishedby the Free Software Foundation; either version 2, or (at your option)any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULibrary General Public License for more details.You should have received a copy of the GNU Library General PublicLicense along with this program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,USA. */#ifdef HAVE_CONFIG_H# include <config.h>#endif#include "gettextP.h"/* @@ end of prolog @@ *//* This file redirects the gettext functions (without prefix) to thosedefined in the included GNU libintl library (with "libintl_" prefix).It is compiled into libintl in order to make the AM_GNU_GETTEXT testof gettext <= 0.11.2 work with the libintl library >= 0.11.3 whichhas the redirections primarily in the <libintl.h> include file.It is also compiled into libgnuintl so that libgnuintl.so can be usedas LD_PRELOADable library on glibc systems, to provide the extrafeatures that the functions in the libc don't have (namely, logging). */#undef gettext#undef dgettext#undef dcgettext#undef ngettext#undef dngettext#undef dcngettext#undef textdomain#undef bindtextdomain#undef bind_textdomain_codeset/* When building a DLL, we must export some functions. Note that becausethe functions are only defined for binary backward compatibility, wedon't need to use __declspec(dllimport) in any case. */#if HAVE_VISIBILITY && BUILDING_DLL# define DLL_EXPORTED __attribute__((__visibility__("default")))#elif defined _MSC_VER && BUILDING_DLL# define DLL_EXPORTED __declspec(dllexport)#else# define DLL_EXPORTED#endifDLL_EXPORTEDchar *gettext (const char *msgid){return libintl_gettext (msgid);}DLL_EXPORTEDchar *dgettext (const char *domainname, const char *msgid){return libintl_dgettext (domainname, msgid);}DLL_EXPORTEDchar *dcgettext (const char *domainname, const char *msgid, int category){return libintl_dcgettext (domainname, msgid, category);}DLL_EXPORTEDchar *ngettext (const char *msgid1, const char *msgid2, unsigned long int n){return libintl_ngettext (msgid1, msgid2, n);}DLL_EXPORTEDchar *dngettext (const char *domainname,const char *msgid1, const char *msgid2, unsigned long int n){return libintl_dngettext (domainname, msgid1, msgid2, n);}DLL_EXPORTEDchar *dcngettext (const char *domainname,const char *msgid1, const char *msgid2, unsigned long int n,int category){return libintl_dcngettext (domainname, msgid1, msgid2, n, category);}DLL_EXPORTEDchar *textdomain (const char *domainname){return libintl_textdomain (domainname);}DLL_EXPORTEDchar *bindtextdomain (const char *domainname, const char *dirname){return libintl_bindtextdomain (domainname, dirname);}DLL_EXPORTEDchar *bind_textdomain_codeset (const char *domainname, const char *codeset){return libintl_bind_textdomain_codeset (domainname, codeset);}