[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] getopt depending on gettext
From: |
Paul Eggert |
Subject: |
Re: [bug-gnulib] getopt depending on gettext |
Date: |
Mon, 30 May 2005 20:57:48 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Werner LEMBERG <address@hidden> writes:
> I think it is a *bad* idea to make getopt depend on gettext
> unconditionally.
Is this because groff uses getopt but not gettext?
What about the other gnulib modules that depend on gettext? Here is a
list. Shouldn't they be in the same category as getopt here?
argmatch file-type makepath quotearg version-etc
c-stack getaddrinfo obstack regex wait-process
closeout human openat rpmatch xalloc-die
copy-file javacomp pagealign_alloc unicodeio xmemcoll
execute javaexec pipe userspec xsetenv
> +# ifdef NO_GETTEXT
> +# define _(msgid) (msgid)
> +# else
> +# include "gettext.h"
> +# define _(msgid) gettext (msgid)
> +# endif
We shouldn't invent a new symbol NO_GETTEXT for this; there's already
a symbol ENABLE_NLS for its meaning (albeit negated). E.g., you could
do this:
#if ENABLE_NLS
# include "gettext.h"
# define _(msgid) gettext (msgid)
#else
# define _(msgid) msgid
#endif
But here's a simpler thought: leave getopt.c alone, and simply
distribute unmodified gettext.h with groff. That should work.
gettext.h does not need the other parts of the gettext module.
One way to do this would be to remove the dependency of the modules
listed above on "gettext", but add "gettext.h" to each of these
module's files. That would be a simple change to gnulib, that
wouldn't require changing any source files.