bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] HAVE_LIBINTL_H


From: Bruno Haible
Subject: Re: [Bug-gnulib] HAVE_LIBINTL_H
Date: Tue, 5 Nov 2002 14:16:21 +0100 (CET)

Paul Eggert writes:
> Yes, I like this change.

Thanks, I'll do it then.

> Can't we go further, and replace code like this:
> 
>   #if ENABLE_NLS
>   # include <libintl.h>
>   # define _(Text) gettext (Text)
>   #else
>   # define _(Text) Text
>   #endif
> 
> with code like this?
> 
>   #include <gettext.h>

Sure, that's the whole idea of "gettext.h": Reduce to a single, easy
to remember, line of code what was previously a dozen of lines.

I'll use

    #include "gettext.h"

because that also works in files that are in the same directory as
gettext.h, without the need to add "-I. -I$(srcdir)" to DEFS in the
Makefile.

> glibc can be compiled with a private copy of <gettext.h>

That's certainly a good goal. It will require renaming glibc's
intl/gettext.h to intl/gmo.h, though.

> Though at some point people might start
> to wonder why <gettext.h> isn't installed into /usr/include....

The reason is simple: ENABLE_NLS is a mere convention, not a
standardized macro. Likewise for gettext_noop.

> I recall that part of the problem was that Ulrich Drepper rejected K&R
> compatibility changes

He accepts K&R compatibility in files which are shared between glibc
and other GNU packages.

> glibc now assumes C99

... except in source files shared with other GNU packages. See
http://sources.redhat.com/ml/libc-alpha/2002-09/msg00642.html

Bruno




reply via email to

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