From b6aa34eb721a209444df2c0694bb18f8f4a58e47 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jan 2000 12:04:45 +0000 Subject: 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 * 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 * 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 (PR libc/1559). * rt/aio_misc.c (get_elem): Assign pointer to new row to correct pool entry. Patch by Jens Moeller (PR libc/1558). 2000-01-28 Jakub Jelinek * 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 * 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 * sysdeps/powerpc/fpu/libm-ulps: Renamed to ... * sysdeps/powerpc/fpu/libm-test-ulps: ...this. 2000-01-27 Ruediger Oertel * sysdeps/unix/sysv/linux/i386/sys/io.h: Change "::" to ": :" for g++. 2000-01-29 Ulrich Drepper --- catgets/catgets.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'catgets/catgets.c') 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, . @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -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"); -- cgit v1.2.3