summary refs log tree commit diff
path: root/catgets/catgets.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-29 12:04:45 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-29 12:04:45 +0000
commitb6aa34eb721a209444df2c0694bb18f8f4a58e47 (patch)
tree7256c643e7830c3a6aa7e852942d11d34b988d72 /catgets/catgets.c
parent6770573aa3190c539932fd0bd56e9b64f95065a5 (diff)
downloadglibc-b6aa34eb721a209444df2c0694bb18f8f4a58e47.tar.gz
glibc-b6aa34eb721a209444df2c0694bb18f8f4a58e47.tar.xz
glibc-b6aa34eb721a209444df2c0694bb18f8f4a58e47.zip
Update.
	* locale/loadlocale.c (_nl_load_locale): Optimize a bit.  Pretty
	print.  Add checks for _POSIX_MMAPPED_FILES where necessary.
	(_nl_unload_locale): If locale data was mmapped use munmap.

2000-01-29  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/i386/sys/io.h: Add missing ints, use
	_EXTERN_INLINE, compile inline assembler functions only with gcc.

2000-01-29  Ulrich Drepper  <drepper@redhat.com>

	* catgets/catgets.c (catopen): Handle NL_CAT_LOCALE correctly.
	* catgets/gencat.c (read_input_file): Remove messages correctly.
	* catgets/open_catalog.c (__open_catalog): Handle trailing colons and
	adjacent colons correctly.  Correct loops to read territory and
	and codeset part.
	Patches by Geoff Clare <gwc@unisoft.com> (PR libc/1559).

	* rt/aio_misc.c (get_elem): Assign pointer to new row to correct
	pool entry.
	Patch by Jens Moeller <jens.moeller@waii.com> (PR libc/1558).

2000-01-28  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/arm/Versions: Export the new *rlimit
	interface with symbol version GLIBC_2.2.
	* sysdeps/unix/sysv/linux/i386/Versions: Likewise.
	* sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/getrlimit64.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise.

2000-01-27  Scott Bambrough  <scottb@netwinder.org>

	* sysdeps/unix/sysv/linux/arm/Makefile: Backout rlimit changes for
	resource directory.
	* sysdeps/unix/sysv/linux/arm/syscalls.list: Backout changes for
	versioning setrlimit and getrlimit.

2000-01-27  Andreas Jaeger  <aj@suse.de>

	* sysdeps/powerpc/fpu/libm-ulps: Renamed to ...
	* sysdeps/powerpc/fpu/libm-test-ulps: ...this.

2000-01-27  Ruediger Oertel  <ro@suse.de>

	* sysdeps/unix/sysv/linux/i386/sys/io.h: Change "::" to ": :" for g++.

2000-01-29  Ulrich Drepper  <drepper@redhat.com>
Diffstat (limited to 'catgets/catgets.c')
-rw-r--r--catgets/catgets.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/catgets/catgets.c b/catgets/catgets.c
index c6fd13d4b4..86ff0ff831 100644
--- a/catgets/catgets.c
+++ b/catgets/catgets.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.org>.
 
@@ -19,6 +19,7 @@
 
 #include <alloca.h>
 #include <errno.h>
+#include <locale.h>
 #include <nl_types.h>
 #include <stdlib.h>
 #include <string.h>
@@ -43,20 +44,15 @@ catopen (const char *cat_name, int flag)
   if (strchr (cat_name, '/') == NULL)
     {
       if (flag == NL_CAT_LOCALE)
-	{
-	  env_var = getenv ("LC_ALL");
-	  if (env_var == NULL)
-	    env_var = getenv ("LC_MESSAGES");
-
-	  if (env_var != NULL)
-	    goto have_env_var;
-	}
+	/* Use the current locale setting for LC_MESSAGES.  */
+	env_var = setlocale (LC_MESSAGES, NULL);
+      else
+	/* Use the LANG environment variable.  */
+	env_var = getenv ("LANG");
 
-      env_var = getenv ("LANG");
       if (env_var == NULL)
 	env_var = "C";
 
-    have_env_var:
       env_var_len = strlen (env_var) + 1;
 
       nlspath = __secure_getenv ("NLSPATH");