From 835bf8e0163b563e0d7a5cd8b435141d7a58b946 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 10 Aug 2000 04:40:02 +0000 Subject: Update. 2000-08-01 Mark Kettenis * sysdeps/unix/sysv/linux/i386/sys/elf.h (elf_greg_t, ELF_NGREG, elf_gregset_t, elf_fpregset_t, elf_fpxregset_t): Moved to sysdeps/unix/sysv/linux/i386/sys/procfs.h. Remove the junk that's only relevant in the Linux kernel itself. Add a warning saying that this file is now obsolete, and include . * sysdeps/unix/sysv/linux/i386/sys/procfs.h (elf_greg_t, ELF_NGREG, elf_gregset_t, elf_fpregset_t, elf_fpxregset_t): Moved here from sysdeps/unix/sysv/linux/i386/sys/elf.h. Don't include , and . Remove parts of `struct elf_prstatus' that are #ifdef'ed out. Improve comments and add the notice that the file is primarily there for GDB. * sysdeps/unix/sysv/linux/i386/sys/user.h: Fix comment. 2000-08-09 Jakub Jelinek * time/tzfile.c (__tzfile_compute): __tzstring zones from zone_names. 2000-08-09 Jakub Jelinek * resolv/resolv.h (__res_state): Surround prototype with __BEGIN_DECLS/__END_DECLS. * sysdeps/unix/sysv/linux/m68k/chown.c: Include kernel-features.h. 2000-08-04 Jes Sorensen * sysdeps/unix/sysv/linux/ia64/bits/resource.h (__rlimit_resource): Make independant of asm/resource.h from the Linux kernel. 2000-08-06 Bruno Haible * iconv/gconv_conf.c (__gconv_read_conf): Don't call realpath. 2000-08-06 Bruno Haible * intl/Makefile (CPPFLAGS): Remove $(i18ndir) from LOCALE_ALIAS_PATH. * locale/Makefile (locale-CPPFLAGS): Likewise. 2000-08-09 Ulrich Drepper * sysdeps/i386/fpu/libm-test-ulps: Increase several error values for AMD processors. 2000-08-03 Jakub Jelinek * misc/Versions (mincore): Export at GLIBC_2.2. 2000-08-03 Bruno Haible * intl/libintl.h (gettext, dgettext, dcgettext): Add back __THROW. --- iconv/gconv_conf.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'iconv') diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index 475338f7ca..6d57ca53bc 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -36,9 +36,10 @@ /* This is the default path where we look for module lists. */ static const char default_gconv_path[] = GCONV_PATH; -/* The path element in use. */ +/* The path elements, as determined by the __gconv_get_path function. + All path elements end in a slash. */ const struct path_elem *__gconv_path_elem; -/* Maximum length of a single path element. */ +/* Maximum length of a single path element in __gconv_path_elem. */ size_t __gconv_max_path_elem_len; /* We use the following struct if we couldn't allocate memory. */ @@ -507,21 +508,18 @@ __gconv_read_conf (void) for (cnt = 0; __gconv_path_elem[cnt].name != NULL; ++cnt) { - char real_elem[__gconv_max_path_elem_len + sizeof (gconv_conf_filename)]; - - if (__realpath (__gconv_path_elem[cnt].name, real_elem) != NULL) - { - size_t elem_len = strlen (real_elem); - char *filename; - - filename = alloca (elem_len + 1 + sizeof (gconv_conf_filename)); - __mempcpy (__mempcpy (__mempcpy (filename, real_elem, elem_len), - "/", 1), - gconv_conf_filename, sizeof (gconv_conf_filename)); - - /* Read the next configuration file. */ - read_conf_file (filename, real_elem, elem_len, &modules, &nmodules); - } + const char *elem = __gconv_path_elem[cnt].name; + size_t elem_len = __gconv_path_elem[cnt].len; + char *filename; + + /* No slash needs to be inserted between elem and gconv_conf_filename; + elem already ends in a slash. */ + filename = alloca (elem_len + sizeof (gconv_conf_filename)); + __mempcpy (__mempcpy (filename, elem, elem_len), + gconv_conf_filename, sizeof (gconv_conf_filename)); + + /* Read the next configuration file. */ + read_conf_file (filename, elem, elem_len, &modules, &nmodules); } /* Add the internal modules. */ -- cgit v1.2.3