[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7631 - in /fsf/trunk/libc: ./ iconvdata/ nptl/ nscd/ resolv/ sysdeps/posix/ sysdeps/x86_64/bits/ wcsmbs/ wctype/
- To: commits@xxxxxxxxxx
- Subject: [commits] r7631 - in /fsf/trunk/libc: ./ iconvdata/ nptl/ nscd/ resolv/ sysdeps/posix/ sysdeps/x86_64/bits/ wcsmbs/ wctype/
- From: eglibc@xxxxxxxxxx
- Date: Tue, 30 Dec 2008 08:02:40 -0000
Author: eglibc
Date: Tue Dec 30 00:02:40 2008
New Revision: 7631
Log:
Import glibc-mainline for 2008-12-30
Added:
fsf/trunk/libc/sysdeps/x86_64/bits/select.h
fsf/trunk/libc/wctype/bug-wctypeh.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/iconvdata/Makefile
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nscd/nscd_getai.c
fsf/trunk/libc/nscd/nscd_gethst_r.c
fsf/trunk/libc/resolv/res_init.c
fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
fsf/trunk/libc/wcsmbs/wchar.h
fsf/trunk/libc/wctype/Makefile
fsf/trunk/libc/wctype/wctype.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Dec 30 00:02:40 2008
@@ -1,3 +1,28 @@
+2008-12-29 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * iconvdata/Makefile (iconv-rules): Use LC_ALL=C when running awk
+ script.
+
+2008-12-29 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): When the
+ gethostbyname4_r function call succeeded, just leave the loop.
+
+ [BZ #9694]
+ * wcsmbs/wchar.h: Move undefs for local __need_* constants to the
+ very end.
+ * wctype/wctype.h: Get wint_t definition directly from <stddef.h>.
+ * wctype/Makefile (tests): Add bug-wctypeh.
+ * wctype/bug-wctypeh.c: New file.
+
+ * nscd/nscd_gethst_r.c (nscd_gethst_r): Don't use nscd if
+ LOCALDOMAIN is defined.
+ * nscd/nscd_getai.c (__nscd_getai): Likewise.
+
+ * sysdeps/x86_64/bits/select.h: New file.
+
+ * resolv/res_init.c (__res_vinit): Count all servers in statp->nscount.
+
2008-12-21 Bruno Haible <bruno@xxxxxxxxx>
[BZ #9677]
Modified: fsf/trunk/libc/iconvdata/Makefile
==============================================================================
--- fsf/trunk/libc/iconvdata/Makefile (original)
+++ fsf/trunk/libc/iconvdata/Makefile Tue Dec 30 00:02:40 2008
@@ -286,6 +286,7 @@
{ echo $(filter-out lib%, $(modules)); \
echo 8bit $(gen-8bit-modules); \
echo 8bit-gap $(gen-8bit-gap-modules); } | \
+ LC_ALL=C \
$(AWK) 'NR == 1 { \
for (i = 1; i <= NF; i++) { \
printf "%s-routines := %s\n", $$i, tolower($$i); \
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Tue Dec 30 00:02:40 2008
@@ -1,3 +1,10 @@
+2008-12-09 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
+ loop body instead of ; to avoid gcc warnings.
+ (pthread_cleanup_pop_restore_np): Likewise.
+ Patch by Caolán McNamara <caolanm@xxxxxxxxxx>.
+
2008-12-09 Jakub Jelinek <jakub@xxxxxxxxxx>
* pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
Modified: fsf/trunk/libc/nscd/nscd_getai.c
==============================================================================
--- fsf/trunk/libc/nscd/nscd_getai.c (original)
+++ fsf/trunk/libc/nscd/nscd_getai.c Tue Dec 30 00:02:40 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2004.
@@ -36,10 +36,24 @@
/* We use the mapping from nscd_gethst. */
libc_locked_map_ptr (extern, __hst_map_handle) attribute_hidden;
+/* Defined in nscd_gethst_r.c. */
+extern int __nss_have_localdomain attribute_hidden;
+
int
__nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
{
+ if (__builtin_expect (__nss_have_localdomain >= 0, 0))
+ {
+ if (__nss_have_localdomain == 0)
+ __nss_have_localdomain = getenv ("LOCALDOMAIN") != NULL ? 1 : -1;
+ if (__nss_have_localdomain > 0)
+ {
+ __nss_not_use_nscd_hosts = 1;
+ return -1;
+ }
+ }
+
size_t keylen = strlen (key) + 1;
int gc_cycle;
int nretries = 0;
Modified: fsf/trunk/libc/nscd/nscd_gethst_r.c
==============================================================================
--- fsf/trunk/libc/nscd/nscd_gethst_r.c (original)
+++ fsf/trunk/libc/nscd/nscd_gethst_r.c Tue Dec 30 00:02:40 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -97,12 +97,25 @@
}
+int __nss_have_localdomain attribute_hidden;
+
static int
internal_function
nscd_gethst_r (const char *key, size_t keylen, request_type type,
struct hostent *resultbuf, char *buffer, size_t buflen,
struct hostent **result, int *h_errnop)
{
+ if (__builtin_expect (__nss_have_localdomain >= 0, 0))
+ {
+ if (__nss_have_localdomain == 0)
+ __nss_have_localdomain = getenv ("LOCALDOMAIN") != NULL ? 1 : -1;
+ if (__nss_have_localdomain > 0)
+ {
+ __nss_not_use_nscd_hosts = 1;
+ return -1;
+ }
+ }
+
int gc_cycle;
int nretries = 0;
Modified: fsf/trunk/libc/resolv/res_init.c
==============================================================================
--- fsf/trunk/libc/resolv/res_init.c (original)
+++ fsf/trunk/libc/resolv/res_init.c Tue Dec 30 00:02:40 2008
@@ -420,7 +420,7 @@
continue;
}
}
- statp->nscount = nserv;
+ statp->nscount = nservall;
#ifdef _LIBC
if (nservall - nserv > 0) {
statp->_u._ext.nscount6 = nservall - nserv;
Modified: fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/getaddrinfo.c (original)
+++ fsf/trunk/libc/sysdeps/posix/getaddrinfo.c Tue Dec 30 00:02:40 2008
@@ -714,6 +714,8 @@
status = DL_CALL_FCT (fct4, (name, pat, tmpbuf,
tmpbuflen, &rc, &herrno,
NULL));
+ if (status == NSS_STATUS_SUCCESS)
+ break;
if (status != NSS_STATUS_TRYAGAIN
|| rc != ERANGE || herrno != NETDB_INTERNAL)
{
Added: fsf/trunk/libc/sysdeps/x86_64/bits/select.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/bits/select.h (added)
+++ fsf/trunk/libc/sysdeps/x86_64/bits/select.h Tue Dec 30 00:02:40 2008
@@ -1,0 +1,86 @@
+/* Copyright (C) 1997, 1998, 1999, 2001, 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. */
+
+#ifndef _SYS_SELECT_H
+# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+
+#if defined __GNUC__ && __GNUC__ >= 2
+
+# if __WORDSIZE == 64
+# define __FD_ZERO_STOS "stosq"
+# define __FD_SET_BTS "btsq"
+# define __FD_CLR_BTR "btrq"
+# define __FD_ISSET_BT "btq"
+# else
+# define __FD_ZERO_STOS "stosl"
+# define __FD_SET_BTS "btsl"
+# define __FD_CLR_BTR "btrl"
+# define __FD_ISSET_BT "btl"
+# endif
+
+# define __FD_ZERO(fdsp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \
+ : "=c" (__d0), "=D" (__d1) \
+ : "a" (0), "0" (sizeof (fd_set) \
+ / sizeof (__fd_mask)), \
+ "1" (&__FDS_BITS (fdsp)[0]) \
+ : "memory"); \
+ } while (0)
+
+# define __FD_SET(fd, fdsp) \
+ __asm__ __volatile__ (__FD_SET_BTS " %1,%0" \
+ : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) \
+ : "r" (((int) (fd)) % __NFDBITS) \
+ : "cc","memory")
+# define __FD_CLR(fd, fdsp) \
+ __asm__ __volatile__ (__FD_CLR_BTR " %1,%0" \
+ : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) \
+ : "r" (((int) (fd)) % __NFDBITS) \
+ : "cc","memory")
+# define __FD_ISSET(fd, fdsp) \
+ (__extension__ \
+ ({register char __result; \
+ __asm__ __volatile__ (__FD_ISSET_BT " %1,%2 ; setcb %b0" \
+ : "=q" (__result) \
+ : "r" (((int) (fd)) % __NFDBITS), \
+ "m" (__FDS_BITS (fdsp)[__FDELT (fd)]) \
+ : "cc"); \
+ __result; }))
+
+#else /* ! GNU CC */
+
+/* We don't use `memset' because this would require a prototype and
+ the array isn't too big. */
+# define __FD_ZERO(set) \
+ do { \
+ unsigned int __i; \
+ fd_set *__arr = (set); \
+ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
+ __FDS_BITS (__arr)[__i] = 0; \
+ } while (0)
+# define __FD_SET(d, set) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))
+# define __FD_CLR(d, set) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))
+# define __FD_ISSET(d, set) (__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d))
+
+#endif /* GNU CC */
Modified: fsf/trunk/libc/wcsmbs/wchar.h
==============================================================================
--- fsf/trunk/libc/wcsmbs/wchar.h (original)
+++ fsf/trunk/libc/wcsmbs/wchar.h Tue Dec 30 00:02:40 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2004,2005,2006,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
@@ -839,9 +839,9 @@
#endif /* _WCHAR_H defined */
+#endif /* wchar.h */
+
/* Undefined all __need_* constants in case we are included to get those
constants but the whole file was already read. */
#undef __need_mbstate_t
#undef __need_wint_t
-
-#endif /* wchar.h */
Modified: fsf/trunk/libc/wctype/Makefile
==============================================================================
--- fsf/trunk/libc/wctype/Makefile (original)
+++ fsf/trunk/libc/wctype/Makefile Tue Dec 30 00:02:40 2008
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 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
@@ -26,6 +26,6 @@
routines := wcfuncs wctype iswctype wctrans towctrans \
wcfuncs_l wctype_l iswctype_l wctrans_l towctrans_l
-tests := test_wctype test_wcfuncs
+tests := test_wctype test_wcfuncs bug-wctypeh
include ../Rules
Added: fsf/trunk/libc/wctype/bug-wctypeh.c
==============================================================================
--- fsf/trunk/libc/wctype/bug-wctypeh.c (added)
+++ fsf/trunk/libc/wctype/bug-wctypeh.c Tue Dec 30 00:02:40 2008
@@ -1,0 +1,10 @@
+#include <wchar.h>
+#include <wctype.h>
+#include <stddef.h>
+ptrdiff_t i;
+
+int
+main (void)
+{
+ return 0;
+}
Modified: fsf/trunk/libc/wctype/wctype.h
==============================================================================
--- fsf/trunk/libc/wctype/wctype.h (original)
+++ fsf/trunk/libc/wctype/wctype.h Tue Dec 30 00:02:40 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2002, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2002, 2005, 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
@@ -29,9 +29,9 @@
#ifndef __need_iswxxx
# define _WCTYPE_H 1
-/* Get wint_t from <wchar.h>. */
+/* Get wint_t from <stddef.h>. */
# define __need_wint_t
-# include <wchar.h>
+# include <stddef.h>
/* Constant expression of type `wint_t' whose value does not correspond
to any member of the extended character set. */