]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Define a fallback value for LC_MESSAGES.
authorBruno Haible <bruno@clisp.org>
Tue, 6 Feb 2001 13:00:28 +0000 (13:00 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 6 Feb 2001 13:00:28 +0000 (13:00 +0000)
doc/gettext.texi
intl/ChangeLog
intl/libgnuintl.h

index d892101f291047de046ae0ac50c538b2721baa3e..8cc845881299d6b185d6205548c31f5e80446331 100644 (file)
@@ -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
index 01c0a4e6868c9eefebdff9e17594f9d5f4c4d027..76158d8e013407a2d86e2c3acc07747f88462170 100644 (file)
@@ -1,3 +1,7 @@
+2001-02-05  Bruno Haible  <haible@clisp.cons.org>
+
+       * libgnuintl.h (LC_MESSAGES): Provide a default value.
+
 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
 
        * config.charset: Update for FreeBSD 4.2.
index e3458280fa5a0e39f2226f5226842d69f6adb2bd..8fbf4abee2d0373ed4e2fcddccdba187c1affeda 100644 (file)
 
 #include <locale.h>
 
+/* 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