bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gettext and C usage


From: Eli Zaretskii
Subject: Re: gettext and C usage
Date: Mon, 25 Feb 2002 16:41:11 -0500

> From: Bruno Haible <address@hidden>
> Date: Mon, 25 Feb 2002 19:43:09 +0100 (CET)
> 
> > For Texinfo, I'm currently using:
> > 
> > #ifdef HAVE_LOCALE_H
> > #include <locale.h>
> > #endif
> 
> Plain "#include <locale.h>" is sufficient. Systems without <locale.h>
> file are not in use anymore.

If so, then using HAVE_LOCALE_H cannoot possibly hurt, can it?

> > #ifndef HAVE_SETLOCALE
> > #define setlocale(category,locale) /* empty */
> > #endif
> 
> Likewise

Likewise.

> > /* For gettext (NLS).  */
> > #include "gettext.h"
> 
> OK.
> 
> > #if !HAVE_LC_MESSAGES
> > # define LC_MESSAGES (-1)
> > #endif
> 
> Not needed. If <locale.h> doesn't define LC_MESSAGES, <libintl.h> will
> do so. <libintl.h> is included by "gettext.h".

But if ENABLE_NLS is not defined, then lib/gettext.h does not include
libintl.h, at least the version of lib/gettext.h that is in
texinfo-4.0i.tar.gz.  So LC_MESSAGES will remain undefined.



reply via email to

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