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

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

Re: address@hidden: defining LC_MESSAGES on Sol 2.5]


From: Bruno Haible
Subject: Re: address@hidden: defining LC_MESSAGES on Sol 2.5]
Date: Thu, 14 Mar 2002 22:28:45 +0100 (CET)

Karl Berry writes:
> Does this tweak to libgnuintl.h for Solaris 2.5 look ok

Stephen Gildea writes:

> Compiling Texinfo 4.1a (and earlier versions) on Solaris 2.5, I get
> these warnings:
> 
> /usr/include/locale.h:56: warning: `LC_MESSAGES' redefined
> ../intl/libintl.h:31: warning: this is the location of the previous definition
> 
> There is code in libintl.h that tries to avoid this warning; it just
> needs a slight tweak for Solaris 2.5:
> 
> --- texinfo-4.1a/intl/libgnuintl.h    Wed Feb 13 12:27:33 2002
> +++ intl/libgnuintl.h Wed Mar 13 20:26:25 2002
> @@ -24,10 +24,11 @@
>  /* The LC_MESSAGES locale category is the category used by the functions
>     gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
>     On systems that don't define it, use an arbitrary value instead.
> -   On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
> -   this file!) and then only defines LC_MESSAGES.  To avoid a redefinition
> +   On Solaris, <locale.h> defines __LOCALE_H (_LOCALE_H on Solaris 2.5)
> +   then includes <libintl.h> (i.e., this file!) and only then defines
> +   LC_MESSAGES.  To avoid a redefinition
>     warning, don't define LC_MESSAGES in this case.  */
> -#if !defined LC_MESSAGES && !defined __LOCALE_H
> +#if !defined LC_MESSAGES && !defined __LOCALE_H && !defined _LOCALE_H
>  # define LC_MESSAGES 1729
>  #endif

It is probably OK. There are other platforms for which the
<locale.h> multiple-inclusion protection macro is called _LOCALE_H.
But on these <locale.h> doesn't include <libintl.h>, so the patch
should be safe.

Bruno



reply via email to

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