Remove "convenience header" "gettext.h" and use <libintl.h> instead.

gettextize provides a local file called "gettext.h".  Remove this and
use <libintl.h> from glibc headers instead.

Most of this change is mechanical: #include <libintl.h> in every C
file which uses any gettext function.  But also we remove the
gettext.h file, and adjust the "_" macros.

Note that this effectively removes the ./configure --disable-nls
option, although we don't know if that ever worked.
This commit is contained in:
Richard W.M. Jones
2012-04-30 16:23:05 +01:00
parent ea74856d95
commit 6aa95e87c1
39 changed files with 40 additions and 321 deletions

View File

@@ -31,24 +31,12 @@
#include <sys/wait.h>
#include <locale.h>
#include <limits.h>
#include <libintl.h>
#include <guestfs.h>
#ifdef HAVE_GETTEXT
#include "gettext.h"
#define _(str) dgettext(PACKAGE, (str))
//#define N_(str) dgettext(PACKAGE, (str))
#else
#define _(str) str
//#define N_(str) str
#endif
#if !ENABLE_NLS
#undef textdomain
#define textdomain(Domainname) /* empty */
#undef bindtextdomain
#define bindtextdomain(Domainname, Dirname) /* empty */
#endif
#define STREQ(a,b) (strcmp((a),(b)) == 0)
//#define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0)