bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xstrtol.h vs. gnulib-tool --pobase


From: Bruno Haible
Subject: Re: xstrtol.h vs. gnulib-tool --pobase
Date: Wed, 8 Aug 2007 00:43:22 +0200
User-agent: KMail/1.5.4

Eric Blake wrote:
> This patch implements a solution - move the translatable strings into a .c 
> file, so that they are owned by gnulib's POTFILES.in and the actual 
> [d]gettext 
> call occurs within the library.  It also moves the testsuite out of xstrtol.c 
> into the tests directory, so that I could automate the tests with './gnulib-
> tool --with-tests --test xstrtoimax xstrtoumax'.

Thanks for doing all this! It looks absolutely right.

> +#include "gettext.h"
> +
> +#ifndef _
> +# define _(str) gettext (str)
> +#endif

You can remove this #ifndef/#endif pair. It comes from old ancient times,
when it was not clear which include file should do what around gettext()
and _(). Now it's clear for a long time: <libintl.h> defines gettext() as a
function, unconditionally. gettext.h handles ENABLE_NLS but doesn't define
_(). The .c file is responsible for defining _() itself.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]