diff options
-rw-r--r-- | ChangeLog | 72 | ||||
-rw-r--r-- | Makeconfig | 11 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | elf/Makefile | 4 | ||||
-rw-r--r-- | elf/chroot_canon.c | 10 | ||||
-rw-r--r-- | elf/dl-close.c | 5 | ||||
-rw-r--r-- | elf/dl-iteratephdr.c | 11 | ||||
-rw-r--r-- | elf/dl-load.c | 3 | ||||
-rw-r--r-- | elf/dl-object.c | 5 | ||||
-rw-r--r-- | elf/dl-support.c | 4 | ||||
-rw-r--r-- | elf/ldconfig.c | 17 | ||||
-rw-r--r-- | elf/rtld.c | 1 | ||||
-rw-r--r-- | hurd/lookup-at.c | 4 | ||||
-rw-r--r-- | include/features.h | 2 | ||||
-rw-r--r-- | localedata/ChangeLog | 5 | ||||
-rw-r--r-- | localedata/locales/de_CH | 54 | ||||
-rw-r--r-- | misc/mntent_r.c | 6 | ||||
-rw-r--r-- | po/bg.po | 68 | ||||
-rw-r--r-- | po/vi.po | 10 | ||||
-rw-r--r-- | stdio-common/tst-fmemopen.c | 18 | ||||
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/ttyname_r.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/bsd/ptsname.c | 11 | ||||
-rw-r--r-- | sysdeps/unix/getlogin.c | 9 | ||||
-rw-r--r-- | version.h | 4 |
25 files changed, 241 insertions, 107 deletions
diff --git a/ChangeLog b/ChangeLog index c22e562774..8323844db1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,73 @@ +2010-05-03 Ulrich Drepper <drepper@redhat.com> + + * version.h (VERSION): Bump for 2.12 release. + * include/features.h (__GLIBC_MINOR__): Bump to 12. + + [BZ #11149] + * elf/ldconfig.c (search_dir): Fix handling of symlinks in chroot. + + * elf/chroot_canon.c (chroot_canon): Use xmalloc and xrealloc. + + * elf/ldconfig.c (parse_conf_include): Don't fall back to + directories named in config file outside the chroot. + +2010-02-02 Andreas Schwab <schwab@redhat.com> + + * sysdeps/generic/ldsodefs.h (struct rtld_global): Add + _dl_load_write_lock. + * elf/rtld.c (_rtld_global): Initialize it. + * elf/dl-support.c (_dl_load_write_lock): Define . + * elf/dl-close.c (_dl_close_worker): Lock GL(dl_load_write_lock) + when modifying the list of loaded objects. + * elf/dl-load.c (lose): Likewise. + * elf/dl-object.c (_dl_new_object): Likewise. + * elf/dl-iteratephdr.c (__dl_iterate_phdr): Lock + GL(dl_load_write_lock) instead of GL(dl_load_lock). + +2010-05-03 Ulrich Drepper <drepper@redhat.com> + + * elf/dl-iteratephdr.c (__dl_iterate_phdr): Remove unnecessary + assignment. + +2010-05-02 Ulrich Drepper <drepper@redhat.com> + + * misc/mntent_r.c (encode_name): The slow loop handles newlines so we + should recognize them as an abort condition. + Patch by Jan Lieskovsky <jlieskov@redhat.com>. + +2010-04-25 Bruno Haible <bruno@clisp.org> + + [BZ #11538] + * sysdeps/unix/bsd/ptsname.c (__ptsname_r): Use __ttyname_r's return + value instead of errno. + * sysdeps/unix/getlogin.c (getlogin): Likewise. + + [BZ #11537] + * sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Upon failure, return + errno, not -1. + +2010-04-24 Emilio Pozuelo Monfort <pochu27@gmail.com> + + * hurd/lookup-at.c (__file_name_lookup_at): Fix error return value. + +2010-04-22 Ulrich Drepper <drepper@redhat.com> + + * po/vi.po: Update from translation team. + +2010-04-21 Ulrich Drepper <drepper@redhat.com> + + * po/bg.po: Update from translation team. + +2010-04-19 Roland McGrath <roland@redhat.com> + + * elf/Makefile ($(objpfx)noload): Depend on libdl.so. + + * Makeconfig (as-needed, no-as-needed): New variables. + (link-libc): Add ld.so inside --as-needed. + + * stdio-common/tst-fmemopen.c (TEST_FILE): Macro removed. + (main): Take arguments. Construct test file name from ARGV[0]. + 2010-04-15 H.J. Lu <hongjiu.lu@intel.com> * string/test-strncmp.c (check_result): New function. @@ -1643,7 +1713,7 @@ argv argument as non-NULL. (execle, execl, execlp): Mark the first ARG argument as non-NULL. --2009-12-08 Ulrich Drepper <drepper@redhat.com> +2009-12-08 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/bits/socket.h: Define mmsghdr and declare recvmmsg. diff --git a/Makeconfig b/Makeconfig index 9aacc81e8a..9778998738 100644 --- a/Makeconfig +++ b/Makeconfig @@ -387,6 +387,14 @@ ifeq ($(elf),yes) have-initfini = yes endif +ifeq ($(have-as-needed),yes) +as-needed := -Wl,--as-needed +no-as-needed := -Wl,--no-as-needed +else +as-needed := +no-as-needed := +endif + # Installed name of the startup code. ifneq ($(have-initfini),yes) # When not having init/fini, there is just one startfile, called crt0.o. @@ -484,7 +492,8 @@ ifeq ($(elf),yes) # run the linked programs. link-libc = -Wl,-rpath-link=$(rpath-link) \ $(common-objpfx)libc.so$(libc.so-version) \ - $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) + $(common-objpfx)$(patsubst %,$(libtype.oS),c) \ + $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed) $(gnulib) # This is how to find at build-time things that will be installed there. rpath-dirs = math elf dlfcn nss nis rt resolv crypt endif diff --git a/NEWS b/NEWS index d55a844d4e..f508959c5e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -GNU C Library NEWS -- history of user-visible changes. 2010-4-9 +GNU C Library NEWS -- history of user-visible changes. 2010-5-4 Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc. See the end for copying conditions. @@ -16,7 +16,7 @@ Version 2.12 11185, 11186, 11187, 11188, 11189, 11190, 11191, 11192, 11193, 11194, 11200, 11230, 11235, 11242, 11254, 11258, 11271, 11272, 11276, 11279, 11287, 11292, 11319, 11332, 11333, 11387, 11389, 11390, 11394, 11397, - 11410, 11438, 11449, 11470, 11471 + 11410, 11438, 11449, 11470, 11471, 11520, 11537, 11538 * New interfaces: pthread_getname_np, pthread_setname_np diff --git a/elf/Makefile b/elf/Makefile index d57c7fe7ed..e600cc3982 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1995-2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1995-2007,2008,2009,2010 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -654,7 +654,7 @@ $(objpfx)vismain: $(addprefix $(objpfx),vismod1.so vismod2.so) $(objpfx)vismain.out: $(addprefix $(objpfx),vismod3.so) vismain-ENV = LD_PRELOAD=$(addprefix $(objpfx),vismod3.so) -$(objpfx)noload: $(objpfx)testobj1.so +$(objpfx)noload: $(objpfx)testobj1.so $(common-objpfx)dlfcn/libdl.so LDFLAGS-noload = -rdynamic $(objpfx)noload.out: $(objpfx)testobj5.so diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c index 3c16a43ebb..54a6a4cc96 100644 --- a/elf/chroot_canon.c +++ b/elf/chroot_canon.c @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file inside chroot. - Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005 + Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -58,9 +58,7 @@ chroot_canon (const char *chroot, const char *name) return NULL; } - rpath = malloc (chroot_len + PATH_MAX); - if (rpath == NULL) - return NULL; + rpath = xmalloc (chroot_len + PATH_MAX); rpath_limit = rpath + chroot_len + PATH_MAX; @@ -109,9 +107,7 @@ chroot_canon (const char *chroot, const char *name) new_size += end - start + 1; else new_size += PATH_MAX; - new_rpath = (char *) realloc (rpath, new_size); - if (new_rpath == NULL) - goto error; + new_rpath = (char *) xrealloc (rpath, new_size); rpath = new_rpath; rpath_limit = rpath + new_size; diff --git a/elf/dl-close.c b/elf/dl-close.c index b73a7adb1a..700e765c3c 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -507,6 +507,9 @@ _dl_close_worker (struct link_map *map) size_t tls_free_end; tls_free_start = tls_free_end = NO_TLS_OFFSET; + /* We modify the list of loaded objects. */ + __rtld_lock_lock_recursive (GL(dl_load_write_lock)); + /* Check each element of the search list to see if all references to it are gone. */ for (unsigned int i = first_loaded; i < nloaded; ++i) @@ -665,6 +668,8 @@ _dl_close_worker (struct link_map *map) } } + __rtld_lock_unlock_recursive (GL(dl_load_write_lock)); + /* If we removed any object which uses TLS bump the generation counter. */ if (any_tls) { diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c index fee19f3f04..5f1c20d755 100644 --- a/elf/dl-iteratephdr.c +++ b/elf/dl-iteratephdr.c @@ -1,5 +1,5 @@ /* Get loaded objects program headers. - Copyright (C) 2001-2004, 2006-2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2001. @@ -26,7 +26,7 @@ static void cancel_handler (void *arg __attribute__((unused))) { - __rtld_lock_unlock_recursive (GL(dl_load_lock)); + __rtld_lock_unlock_recursive (GL(dl_load_write_lock)); } hidden_proto (__dl_iterate_phdr) @@ -38,8 +38,8 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, struct dl_phdr_info info; int ret = 0; - /* Make sure we are alone. */ - __rtld_lock_lock_recursive (GL(dl_load_lock)); + /* Make sure nobody modifies the list of loaded objects. */ + __rtld_lock_lock_recursive (GL(dl_load_write_lock)); __libc_cleanup_push (cancel_handler, 0); /* We have to determine the namespace of the caller since this determines @@ -68,7 +68,6 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, info.dlpi_phnum = l->l_phnum; info.dlpi_adds = GL(dl_load_adds); info.dlpi_subs = GL(dl_load_adds) - nloaded; - info.dlpi_tls_modid = 0; info.dlpi_tls_data = NULL; info.dlpi_tls_modid = l->l_tls_modid; if (info.dlpi_tls_modid != 0) @@ -80,7 +79,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, /* Release the lock. */ __libc_cleanup_pop (0); - __rtld_lock_unlock_recursive (GL(dl_load_lock)); + __rtld_lock_unlock_recursive (GL(dl_load_write_lock)); return ret; } diff --git a/elf/dl-load.c b/elf/dl-load.c index d8f9131dd6..0adddf5aaa 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -803,6 +803,8 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l, (void) __close (fd); if (l != NULL) { + /* We modify the list of loaded objects. */ + __rtld_lock_lock_recursive (GL(dl_load_write_lock)); /* Remove the stillborn object from the list and free it. */ assert (l->l_next == NULL); if (l->l_prev == NULL) @@ -813,6 +815,7 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l, l->l_prev->l_next = NULL; --GL(dl_ns)[l->l_ns]._ns_nloaded; free (l); + __rtld_lock_unlock_recursive (GL(dl_load_write_lock)); } free (realname); diff --git a/elf/dl-object.c b/elf/dl-object.c index 788e2c07b9..22a163560b 100644 --- a/elf/dl-object.c +++ b/elf/dl-object.c @@ -93,6 +93,9 @@ _dl_new_object (char *realname, const char *libname, int type, new->l_scope = new->l_scope_mem; new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]); + /* We modify the list of loaded objects. */ + __rtld_lock_lock_recursive (GL(dl_load_write_lock)); + /* Counter for the scopes we have to handle. */ idx = 0; @@ -114,6 +117,8 @@ _dl_new_object (char *realname, const char *libname, int type, new->l_serial = GL(dl_load_adds); ++GL(dl_load_adds); + __rtld_lock_unlock_recursive (GL(dl_load_write_lock)); + /* If we have no loader the new object acts as it. */ if (loader == NULL) loader = new; diff --git a/elf/dl-support.c b/elf/dl-support.c index 65b25750de..f94d2c4c6e 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -166,6 +166,10 @@ const ElfW(Ehdr) *_dl_sysinfo_dso; the loaded object might as well require a call to this function. At this time it is not anymore a problem to modify the tables. */ __rtld_lock_define_initialized_recursive (, _dl_load_lock) +/* This lock is used to keep __dl_iterate_phdr from inspecting the + list of loaded objects while an object is added to or removed from + that list. */ +__rtld_lock_define_initialized_recursive (, _dl_load_write_lock) #ifdef HAVE_AUX_VECTOR diff --git a/elf/ldconfig.c b/elf/ldconfig.c index 1bebb11558..278137f8f9 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -773,7 +773,18 @@ search_dir (const struct dir_entry *entry) { /* In case of symlink, we check if the symlink refers to a directory. */ - if (__builtin_expect (stat64 (real_file_name, &stat_buf), 0)) + char *target_name = real_file_name; + if (opt_chroot) + { + target_name = chroot_canon (opt_chroot, file_name); + if (target_name == NULL) + { + if (strstr (file_name, ".so") == NULL) + error (0, 0, _("Input file %s not found.\n"), file_name); + continue; + } + } + if (__builtin_expect (stat64 (target_name, &stat_buf), 0)) { if (opt_verbose) error (0, errno, _("Cannot stat %s"), file_name); @@ -1183,7 +1194,9 @@ parse_conf_include (const char *config_file, unsigned int lineno, if (do_chroot && opt_chroot) { char *canon = chroot_canon (opt_chroot, pattern); - result = glob64 (canon ?: pattern, 0, NULL, &gl); + if (canon == NULL) + return; + result = glob64 (canon, 0, NULL, &gl); free (canon); } else diff --git a/elf/rtld.c b/elf/rtld.c index e26b2b9e1b..90f3ff126e 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -126,6 +126,7 @@ struct rtld_global _rtld_global = ._dl_stack_flags = PF_R|PF_W|PF_X, #ifdef _LIBC_REENTRANT ._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER, + ._dl_load_write_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER, #endif ._dl_nns = 1, ._dl_ns = diff --git a/hurd/lookup-at.c b/hurd/lookup-at.c index a2d50cb192..7f55527d8b 100644 --- a/hurd/lookup-at.c +++ b/hurd/lookup-at.c @@ -1,5 +1,5 @@ /* Lookup helper function for Hurd implementation of *at functions. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ __file_name_lookup_at (int fd, int at_flags, flags |= (at_flags & AT_SYMLINK_NOFOLLOW) ? O_NOLINK : 0; at_flags &= ~AT_SYMLINK_NOFOLLOW; if (at_flags != 0) - return __hurd_fail (EINVAL); + return (__hurd_fail (EINVAL), MACH_PORT_NULL); if (fd == AT_FDCWD || file_name[0] == '/') return __file_name_lookup (file_name, flags, mode); diff --git a/include/features.h b/include/features.h index 439f087d8e..23b59aa5ec 100644 --- a/include/features.h +++ b/include/features.h @@ -342,7 +342,7 @@ /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 -#define __GLIBC_MINOR__ 11 +#define __GLIBC_MINOR__ 12 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) diff --git a/localedata/ChangeLog b/localedata/ChangeLog index e362e29886..514be38cfb 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2010-05-03 Ulrich Drepper <drepper@redhat.com> + + [BZ #11520] + * locales/de_CH: Define week, first_weekday, and first_workday. + 2010-04-08 Ulrich Drepper <drepper@redhat.com> * locales/ar_AE: Fix typo. diff --git a/localedata/locales/de_CH b/localedata/locales/de_CH index 1ba6585b9a..a4cca885b3 100644 --- a/localedata/locales/de_CH +++ b/localedata/locales/de_CH @@ -84,34 +84,34 @@ END LC_NUMERIC LC_TIME % copy "de_DE" abday "<U0053><U006F><U006E>";"<U004D><U006F><U006E>";/ - "<U0044><U0069><U0065>";"<U004D><U0069><U0074>";/ - "<U0044><U006F><U006E>";"<U0046><U0072><U0065>";/ - "<U0053><U0061><U006D>" + "<U0044><U0069><U0065>";"<U004D><U0069><U0074>";/ + "<U0044><U006F><U006E>";"<U0046><U0072><U0065>";/ + "<U0053><U0061><U006D>" day "<U0053><U006F><U006E><U006E><U0074><U0061><U0067>";/ - "<U004D><U006F><U006E><U0074><U0061><U0067>";/ - "<U0044><U0069><U0065><U006E><U0073><U0074><U0061><U0067>";/ - "<U004D><U0069><U0074><U0074><U0077><U006F><U0063><U0068>";/ - "<U0044><U006F><U006E><U006E><U0065><U0072><U0073><U0074><U0061><U0067>";/ - "<U0046><U0072><U0065><U0069><U0074><U0061><U0067>";/ - "<U0053><U0061><U006D><U0073><U0074><U0061><U0067>" + "<U004D><U006F><U006E><U0074><U0061><U0067>";/ + "<U0044><U0069><U0065><U006E><U0073><U0074><U0061><U0067>";/ + "<U004D><U0069><U0074><U0074><U0077><U006F><U0063><U0068>";/ + "<U0044><U006F><U006E><U006E><U0065><U0072><U0073><U0074><U0061><U0067>";/ + "<U0046><U0072><U0065><U0069><U0074><U0061><U0067>";/ + "<U0053><U0061><U006D><U0073><U0074><U0061><U0067>" abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/ - "<U004D><U00E4><U0072>";"<U0041><U0070><U0072>";/ - "<U004D><U0061><U0069>";"<U004A><U0075><U006E>";/ - "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/ - "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/ - "<U004E><U006F><U0076>";"<U0044><U0065><U007A>" + "<U004D><U00E4><U0072>";"<U0041><U0070><U0072>";/ + "<U004D><U0061><U0069>";"<U004A><U0075><U006E>";/ + "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/ + "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/ + "<U004E><U006F><U0076>";"<U0044><U0065><U007A>" mon "<U004A><U0061><U006E><U0075><U0061><U0072>";/ - "<U0046><U0065><U0062><U0072><U0075><U0061><U0072>";/ - "<U004D><U00E4><U0072><U007A>";/ - "<U0041><U0070><U0072><U0069><U006C>";/ - "<U004D><U0061><U0069>";/ - "<U004A><U0075><U006E><U0069>";/ - "<U004A><U0075><U006C><U0069>";/ - "<U0041><U0075><U0067><U0075><U0073><U0074>";/ - "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/ - "<U004F><U006B><U0074><U006F><U0062><U0065><U0072>";/ - "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/ - "<U0044><U0065><U007A><U0065><U006D><U0062><U0065><U0072>" + "<U0046><U0065><U0062><U0072><U0075><U0061><U0072>";/ + "<U004D><U00E4><U0072><U007A>";/ + "<U0041><U0070><U0072><U0069><U006C>";/ + "<U004D><U0061><U0069>";/ + "<U004A><U0075><U006E><U0069>";/ + "<U004A><U0075><U006C><U0069>";/ + "<U0041><U0075><U0067><U0075><U0073><U0074>";/ + "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/ + "<U004F><U006B><U0074><U006F><U0062><U0065><U0072>";/ + "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/ + "<U0044><U0065><U007A><U0065><U006D><U0062><U0065><U0072>" d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>" d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0059>" t_fmt "<U0025><U0054>" @@ -120,6 +120,10 @@ t_fmt_ampm "" date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/ <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/ <U0025><U005A><U0020><U0025><U0059>" + +week 7;19971130;4 +first_weekday 2 +first_workday 2 END LC_TIME LC_PAPER diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 829750b395..9598528324 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995-2000, 2001, 2002, 2003, 2006 + Copyright (C) 1995-2000, 2001, 2002, 2003, 2006, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -194,7 +194,7 @@ weak_alias (__getmntent_r, getmntent_r) const char *rp = name; \ \ while (*rp != '\0') \ - if (*rp == ' ' || *rp == '\t' || *rp == '\\') \ + if (*rp == ' ' || *rp == '\t' || *rp == '\n' || *rp == '\\') \ break; \ else \ ++rp; \ @@ -202,7 +202,7 @@ weak_alias (__getmntent_r, getmntent_r) if (*rp != '\0') \ { \ /* In the worst case the length of the string can increase to \ - founr times the current length. */ \ + four times the current length. */ \ char *wp; \ \ rp = name; \ diff --git a/po/bg.po b/po/bg.po index b7c79bd1cf..4b3db1ee27 100644 --- a/po/bg.po +++ b/po/bg.po @@ -6,9 +6,9 @@ # msgid "" msgstr "" -"Project-Id-Version: libc 2.10.1\n" +"Project-Id-Version: libc 2.11.1\n" "POT-Creation-Date: 2009-02-06 12:40-0800\n" -"PO-Revision-Date: 2009-06-23 01:27+0300\n" +"PO-Revision-Date: 2010-04-21 22:47+0300\n" "Last-Translator: Roumen Petrov <transl@roumenpetrov.info>\n" "Language-Team: Bulgarian <dict@fsa-bg.org>\n" "MIME-Version: 1.0\n" @@ -1467,7 +1467,7 @@ msgstr "не е намерен файлът по подразбиране за #: locale/programs/charmap.c:258 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" -msgstr "изображението на знаците \"%s\" не е съвместимо с ASCII, локалът не е съобразно ISO C\n" +msgstr "изображението на знаците \"%s\" не е съвместимо с ASCII, езиковата настройка не е съобразно ИСО Си\n" #: locale/programs/charmap.c:337 #, c-format @@ -2185,7 +2185,7 @@ msgstr "в изображението на знаците не са опреде #: locale/programs/ld-ctype.c:3780 #, c-format msgid "%s: transliteration data from locale `%s' not available" -msgstr "%s: не са налични данни за транслитерация от локал \"%s\"" +msgstr "%s: не са налични данни за транслитерация от езикова настройка \"%s\"" #: locale/programs/ld-ctype.c:3881 #, c-format @@ -2363,7 +2363,7 @@ msgstr "боклук в края на числото" #: locale/programs/linereader.c:410 msgid "garbage at end of character code specification" -msgstr "боклук в края при уточняване на кода на знака" +msgstr "боклук в края, при уточняване на кода на знака" #: locale/programs/linereader.c:496 msgid "unterminated symbolic name" @@ -2397,7 +2397,7 @@ msgstr "Системна информация:" #: locale/programs/locale.c:76 msgid "Write names of available locales" -msgstr "Извеждане на имената на наличните локали" +msgstr "Извеждане на имената на наличните езикови настройки" #: locale/programs/locale.c:78 msgid "Write names of available charmaps" @@ -2421,7 +2421,7 @@ msgstr "Извеждане на подробна информация" #: locale/programs/locale.c:87 msgid "Get locale-specific information." -msgstr "Получаване на информация специфична за локала." +msgstr "Получаване на информация характерна за езикова настройка." #: locale/programs/locale.c:90 msgid "" @@ -2434,22 +2434,22 @@ msgstr "" #: locale/programs/locale.c:194 #, c-format msgid "Cannot set LC_CTYPE to default locale" -msgstr "За LC_CTYPE не може да се зададе локал по подразбиране" +msgstr "За LC_CTYPE не може да се зададе езикова настройка по подразбиране" #: locale/programs/locale.c:196 #, c-format msgid "Cannot set LC_MESSAGES to default locale" -msgstr "За LC_MESSAGES не може да се зададе локал по подразбиране" +msgstr "За LC_MESSAGES не може да се зададе езикова настройка по подразбиране" #: locale/programs/locale.c:209 #, c-format msgid "Cannot set LC_COLLATE to default locale" -msgstr "За LC_COLLATE не може да се зададе локал по подразбиране" +msgstr "За LC_COLLATE не може да се зададе езикова настройка по подразбиране" #: locale/programs/locale.c:225 #, c-format msgid "Cannot set LC_ALL to default locale" -msgstr "За LC_ALL не може да се зададе локал по подразбиране" +msgstr "За LC_ALL не може да се зададе езикова настройка по подразбиране" #: locale/programs/locale.c:518 #, c-format @@ -2506,7 +2506,7 @@ msgstr "Да не се добавят нови данни към архива" #: locale/programs/localedef.c:140 msgid "Add locales named by parameters to archive" -msgstr "Добавяне на локалите, указани от параметрите, към архива" +msgstr "Добавяне, към архива, на езиковите настройки указани от параметрите" #: locale/programs/localedef.c:141 msgid "Replace existing archive content" @@ -2514,7 +2514,7 @@ msgstr "Заместване на съществуващото съдържан #: locale/programs/localedef.c:143 msgid "Remove locales named by parameters from archive" -msgstr "Премахване на локалите, указани от параметрите, от архива" +msgstr "Премахване, от архива, на езиковите настройки указани от параметрите" #: locale/programs/localedef.c:144 msgid "List content of archive" @@ -2526,7 +2526,7 @@ msgstr "locale.alias файл, който да се вземе предвид, #: locale/programs/localedef.c:151 msgid "Compile locale specification" -msgstr "Компилира спецификация за локал" +msgstr "Компилира указания за езикова настройка" #: locale/programs/localedef.c:154 msgid "" @@ -2552,7 +2552,7 @@ msgstr "ПАГУБНО: системата не определя \"_POSIX2_LOCAL #: locale/programs/localedef.c:599 locale/programs/localedef.c:619 #, c-format msgid "cannot open locale definition file `%s'" -msgstr "не е възможно да се отвори файл \"%s\" с определения за локал" +msgstr "не е възможно да се отвори файл \"%s\" с определения за езикова настройка" #: locale/programs/localedef.c:285 #, c-format @@ -2569,18 +2569,18 @@ msgid "" msgstr "" "Системна директория за изображения на знаци: %s\n" " изображения на набор: %s\n" -" път за локал : %s\n" +" път за език. настр. : %s\n" "%s" #: locale/programs/localedef.c:567 #, c-format msgid "circular dependencies between locale definitions" -msgstr "циклични зависимости между определения за локал" +msgstr "циклични зависимости между определения за езикова настройка" #: locale/programs/localedef.c:573 #, c-format msgid "cannot add already read locale `%s' a second time" -msgstr "не може да се добави, повторно, вече прочетения локал\"%s\"" +msgstr "не може да се добави, повторно, вече прочетена езикова настройка\"%s\"" #: locale/programs/locarchive.c:88 locale/programs/locarchive.c:261 #, c-format @@ -2606,7 +2606,7 @@ msgstr "не може да се изобрази(в паметта) заглав #: locale/programs/locarchive.c:156 #, c-format msgid "failed to create new locale archive" -msgstr "пропадна създаването на нов архив за локал" +msgstr "пропадна създаването на нов архив за езикова настройка" #: locale/programs/locarchive.c:168 #, c-format @@ -2616,7 +2616,7 @@ msgstr "не може да се променят правата за достъ #: locale/programs/locarchive.c:255 #, c-format msgid "cannot map locale archive file" -msgstr "не може да се изобрази(в паметта) архивния файл за локал" +msgstr "не може да се изобрази(в паметта) архивния файл за езикова настройка" #: locale/programs/locarchive.c:331 #, c-format @@ -2626,12 +2626,12 @@ msgstr "не е възможно да се заключи новия архив" #: locale/programs/locarchive.c:396 #, c-format msgid "cannot extend locale archive file" -msgstr "не е възможно да се разшири архивния файл за локал" +msgstr "не е възможно да се разшири архивния файл за езикова настройка" #: locale/programs/locarchive.c:405 #, c-format msgid "cannot change mode of resized locale archive" -msgstr "не може да се променят правата за достъп на преоразмерения архивен файл за локал" +msgstr "не може да се променят правата за достъп на преоразмерения архивен файл за езикова настройка" #: locale/programs/locarchive.c:413 #, c-format @@ -2641,17 +2641,17 @@ msgstr "не може да се преименува новият архив" #: locale/programs/locarchive.c:466 #, c-format msgid "cannot open locale archive \"%s\"" -msgstr "не може да се отвори архива за локал \"%s\"" +msgstr "не може да се отвори архива за езикова настройка \"%s\"" #: locale/programs/locarchive.c:471 #, c-format msgid "cannot stat locale archive \"%s\"" -msgstr "не може да се определят атрибутите на архива за локал \"%s\"" +msgstr "не може да се определят атрибутите на архива за езикова настройка \"%s\"" #: locale/programs/locarchive.c:490 #, c-format msgid "cannot lock locale archive \"%s\"" -msgstr "не може да се заключи архива за локал \"%s\"" +msgstr "не може да се заключи архива за езикова настройка \"%s\"" #: locale/programs/locarchive.c:513 #, c-format @@ -2661,19 +2661,19 @@ msgstr "не може да се прочете заглавието на арх #: locale/programs/locarchive.c:573 #, c-format msgid "locale '%s' already exists" -msgstr "локалът \"%s\" вече съществува" +msgstr "езиковата настройка \"%s\" вече съществува" #: locale/programs/locarchive.c:804 locale/programs/locarchive.c:819 #: locale/programs/locarchive.c:831 locale/programs/locarchive.c:843 #: locale/programs/locfile.c:344 #, c-format msgid "cannot add to locale archive" -msgstr "не може да се добави към архива за локал" +msgstr "не може да се добави към архива за езикова настройка" #: locale/programs/locarchive.c:998 #, c-format msgid "locale alias file `%s' not found" -msgstr "не е намерен файлът с псевдоними за локал \"%s\"" +msgstr "не е намерен файлът с псевдоними за езикови настройки \"%s\"" #: locale/programs/locarchive.c:1142 #, c-format @@ -2698,7 +2698,7 @@ msgstr "не може да се отвори директорията \"%s\": %s #: locale/programs/locarchive.c:1233 #, c-format msgid "incomplete set of locale files in \"%s\"" -msgstr "непълно множество от файлове за локал в \"%s\"" +msgstr "непълно множество от файлове за езикови настройки в \"%s\"" #: locale/programs/locarchive.c:1297 #, c-format @@ -2708,7 +2708,7 @@ msgstr "не може да се прочетат всички файлове в #: locale/programs/locarchive.c:1367 #, c-format msgid "locale \"%s\" not in archive" -msgstr "локалът \"%s\" не е в архива" +msgstr "езиковата настройка \"%s\" не е в архива" #: locale/programs/locfile.c:132 #, c-format @@ -2717,7 +2717,7 @@ msgstr "аргументът на \"%s\" трябва да бъде единич #: locale/programs/locfile.c:252 msgid "syntax error: not inside a locale definition section" -msgstr "синтактична грешка: извън секция за определяне на локал" +msgstr "синтактична грешка: извън секция за определяне на езикова настройка" #: locale/programs/locfile.c:626 #, c-format @@ -2740,7 +2740,7 @@ msgstr "очаква се аргумент от тип низ за 'copy'" #: locale/programs/locfile.c:786 msgid "locale name should consist only of portable characters" -msgstr "името на локал трябва да съдържа само преносими знаци" +msgstr "името на езикова настройка трябва да съдържа само преносими знаци" #: locale/programs/locfile.c:805 msgid "no other keyword shall be specified when `copy' is used" @@ -6356,7 +6356,7 @@ msgid "" "%s: usage is %s [ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" "\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n" msgstr "" -"%s: употребата е %s [ --version ] [ -v ] [ -l локалновреме ] [ -p posix_правило ] \\\n" +"%s: употребата е %s [ --version ] [ -v ] [ -l местновреме ] [ -p posix_правило ] \\\n" "\t[ -d директория ] [ -L високоснисекунди ] [ -y типнагодина ] [ именафайл ... ]\n" #: timezone/zic.c:494 @@ -6627,7 +6627,7 @@ msgstr "вътрешна грешка - addtype е извикан с непра #: timezone/zic.c:2264 msgid "too many local time types" -msgstr "твърде много типове за локално време" +msgstr "твърде много типове за местно време" #: timezone/zic.c:2268 msgid "UTC offset out of range" diff --git a/po/vi.po b/po/vi.po index 1f85f7917c..ed69b1ec36 100644 --- a/po/vi.po +++ b/po/vi.po @@ -1,14 +1,14 @@ # Vietnamese translation for LibC. -# Copyright © 2009 Free Software Foundation, Inc. +# Copyright © 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the glibc package. -# Clytie Siddall <clytie@riverland.net.au>, 2008-2009. +# Clytie Siddall <clytie@riverland.net.au>, 2008-2010. # msgid "" msgstr "" -"Project-Id-Version: libc 2.10.1\n" +"Project-Id-Version: libc 2.11.1\n" "Report-Msgid-Bugs-To: http://www.gnu.org/software/libc/bugs.html\n" "POT-Creation-Date: 2009-02-06 12:40-0800\n" -"PO-Revision-Date: 2009-09-19 18:50+0930\n" +"PO-Revision-Date: 2010-04-22 23:22+0930\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" "MIME-Version: 1.0\n" @@ -20,7 +20,7 @@ msgstr "" #: argp/argp-help.c:228 #, c-format msgid "%.*s: ARGP_HELP_FMT parameter requires a value" -msgstr "%.*s: tham số « ARGP_HELP_FMT » cần thiết giá trị" +msgstr "%.*s: tham số « ARGP_HELP_FMT » yêu cầu một giá trị" #: argp/argp-help.c:238 #, c-format diff --git a/stdio-common/tst-fmemopen.c b/stdio-common/tst-fmemopen.c index 3c06c45c78..8aa047e3c1 100644 --- a/stdio-common/tst-fmemopen.c +++ b/stdio-common/tst-fmemopen.c @@ -8,11 +8,10 @@ #include <sys/stat.h> #include <sys/types.h> -#define TEST_FILE "test-1" - int -main (void) +main (int argc, char **argv) { + const char *test_file; const char blah[] = "BLAH"; FILE *fp; char *mmap_data; @@ -20,8 +19,14 @@ main (void) struct stat fs; const char *cp; + /* Construct the test file name based on ARGV[0], which will be + an absolute file name in the build directory. Don't touch the + source directory, which might be read-only. */ + if (argc != 1 || asprintf (&test_file, "%s.test", argv[0]) < 0) + exit (99); + /* setup the physical file, and use it */ - if ((fp = fopen (TEST_FILE, "w+")) == NULL) + if ((fp = fopen (test_file, "w+")) == NULL) exit (1); if (fwrite (blah, 1, strlen (blah), fp) != strlen (blah)) exit (2); @@ -56,7 +61,7 @@ main (void) fclose (fp); /* Now, mmap the file into a buffer, and do that too */ - if ((fd = open (TEST_FILE, O_RDONLY)) == -1) + if ((fd = open (test_file, O_RDONLY)) == -1) exit (3); if (fstat (fd, &fs) == -1) exit (4); @@ -105,7 +110,8 @@ main (void) munmap (mmap_data, fs.st_size); - unlink (TEST_FILE); + unlink (test_file); + free (test_file); return 0; } diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index a14e8af92f..fcc943bce3 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -416,6 +416,10 @@ struct rtld_global the loaded object might as well require a call to this function. At this time it is not anymore a problem to modify the tables. */ __rtld_lock_define_recursive (EXTERN, _dl_load_lock) + /* This lock is used to keep __dl_iterate_phdr from inspecting the + list of loaded objects while an object is added to or removed + from that list. */ + __rtld_lock_define_recursive (EXTERN, _dl_load_write_lock) /* Incremented whenever something may have been added to dl_loaded. */ EXTERN unsigned long long _dl_load_adds; diff --git a/sysdeps/mach/hurd/ttyname_r.c b/sysdeps/mach/hurd/ttyname_r.c index 7313b9afcb..8896252246 100644 --- a/sysdeps/mach/hurd/ttyname_r.c +++ b/sysdeps/mach/hurd/ttyname_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 95, 96, 98 Free Software Foundation, Inc. +/* Copyright (C) 1994,1995,1996,1998,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,13 +34,13 @@ __ttyname_r (int fd, char *buf, size_t buflen) nodename[0] = '\0'; if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename))) - return __hurd_dfail (fd, err), -1; + return __hurd_dfail (fd, err), errno; len = strlen (nodename) + 1; if (len > buflen) { errno = EINVAL; - return -1; + return errno; } memcpy (buf, nodename, len); diff --git a/sysdeps/unix/bsd/ptsname.c b/sysdeps/unix/bsd/ptsname.c index fd446a4b66..6063201b0f 100644 --- a/sysdeps/unix/bsd/ptsname.c +++ b/sysdeps/unix/bsd/ptsname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,2002 Free Software Foundation, Inc. +/* Copyright (C) 1998,2002,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -44,6 +44,7 @@ int __ptsname_r (int fd, char *buf, size_t buflen) { int save_errno = errno; + int err; struct stat st; if (buf == NULL) @@ -62,8 +63,12 @@ __ptsname_r (int fd, char *buf, size_t buflen) return ERANGE; } - if (__ttyname_r (fd, buf, buflen) != 0) - return errno; + err = __ttyname_r (fd, buf, buflen); + if (err != 0) + { + __set_errno (err); + return errno; + } buf[sizeof (_PATH_DEV) - 1] = 't'; diff --git a/sysdeps/unix/getlogin.c b/sysdeps/unix/getlogin.c index b0ad97cfa5..1fb70733fb 100644 --- a/sysdeps/unix/getlogin.c +++ b/sysdeps/unix/getlogin.c @@ -38,6 +38,7 @@ getlogin (void) { char tty_pathname[2 + 2 * NAME_MAX]; char *real_tty_path = tty_pathname; + int err; char *result = NULL; struct utmp *ut, line, buffer; @@ -50,8 +51,12 @@ getlogin (void) thing to do. Note that ttyname(open("/dev/tty")) on those systems returns /dev/tty, so that is not a possible solution for getlogin(). */ - if (__ttyname_r (0, real_tty_path, sizeof (tty_pathname)) != 0) - return NULL; + err = __ttyname_r (0, real_tty_path, sizeof (tty_pathname)); + if (err != 0) + { + __set_errno (err); + return NULL; + } real_tty_path += 5; /* Remove "/dev/". */ diff --git a/version.h b/version.h index db60a0c44e..02cc48871a 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ /* This file just defines the current version number of libc. */ -#define RELEASE "development" -#define VERSION "2.11.90" +#define RELEASE "stable" +#define VERSION "2.12" |