[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7423 - in /fsf/trunk/libc: ./ elf/ sysdeps/mach/ sysdeps/posix/ sysdeps/unix/sysv/linux/ia64/ sysdeps/unix/sysv/linux/sparc...
- To: commits@xxxxxxxxxx
- Subject: [commits] r7423 - in /fsf/trunk/libc: ./ elf/ sysdeps/mach/ sysdeps/posix/ sysdeps/unix/sysv/linux/ia64/ sysdeps/unix/sysv/linux/sparc...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 27 Nov 2008 08:01:56 -0000
Author: eglibc
Date: Thu Nov 27 00:01:56 2008
New Revision: 7423
Log:
Import glibc-mainline for 2008-11-27
Added:
fsf/trunk/libc/sysdeps/mach/strerror_l.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/configure
fsf/trunk/libc/elf/elf.h
fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/wordexp.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Nov 27 00:01:56 2008
@@ -1,3 +1,20 @@
+2008-11-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/posix/getaddrinfo.c (getaddrinfo): Only restrict search
+ to IPv4 or IPv6 if an interface has been found.
+
+2008-11-26 Roland McGrath <roland@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/alpha/ipc_priv.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/powerpc/ipc_priv.h: ... here.
+
+ * sysdeps/unix/sysv/linux/alpha/wordexp.c: Renamed to ...
+ * sysdeps/unix/sysv/linux/ia64/wordexp.c: ... here.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c: Change #include.
+
+ * elf/elf.h (NT_386_IOPERM): New macro.
+ (NT_PPC_VSX): New macro.
+
2008-11-25 Roland McGrath <roland@xxxxxxxxxx>
* sysdeps/alpha, sysdeps/unix/bsd/osf/alpha,
@@ -6,6 +23,10 @@
sysdeps/mach/alpha, sysdeps/mach/hurd/alpha:
Subdirectories moved to ports repository.
* configure.in (base_machine): Remove alpha case.
+
+2008-11-25 Thomas Schwinge <tschwinge@xxxxxxx>
+
+ * sysdeps/mach/strerror_l.c: New file.
2008-11-13 Ryan S. Arnold <rsa@xxxxxxxxxx>
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Thu Nov 27 00:01:56 2008
@@ -2504,7 +2504,6 @@
# base_machine, we don't change it.
test -n "$base_machine" || case "$machine" in
a29k | am29000) base_machine=a29k machine=a29k ;;
-alpha*) base_machine=alpha machine=alpha/$machine ;;
c3[012]) base_machine=cx0 machine=cx0/c30 ;;
c4[04]) base_machine=cx0 machine=cx0/c40 ;;
i[34567]86) base_machine=i386 machine=i386/$machine ;;
Modified: fsf/trunk/libc/elf/elf.h
==============================================================================
--- fsf/trunk/libc/elf/elf.h (original)
+++ fsf/trunk/libc/elf/elf.h Thu Nov 27 00:01:56 2008
@@ -608,7 +608,9 @@
#define NT_PRXFPREG 0x46e62b7f /* Contains copy of user_fxsr_struct */
#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */
#define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */
+#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
+#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
/* Legal values for the note segment descriptor types for object files. */
Added: fsf/trunk/libc/sysdeps/mach/strerror_l.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/strerror_l.c (added)
+++ fsf/trunk/libc/sysdeps/mach/strerror_l.c Thu Nov 27 00:01:56 2008
@@ -1,0 +1,102 @@
+/* strerror_l - Get errno description string in given locale. Mach version.
+ Copyright (C) 2007, 2008 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <libintl.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mach/error.h>
+#include <errorlib.h>
+#include <sys/param.h>
+
+
+static __thread char *last_value;
+
+
+static const char *
+translate (const char *str, locale_t loc)
+{
+ locale_t oldloc = __uselocale (loc);
+ const char *res = _(str);
+ __uselocale (oldloc);
+ return res;
+}
+
+
+/* Return a string describing the errno code in ERRNUM. */
+char *
+strerror_l (int errnum, locale_t loc)
+{
+ int system;
+ int sub;
+ int code;
+ const struct error_system *es;
+ extern void __mach_error_map_compat (int *);
+
+ __mach_error_map_compat (&errnum);
+
+ system = err_get_system (errnum);
+ sub = err_get_sub (errnum);
+ code = err_get_code (errnum);
+
+ if (system > err_max_system || ! __mach_error_systems[system].bad_sub)
+ {
+ free (last_value);
+ if (__asprintf (&last_value, "%s%X",
+ translate ("Error in unknown error system: ", loc),
+ errnum) == -1)
+ last_value = NULL;
+
+ return last_value;
+ }
+
+ es = &__mach_error_systems[system];
+
+ if (sub >= es->max_sub)
+ return (char *) translate (es->bad_sub, loc);
+
+ if (code >= es->subsystem[sub].max_code)
+ {
+ free (last_value);
+ if (__asprintf (&last_value, "%s%s %d",
+ translate ("Unknown error ", loc),
+ translate (es->subsystem[sub].subsys_name, loc),
+ errnum) == -1)
+ last_value = NULL;
+
+ return last_value;
+ }
+
+ return (char *) translate (es->subsystem[sub].codes[code], loc);
+}
+
+
+#ifdef _LIBC
+# ifdef _LIBC_REENTRANT
+/* This is called when a thread is exiting to free the last_value string. */
+static void __attribute__ ((section ("__libc_thread_freeres_fn")))
+strerror_thread_freeres (void)
+{
+ free (last_value);
+}
+text_set_element (__libc_thread_subfreeres, strerror_thread_freeres);
+text_set_element (__libc_subfreeres, strerror_thread_freeres);
+# endif
+#endif
Modified: fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/getaddrinfo.c (original)
+++ fsf/trunk/libc/sysdeps/posix/getaddrinfo.c Thu Nov 27 00:01:56 2008
@@ -2108,7 +2108,7 @@
{
/* If we haven't seen both IPv4 and IPv6 interfaces we can
narrow down the search. */
- if (! seen_ipv4 || ! seen_ipv6)
+ if ((! seen_ipv4 || ! seen_ipv6) && (seen_ipv4 || seen_ipv6))
{
local_hints = *hints;
local_hints.ai_family = seen_ipv4 ? PF_INET : PF_INET6;
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/wordexp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/wordexp.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/wordexp.c Thu Nov 27 00:01:56 2008
@@ -1,1 +1,60 @@
-#include <sysdeps/unix/sysv/linux/alpha/wordexp.c>
+/* Copyright (C) 2001, 2004, 2005 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <shlib-compat.h>
+
+/* For Linux/Alpha we have to make the wordexp symbols versioned. */
+#define wordexp(words, pwordexp, flags) \
+ __new_wordexp (words, pwordexp, flags)
+
+#include <posix/wordexp.c>
+
+versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2);
+
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2)
+/* The old, incorrect wordexp_t definition. */
+typedef struct
+ {
+ int we_wordc; /* Count of words matched. */
+ char **we_wordv; /* List of expanded words. */
+ int we_offs; /* Slots to reserve in `we_wordv'. */
+ } old_wordexp_t;
+
+
+int
+attribute_compat_text_section
+__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags)
+{
+ wordexp_t we;
+ int result;
+
+ we.we_wordc = pwordexp->we_wordc;
+ we.we_wordv = pwordexp->we_wordv;
+ we.we_offs = pwordexp->we_offs;
+
+ result = __new_wordexp (words, &we, flags);
+
+ pwordexp->we_wordc = we.we_wordc;
+ pwordexp->we_wordv = we.we_wordv;
+ pwordexp->we_offs = we.we_offs;
+
+ return result;
+}
+compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1);
+#endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c Thu Nov 27 00:01:56 2008
@@ -1,1 +1,1 @@
-#include <sysdeps/unix/sysv/linux/alpha/wordexp.c>
+#include <sysdeps/unix/sysv/linux/ia64/wordexp.c>