From: Bruno Haible Date: Tue, 6 Feb 2001 13:00:28 +0000 (+0000) Subject: Define a fallback value for LC_MESSAGES. X-Git-Tag: v0.10.36~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f9e1415434984e3c896cbbef6103d75ce41318c;p=thirdparty%2Fgettext.git Define a fallback value for LC_MESSAGES. --- diff --git a/doc/gettext.texi b/doc/gettext.texi index d892101f2..8cc845881 100644 --- a/doc/gettext.texi +++ b/doc/gettext.texi @@ -3312,12 +3312,16 @@ library, and for packages adhering to its conventions, it's: @noindent @var{locale} is the value of the locale whose name is this @code{LC_@var{category}}. For @code{gettext} and @code{dgettext} this -locale is always @code{LC_MESSAGES}. @code{dcgettext} specifies the -locale by the third argument.@footnote{Some +@code{LC_@var{category}} is always @code{LC_MESSAGES}.@footnote{Some system, eg Ultrix, don't have @code{LC_MESSAGES}. Here we use a more or -less arbitrary value for it.} @footnote{When the system does not support -@code{setlocale} its behavior in setting the locale values is simulated -by looking at the environment variables.} +less arbitrary value for it, namely 1729, the smallest positive integer +which can be represented in two different ways as the sum of two cubes.} +The value of the locale is determined through +@code{setlocale (LC_@var{category}, NULL)}. +@footnote{When the system does not support @code{setlocale} its behavior +in setting the locale values is simulated by looking at the environment +variables.} +@code{dcgettext} specifies the locale category by the third argument. @node Charset conversion, Plural forms, Locating Catalogs, gettext @subsection How to specify the output character set @code{gettext} uses diff --git a/intl/ChangeLog b/intl/ChangeLog index 01c0a4e68..76158d8e0 100644 --- a/intl/ChangeLog +++ b/intl/ChangeLog @@ -1,3 +1,7 @@ +2001-02-05 Bruno Haible + + * libgnuintl.h (LC_MESSAGES): Provide a default value. + 2001-01-30 Bruno Haible * config.charset: Update for FreeBSD 4.2. diff --git a/intl/libgnuintl.h b/intl/libgnuintl.h index e3458280f..8fbf4abee 100644 --- a/intl/libgnuintl.h +++ b/intl/libgnuintl.h @@ -20,6 +20,13 @@ #include +/* 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. */ +#ifndef LC_MESSAGES +# define LC_MESSAGES 1729 +#endif + /* We define an additional symbol to signal that we use the GNU implementation of gettext. */ #define __USE_GNU_GETTEXT 1