aboutsummaryrefslogtreecommitdiff
path: root/intl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-12 18:17:11 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-12 18:17:11 +0000
commit1c298d08873e72a2339161517da660bdaff0e3f8 (patch)
tree8dc2c8b8521576cc303468e3203db0eb4d262b0a /intl
parentf98c2d06bb4e04e59bb067b301bacf880fb72a9f (diff)
downloadglibc-1c298d08873e72a2339161517da660bdaff0e3f8.zip
glibc-1c298d08873e72a2339161517da660bdaff0e3f8.tar.gz
glibc-1c298d08873e72a2339161517da660bdaff0e3f8.tar.bz2
[BZ #4775, BZ #4776]
2007-07-12 Jakub Jelinek <jakub@redhat.com> [BZ #4775] * math/tgmath.h (__tgmath_real_type_sub): Formatting. (__tgmath_real_type): Fix if expr is const int or other const qualified integral type. (__TGMATH_UNARY_REAL_ONLY): Rewritten to avoid using statement expressions and handle const qualified arguments. (__TGMATH_BINARY_FIRST_REAL_ONLY, __TGMATH_UNARY_REAL_IMAG, __TGMATH_UNARY_REAL_IMAG_RET_REAL): Likewise. (__TGMATH_UNARY_REAL_RET_ONLY): Rewritten to avoid using statement expressions. (__TGMATH_BINARY_REAL_ONLY, __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY, __TGMATH_TERNARY_REAL_ONLY, __TGMATH_BINARY_REAL_IMAG): Likewise. (__TGMATH_UNARY_IMAG): Define. (conj, cproj): Use __TGMATH_UNARY_IMAG macro. * math/Makefile (tests): Add test-tgmath2. (CFLAGS-test-tgmath2.c): Add. * math/test-tgmath.c (fy, dy, ly, fz, dz, lz, count_cdouble, count_cfloat, count_cldouble): New variables. (NCCALLS): Define. (main): Check number of complex calls as well. (F(compile_test)): Add complex tests and tests with const qualified arguments. (y, z, ccount): Define. (F(cacos), F(casin), F(catan), F(ccos), F(csin), F(ctan), F(cacosh), F(casinh), F(catanh), F(ccosh), F(csinh), F(ctanh), F(cexp), F(clog), F(csqrt), F(cpow), F(cabs), F(carg), F(creal), F(cimag), F(conj), F(cproj)): New functions. * math/test-tgmath2.c: New test. 2007-07-11 Jakub Jelinek <jakub@redhat.com> [BZ #4776] * elf/dl-load.c (_dl_rtld_di_serinfo): Output / in LD_LIBRARY_PATH, RPATH etc. as "/" rather than "", don't segfault on empty paths, instead output ".". * dlfcn/Makefile (distribute): Add glreflib3.c. (module-names): Add glreflib3. ($(objpfx)tst-dlinfo.out): Depend on glreflib3.so rather than glreflib1.so. (LDFLAGS_glreflib3.so): New. * dlfcn/tst-dlinfo.c (do_test): Load glreflib3.so instead of glreflib1.so. * dlfcn/glreflib3.c: New file. * intl/finddomain.c (_nl_find_domain): If _nl_explode_name returned -1, return NULL. * intl/explodename.c (_nl_explode_name): Return -1 if _nl_normalize_codeset failed.
Diffstat (limited to 'intl')
-rw-r--r--intl/explodename.c6
-rw-r--r--intl/finddomain.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/intl/explodename.c b/intl/explodename.c
index 8e326ea..321204d 100644
--- a/intl/explodename.c
+++ b/intl/explodename.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -108,7 +108,9 @@ _nl_explode_name (name, language, modifier, territory, codeset,
{
*normalized_codeset = _nl_normalize_codeset (*codeset,
cp - *codeset);
- if (strcmp (*codeset, *normalized_codeset) == 0)
+ if (*normalized_codeset == NULL)
+ return -1;
+ else if (strcmp (*codeset, *normalized_codeset) == 0)
free ((char *) *normalized_codeset);
else
mask |= XPG_NORM_CODESET;
diff --git a/intl/finddomain.c b/intl/finddomain.c
index 9806ba1..54e617c 100644
--- a/intl/finddomain.c
+++ b/intl/finddomain.c
@@ -1,5 +1,5 @@
/* Handle list of needed message catalogs
- Copyright (C) 1995-1999, 2000, 2001, 2002, 2004, 2006
+ Copyright (C) 1995-1999, 2000, 2001, 2002, 2004, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -126,6 +126,9 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
mask = _nl_explode_name (locale, &language, &modifier, &territory,
&codeset, &normalized_codeset);
+ if (mask == -1)
+ /* This means we are out of core. */
+ return NULL;
/* We need to protect modifying the _NL_LOADED_DOMAINS data. */
__libc_rwlock_wrlock (lock);