about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-07-16 09:53:45 +0000
committerJakub Jelinek <jakub@redhat.com>2008-07-16 09:53:45 +0000
commitc83494a925f4b4b716f9ba3abcb5e695d3e2a8a9 (patch)
treed47fb1fa79c201c98e2fa7bb8dfeb6ed582beef0
parent1cb6b555a864f401c8a2ba75814e982b66a62971 (diff)
downloadglibc-c83494a925f4b4b716f9ba3abcb5e695d3e2a8a9.tar.gz
glibc-c83494a925f4b4b716f9ba3abcb5e695d3e2a8a9.tar.xz
glibc-c83494a925f4b4b716f9ba3abcb5e695d3e2a8a9.zip
Updated to fedora-glibc-20080716T0944 cvs/fedora-glibc-2_8_90-9
-rw-r--r--ChangeLog52
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in10
-rw-r--r--libio/iosetvbuf.c2
-rw-r--r--localedata/ChangeLog11
-rw-r--r--localedata/charmaps/UTF-82
-rw-r--r--localedata/locales/iso14651_t1_common270
-rw-r--r--malloc/hooks.c4
-rw-r--r--nscd/connections.c112
-rw-r--r--resolv/res_query.c26
-rw-r--r--resolv/res_send.c1
-rw-r--r--stdio-common/Makefile8
-rw-r--r--stdio-common/tst-setvbuf1.c19
-rw-r--r--stdio-common/tst-setvbuf1.expect2
-rw-r--r--stdio-common/vfprintf.c11
-rw-r--r--sysdeps/mach/hurd/bits/fcntl.h2
-rw-r--r--sysdeps/mach/hurd/open.c13
-rw-r--r--sysdeps/mach/hurd/openat.c14
-rw-r--r--time/mktime.c6
19 files changed, 522 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index 7edad286e1..2f4f0f3a6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,55 @@
+2008-07-15  Ulrich Drepper  <drepper@redhat.com>
+
+	* stdio-common/vfprintf.c (_IO_helper_overflow): In case _IO_sputn
+	doesn't manage to write anything, fail.
+
+	* malloc/hooks.c (__malloc_check_init): Remove printf.
+
+2008-07-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+	* sysdeps/mach/hurd/bits/fcntl.h: Include <sys/types.h>.
+
+2008-07-12  Ulrich Drepper  <drepper@redhat.com>
+
+	* nscd/connections.c (main_loop_poll): Fix handling of read errors
+	from inotify.
+	(main_loop_epoll): Likewise.
+
+2008-07-09  Ulrich Drepper  <drepper@redhat.com>
+
+	* resolv/res_send.c: Remove unnecessary res_pquery prototype.
+
+	* resolv/res_query.c (__libc_res_nquery): Issue debug message only
+	if DEBUG is defined.
+
+	* resolv/res_query.c (__libc_res_nquery): Align buffer for T_AAAA
+	query.  Adjust buffer size computation for padding.
+
+2008-07-08  Ulrich Drepper  <drepper@redhat.com>
+
+	* stdio-common/Makefile: Add rules to build and run tst-setvbuf1.
+	* stdio-common/tst-setvbuf1.c: New file.
+	* stdio-common/tst-setvbuf1.expect: New file.
+
+	[BZ #6719]
+	* libio/iosetvbuf.c (_IO_setvbuf): Correctly clear buffering flags
+	when selecting fully-buffered stream.
+	Patch by Wang Xin <wxinee@gmail.com>.
+
+2008-07-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+	* sysdeps/mach/hurd/open.c: Include <stdio.h>.
+	(__open_2): New function.
+	(__open64_2): New alias to __open_2.
+	* sysdeps/mach/hurd/openat.c: Include <stdio.h>.
+	(__openat_2): New function.
+	(__openat64_2): New alias to __openat_2.
+
+2008-07-06  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #6723]
+	* time/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
+
 2008-07-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
 	* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Define MSG_NOSIGNAL.
diff --git a/fedora/branch.mk b/fedora/branch.mk
index ab0528fd81..1b14d1b8f4 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
 glibc-base := HEAD
 DIST_BRANCH := devel
 COLLECTION := dist-f8
-fedora-sync-date := 2008-07-03 12:03 UTC
-fedora-sync-tag := fedora-glibc-20080703T1203
+fedora-sync-date := 2008-07-16 09:44 UTC
+fedora-sync-tag := fedora-glibc-20080716T0944
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index f84d8f49ad..1c13bea7a8 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -19,7 +19,7 @@
 Summary: The GNU libc libraries
 Name: glibc
 Version: @glibcversion@
-Release: 8
+Release: 9
 # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
 # Things that are linked directly into dynamically linked programs
 # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@@ -976,6 +976,14 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-9
+- update from trunk
+  - fix unbuffered vfprintf if writing to the stream fails (#455360)
+  - remove useless "malloc: using debugging hooks" message (#455355)
+  - nscd fixes
+  - fix resolver alignment issues (#454500)
+  - fix setvbuf (BZ#6719)
+
 * Thu Jul  3 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-8
 - update from trunk
   - watch even resolv.conf in nscd using inotify
diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c
index 7580230eb6..a92eaebf85 100644
--- a/libio/iosetvbuf.c
+++ b/libio/iosetvbuf.c
@@ -45,7 +45,7 @@ _IO_setvbuf (fp, buf, mode, size)
   switch (mode)
     {
     case _IOFBF:
-      fp->_IO_file_flags &= ~_IO_LINE_BUF|_IO_UNBUFFERED;
+      fp->_IO_file_flags &= ~(_IO_LINE_BUF|_IO_UNBUFFERED);
       if (buf == NULL)
 	{
 	  if (fp->_IO_buf_base == NULL)
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index a7291beec9..7c3f41d21b 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,14 @@
+2008-07-11  Ulrich Drepper  <drepper@redhat.com>
+
+	* locales/iso14651_t1_common: Add Kannada collation support.
+	Patch by Pravin Satpute <psatpute@redhat.com>.
+	
+2008-07-08  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #6713]
+	* charmaps/UTF-8: Fix U1DBA entry representation.
+	Patch by Colin Watson.
+
 2008-06-27  Ulrich Drepper  <drepper@redhat.com>
 
 	* tst-strptime.c (do_test): Add test of %EY.
diff --git a/localedata/charmaps/UTF-8 b/localedata/charmaps/UTF-8
index d4375bbab4..34b2f7ee8f 100644
--- a/localedata/charmaps/UTF-8
+++ b/localedata/charmaps/UTF-8
@@ -5961,7 +5961,7 @@ CHARMAP
 <U1DB7>     /xe1/xb6/xb7 MODIFIER LETTER SMALL UPSILON
 <U1DB8>     /xe1/xb6/xb8 MODIFIER LETTER SMALL CAPITAL U
 <U1DB9>     /xe1/xb6/xb9 MODIFIER LETTER SMALL V WITH HOOK
-<U1DBA>     /xe1/xb6/xbe MODIFIER LETTER SMALL TURNED V
+<U1DBA>     /xe1/xb6/xba MODIFIER LETTER SMALL TURNED V
 <U1DBB>     /xe1/xb6/xbb MODIFIER LETTER SMALL Z
 <U1DBC>     /xe1/xb6/xbc MODIFIER LETTER SMALL Z WITH RETROFLEX HOOK
 <U1DBD>     /xe1/xb6/xbd MODIFIER LETTER SMALL Z WITH CURL
diff --git a/localedata/locales/iso14651_t1_common b/localedata/locales/iso14651_t1_common
index 35c0af0b21..cbca3eb863 100644
--- a/localedata/locales/iso14651_t1_common
+++ b/localedata/locales/iso14651_t1_common
@@ -64,6 +64,7 @@ script <DEVANAGARI>
 script <GUJARATI>
 script <TELUGU>
 script <GURUMUKHI>
+script <KANNADA>
 
 # Déclaration des symboles internes / Declaration of internal symbols
 #
@@ -816,6 +817,99 @@ collating-symbol <tippi>
 collating-symbol <adak>
 collating-symbol <pa-halant>
 
+#<KANNADA>
+#
+# kvd- denotes vowel modifier
+# km-  denotes matras
+# kvw- denotes vowels
+# <KNKT> denotes Nukta characters
+
+collating-element <kn-sign_ii> from "<U0CBF><U0CD5>"
+collating-element <kn-sign_e> from "<U0CC6><U0CD5>"
+collating-element <kn-sign_o> from "<U0CC6><U0CC2><U0CD5>"
+collating-element <kn-sign1_o> from "<U0CCA><U0CD5>"
+collating-element <kn-sign_shorto> from "<U0CC6><U0CC2>"
+collating-element <kn-sign_ai> from "<U0CC6><U0CD6>"
+
+# defning symbols
+
+collating-symbol <sign-jihvamuliya>
+collating-symbol <sign-upadhmaniya>
+collating-symbol <KNKT>
+collating-symbol <kvw-a>
+collating-symbol <kvw-aa>
+collating-symbol <kvw-i>
+collating-symbol <kvw-ii>
+collating-symbol <kvw-u>
+collating-symbol <kvw-uu>
+collating-symbol <kvw-vocalicr>
+collating-symbol <kvw-vocalicrr>
+collating-symbol <kvw-vocalicl>
+collating-symbol <kvw-vocalicll>
+collating-symbol <kvw-shorte>
+collating-symbol <kvw-e>
+collating-symbol <kvw-ai>
+collating-symbol <kvw-shorto>
+collating-symbol <kvw-o>
+collating-symbol <kvw-au>
+collating-symbol <k-ka>
+collating-symbol <k-kha>
+collating-symbol <k-ga>
+collating-symbol <k-gha>
+collating-symbol <k-nga>
+collating-symbol <k-ca>
+collating-symbol <k-cha>
+collating-symbol <k-ja>
+collating-symbol <k-jha>
+collating-symbol <k-nya>
+collating-symbol <k-tta>
+collating-symbol <k-ttha>
+collating-symbol <k-dda>
+collating-symbol <k-ddha>
+collating-symbol <k-nna>
+collating-symbol <k-ta>
+collating-symbol <k-tha>
+collating-symbol <k-da>
+collating-symbol <k-dha>
+collating-symbol <k-na>
+collating-symbol <k-pa>
+collating-symbol <k-pha>
+collating-symbol <k-ba>
+collating-symbol <k-bha>
+collating-symbol <k-ma>
+collating-symbol <k-ya>
+collating-symbol <k-ra>
+collating-symbol <k-rra>
+collating-symbol <k-la>
+collating-symbol <k-va>
+collating-symbol <k-sha>
+collating-symbol <k-ssa>
+collating-symbol <k-sa>
+collating-symbol <k-ha>
+collating-symbol <k-lla>
+collating-symbol <k-fa>
+collating-symbol <k-avagrah>
+collating-symbol <km-aa>
+collating-symbol <km-i>
+collating-symbol <km-ii>
+collating-symbol <km-u>
+collating-symbol <km-uu>
+collating-symbol <km-vocalicr>
+collating-symbol <km-vocalicrr>
+collating-symbol <km-vocalicl>
+collating-symbol <km-vocalicll>
+collating-symbol <km-shorte>
+collating-symbol <km-e>
+collating-symbol <km-ai>
+collating-symbol <km-shorto>
+collating-symbol <km-o>
+collating-symbol <km-au>
+collating-symbol <kvd-anuswara>
+collating-symbol <kvd-visarg>
+collating-symbol <k-halant>
+collating-symbol <k-lenght_mark>
+collating-symbol <k-ai_lenght_mark>
+
 # Ordre des symboles internes / Order of internal symbols
 #
 # SYMB. N°
@@ -1557,6 +1651,88 @@ collating-symbol <pa-halant>
 <tippi>
 <pa-halant>
 
+#
+# <KANNADA>
+#
+# collation weights in order
+
+<KNKT>
+<sign-jihvamuliya>
+<sign-upadhmaniya>
+<kvw-a>
+<kvw-aa>
+<kvw-i>
+<kvw-ii>
+<kvw-u>
+<kvw-uu>
+<kvw-vocalicr>
+<kvw-vocalicrr>
+<kvw-vocalicl>
+<kvw-vocalicll>
+<kvw-shorte>
+<kvw-e>
+<kvw-ai>
+<kvw-shorto>
+<kvw-o>
+<kvw-au>
+<k-ka>
+<k-kha>
+<k-ga>
+<k-gha>
+<k-nga>
+<k-ca>
+<k-cha>
+<k-ja>
+<k-jha>
+<k-nya>
+<k-tta>
+<k-ttha>
+<k-dda>
+<k-ddha>
+<k-nna>
+<k-ta>
+<k-tha>
+<k-da>
+<k-dha>
+<k-na>
+<k-pa>
+<k-pha>
+<k-ba>
+<k-bha>
+<k-ma>
+<k-ya>
+<k-ra>
+<k-rra>
+<k-la>
+<k-va>
+<k-sha>
+<k-ssa>
+<k-sa>
+<k-ha>
+<k-lla>
+<k-fa>
+<k-avagrah>
+<km-aa>
+<km-i>
+<km-ii>
+<km-u>
+<km-uu>
+<km-vocalicr>
+<km-vocalicrr>
+<km-vocalicl>
+<km-vocalicll>
+<km-shorte>
+<km-e>
+<km-ai>
+<km-shorto>
+<km-o>
+<km-au>
+<kvd-anuswara>
+<kvd-visarg>
+<k-halant>
+<k-lenght_mark>
+<k-ai_lenght_mark>
+
 order_start <SPECIAL>;forward;backward;forward;forward,position
 #
 # Tout caractère non précisément défini sera considéré comme caractère spécial
@@ -3698,6 +3874,100 @@ order_start  <GURUMUKHI>;forward;forward;forward;forward,position
 <U0A3C> IGNORE;<PNKT>;<MIN>;IGNORE
 <U0A71> IGNORE;<adak>;<MIN>;IGNORE
 
+order_start  <KANNADA>;forward;forward;forward;forward,position
+<U0CE6> <0>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CE7> <1>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CE8> <2>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CE9> <3>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CEA> <4>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CEB> <5>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CEC> <6>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CED> <7>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CEE> <8>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CEF> <9>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0CF1> <sign-jihvamuliya>;<BAS>;<MIN>;IGNORE
+<U0CF2> <sign-upadhmaniya>;<BAS>;<MIN>;IGNORE
+<U0C85> <kvw-a>;<BAS>;<MIN>;IGNORE
+<U0C86> <kvw-aa>;<BAS>;<MIN>;IGNORE
+<U0C87> <kvw-i>;<BAS>;<MIN>;IGNORE
+<U0C88> <kvw-ii>;<BAS>;<MIN>;IGNORE
+<U0C89> <kvw-u>;<BAS>;<MIN>;IGNORE
+<U0C8A> <kvw-uu>;<BAS>;<MIN>;IGNORE
+<U0C8B> <kvw-vocalicr>;<BAS>;<MIN>;IGNORE
+<U0CE0> <kvw-vocalicrr>;<BAS>;<MIN>;IGNORE
+<U0C8C> <kvw-vocalicl>;<BAS>;<MIN>;IGNORE
+<U0CE1> <kvw-vocalicll>;<BAS>;<MIN>;IGNORE
+<U0C8E> <kvw-shorte>;<BAS>;<MIN>;IGNORE
+<U0C8F> <kvw-e>;<BAS>;<MIN>;IGNORE
+<U0C90> <kvw-ai>;<BAS>;<MIN>;IGNORE
+<U0C92> <kvw-shorto>;<BAS>;<MIN>;IGNORE
+<U0C93> <kvw-o>;<BAS>;<MIN>;IGNORE
+<U0C94> <kvw-au>;<BAS>;<MIN>;IGNORE
+<U0C95> <k-ka>;<BAS>;<MIN>;IGNORE
+<U0C96> <k-kha>;<BAS>;<MIN>;IGNORE
+<U0C97> <k-ga>;<BAS>;<MIN>;IGNORE
+<U0C98> <k-gha>;<BAS>;<MIN>;IGNORE
+<U0C99> <k-nga>;<BAS>;<MIN>;IGNORE
+<U0C9A> <k-ca>;<BAS>;<MIN>;IGNORE
+<U0C9B> <k-cha>;<BAS>;<MIN>;IGNORE
+<U0C9C> <k-ja>;<BAS>;<MIN>;IGNORE
+<U0C9D> <k-jha>;<BAS>;<MIN>;IGNORE
+<U0C9E> <k-nya>;<BAS>;<MIN>;IGNORE
+<U0C9F> <k-tta>;<BAS>;<MIN>;IGNORE
+<U0CA0> <k-ttha>;<BAS>;<MIN>;IGNORE
+<U0CA1> <k-dda>;<BAS>;<MIN>;IGNORE
+<U0CA2> <k-ddha>;<BAS>;<MIN>;IGNORE
+<U0CA3> <k-nna>;<BAS>;<MIN>;IGNORE
+<U0CA4> <k-ta>;<BAS>;<MIN>;IGNORE
+<U0CA5> <k-tha>;<BAS>;<MIN>;IGNORE
+<U0CA6> <k-da>;<BAS>;<MIN>;IGNORE
+<U0CA7> <k-dha>;<BAS>;<MIN>;IGNORE
+<U0CA8> <k-na>;<BAS>;<MIN>;IGNORE
+<U0CAA> <k-pa>;<BAS>;<MIN>;IGNORE
+<U0CAB> <k-pha>;<BAS>;<MIN>;IGNORE
+<U0CAC> <k-ba>;<BAS>;<MIN>;IGNORE
+<U0CAD> <k-bha>;<BAS>;<MIN>;IGNORE
+<U0CAE> <k-ma>;<BAS>;<MIN>;IGNORE
+<U0CAF> <k-ya>;<BAS>;<MIN>;IGNORE
+<U0CB0> <k-ra>;<BAS>;<MIN>;IGNORE
+<U0CB1> <k-rra>;<BAS>;<MIN>;IGNORE
+<U0CB2> <k-la>;<BAS>;<MIN>;IGNORE
+<U0CB5> <k-va>;<BAS>;<MIN>;IGNORE
+<U0CB6> <k-sha>;<BAS>;<MIN>;IGNORE
+<U0CB7> <k-ssa>;<BAS>;<MIN>;IGNORE
+<U0CB8> <k-sa>;<BAS>;<MIN>;IGNORE
+<U0CB9> <k-ha>;<BAS>;<MIN>;IGNORE
+<U0CB3> <k-lla>;<BAS>;<MIN>;IGNORE
+<U0CDE> <k-fa>;<BAS>;<MIN>;IGNORE
+<U0CBD> <k-avagrah>;<BAS>;<MIN>;IGNORE
+<U0CBE> <km-aa>;<BAS>;<MIN>;IGNORE
+<U0CBF> <km-i>;<BAS>;<MIN>;IGNORE
+<U0CC0> <km-ii>;<BAS>;<MIN>;IGNORE
+<kn-sign_ii> <km-ii>;<BAS>;<MIN>;IGNORE
+<U0CC1> <km-u>;<BAS>;<MIN>;IGNORE
+<U0CC2> <km-uu>;<BAS>;<MIN>;IGNORE
+<U0CC3> <km-vocalicr>;<BAS>;<MIN>;IGNORE
+<U0CC4> <km-vocalicrr>;<BAS>;<MIN>;IGNORE
+<U0CE2> <km-vocalicl>;<BAS>;<MIN>;IGNORE
+<U0CE3> <km-vocalicll>;<BAS>;<MIN>;IGNORE
+<U0CC6> <km-shorte>;<BAS>;<MIN>;IGNORE
+<U0CC7> <km-e>;<BAS>;<MIN>;IGNORE
+<kn-sign_e> <km-e>;<BAS>;<MIN>;IGNORE
+<U0CC8> <km-ai>;<BAS>;<MIN>;IGNORE
+<kn-sign_ai> <km-ai>;<BAS>;<MIN>;IGNORE
+<U0CCA> <km-shorto>;<BAS>;<MIN>;IGNORE
+<kn-sign_shorto> <km-shorto>;<BAS>;<MIN>;IGNORE
+<U0CCB> <km-o>;<BAS>;<MIN>;IGNORE
+<kn-sign_o> <km-o>;<BAS>;<MIN>;IGNORE
+<kn-sign1_o> <km-o>;<BAS>;<MIN>;IGNORE
+<U0CCC> <km-au>;<BAS>;<MIN>;IGNORE
+<U0C82> <kvd-anuswara>;<BAS>;<MIN>;IGNORE
+<U0C83> <kvd-visarg>;<BAS>;<MIN>;IGNORE
+<U0CCD> <k-halant>;<BAS>;<MIN>;IGNORE
+<U0CD5> <k-lenght_mark>;<BAS>;<MIN>;IGNORE
+<U0CD6> <k-ai_lenght_mark>;<BAS>;<MIN>;IGNORE
+<U0CBC> IGNORE;<KNKT>;<MIN>;IGNORE
+
 order_end
 
 END LC_COLLATE
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 1e01b73afd..c88937665c 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -1,5 +1,5 @@
 /* Malloc implementation for multiple threads without lock contention.
-   Copyright (C) 2001-2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2006, 2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
 
@@ -96,8 +96,6 @@ __malloc_check_init()
   __free_hook = free_check;
   __realloc_hook = realloc_check;
   __memalign_hook = memalign_check;
-  if(check_action & 1)
-    malloc_printerr (5, "malloc: using debugging hooks", NULL);
 }
 
 /* A simple, standard set of debugging hooks.  Overhead is `only' one
diff --git a/nscd/connections.c b/nscd/connections.c
index 0afc95a227..e4d32b27de 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1806,42 +1806,64 @@ main_loop_poll (void)
 
 	  size_t first = 1;
 #ifdef HAVE_INOTIFY
-	  if (conns[1].fd == inotify_fd)
+	  if (inotify_fd != -1 && conns[1].fd == inotify_fd)
 	    {
 	      if (conns[1].revents != 0)
 		{
-		  bool done[lastdb] = { false, };
+		  bool to_clear[lastdb] = { false, };
 		  union
 		  {
 		    struct inotify_event i;
 		    char buf[100];
 		  } inev;
 
-		  while (TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
-						   sizeof (inev)))
-			 >= (ssize_t) sizeof (struct inotify_event))
+		  while (1)
 		    {
+		      ssize_t nb = TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
+							     sizeof (inev)));
+		      if (nb < (ssize_t) sizeof (struct inotify_event))
+			{
+			  if (nb == -1)
+			    {
+			      /* Something went wrong when reading the inotify
+				 data.  Better disable inotify.  */
+			      conns[1].fd = -1;
+			      firstfree = 1;
+			      if (nused == 2)
+				nused = 1;
+			      close (inotify_fd);
+			      inotify_fd = -1;
+			      dbg_log (_("disabled inotify after read error"));
+			    }
+			  break;
+			}
+
 		      /* Check which of the files changed.  */
 		      for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
-			if (!done[dbcnt]
-			    && (inev.i.wd == dbs[dbcnt].inotify_descr
-				|| (dbcnt == hstdb
-				    && inev.i.wd == resolv_conf_descr)))
+			if (inev.i.wd == dbs[dbcnt].inotify_descr)
 			  {
-			    if (dbcnt == hstdb
-				&& inev.i.wd == resolv_conf_descr)
-			      res_init ();
-
-			    pthread_mutex_lock (&dbs[dbcnt].prune_lock);
-			    dbs[dbcnt].clear_cache = 1;
-			    pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
-			    pthread_cond_signal (&dbs[dbcnt].prune_cond);
-
-			    done[dbcnt] = true;
-			    break;
+			    to_clear[dbcnt] = true;
+			    goto next;
 			  }
+
+		      if (inev.i.wd == resolv_conf_descr)
+			{
+			  res_init ();
+			  to_clear[hstdb] = true;
+			}
+		    next:;
 		    }
 
+		  /* Actually perform the cache clearing.  */
+		  for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
+		    if (to_clear[dbcnt])
+		      {
+			pthread_mutex_lock (&dbs[dbcnt].prune_lock);
+			dbs[dbcnt].clear_cache = 1;
+			pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
+			pthread_cond_signal (&dbs[dbcnt].prune_cond);
+		      }
+
 		  --n;
 		}
 
@@ -1966,27 +1988,57 @@ main_loop_epoll (int efd)
 #ifdef HAVE_INOTIFY
 	else if (revs[cnt].data.fd == inotify_fd)
 	  {
+	    bool to_clear[lastdb] = { false, };
 	    union
 	    {
 	      struct inotify_event i;
 	      char buf[100];
 	    } inev;
 
-	    while (TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
-					     sizeof (inev)))
-		   >= (ssize_t) sizeof (struct inotify_event))
+	    while (1)
 	      {
+		ssize_t nb = TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
+				 		 sizeof (inev)));
+		if (nb < (ssize_t) sizeof (struct inotify_event))
+		  {
+		    if (nb == -1)
+		      {
+			/* Something went wrong when reading the inotify
+			   data.  Better disable inotify.  */
+			(void) epoll_ctl (efd, EPOLL_CTL_DEL, inotify_fd,
+					  NULL);
+			close (inotify_fd);
+			inotify_fd = -1;
+			dbg_log (_("disabled inotify after read error"));
+		      }
+		    break;
+		  }
+
 		/* Check which of the files changed.  */
 		for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
 		  if (inev.i.wd == dbs[dbcnt].inotify_descr)
 		    {
-		      pthread_mutex_trylock (&dbs[dbcnt].prune_lock);
-		      dbs[dbcnt].clear_cache = 1;
-		      pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
-		      pthread_cond_signal (&dbs[dbcnt].prune_cond);
-		      break;
+		      to_clear[dbcnt] = true;
+		      goto next;
 		    }
+
+		if (inev.i.wd == resolv_conf_descr)
+		  {
+		    res_init ();
+		    to_clear[hstdb] = true;
+		  }
+	      next:;
 	      }
+
+	    /* Actually perform the cache clearing.  */
+	    for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
+	      if (to_clear[dbcnt])
+		{
+		  pthread_mutex_lock (&dbs[dbcnt].prune_lock);
+		  dbs[dbcnt].clear_cache = 1;
+		  pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
+		  pthread_cond_signal (&dbs[dbcnt].prune_cond);
+		}
 	  }
 #endif
 	else
@@ -2010,8 +2062,10 @@ main_loop_epoll (int efd)
       /*  Now look for descriptors for accepted connections which have
 	  no reply in too long of a time.  */
       time_t laststart = now - ACCEPT_TIMEOUT;
+      assert (starttime[sock] == 0);
+      assert (inotify_fd == -1 || starttime[inotify_fd] == 0);
       for (int cnt = highest; cnt > STDERR_FILENO; --cnt)
-	if (cnt != sock && starttime[cnt] != 0 && starttime[cnt] < laststart)
+	if (starttime[cnt] != 0 && starttime[cnt] < laststart)
 	  {
 	    /* We are waiting for this one for too long.  Close it.  */
 	    (void) epoll_ctl (efd, EPOLL_CTL_DEL, cnt, NULL);
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 3d2f2fe3a9..b2b45acde7 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -146,18 +146,34 @@ __libc_res_nquery(res_state statp,
 	      {
 		if ((oflags & RES_F_EDNS0ERR) == 0
 		    && (statp->options & RES_USE_EDNS0) != 0)
-		  n = __res_nopt(statp, n, query1, bufsize, anslen / 2);
+		  {
+		    n = __res_nopt(statp, n, query1, bufsize, anslen / 2);
+		    if (n < 0)
+		      goto unspec_nomem;
+		  }
 
 		nquery1 = n;
-		query2 = buf + nquery1;
+		/* Align the buffer.  */
+		int npad = ((nquery1 + __alignof__ (HEADER) - 1)
+			    & ~(__alignof__ (HEADER) - 1)) - nquery1;
+		if (n > bufsize - npad)
+		  {
+		    n = -1;
+		    goto unspec_nomem;
+		  }
+		int nused = n + npad;
+		query2 = buf + nused;
 		n = res_nmkquery(statp, QUERY, name, class, T_AAAA, NULL, 0,
-				 NULL, query2, bufsize - n);
+				 NULL, query2, bufsize - nused);
 		if (n > 0
 		    && (oflags & RES_F_EDNS0ERR) == 0
 		    && (statp->options & RES_USE_EDNS0) != 0)
-		  n = __res_nopt(statp, n, query2, bufsize - n, anslen / 2);
+		  n = __res_nopt(statp, n, query2, bufsize - nused - n,
+				 anslen / 2);
 		nquery2 = n;
 	      }
+
+	  unspec_nomem:;
 	  }
 	else
 	  {
@@ -188,8 +204,10 @@ __libc_res_nquery(res_state statp,
 		if ((statp->options & RES_USE_EDNS0) != 0
 		    && ((oflags ^ statp->_flags) & RES_F_EDNS0ERR) != 0) {
 			statp->_flags |= RES_F_EDNS0ERR;
+#ifdef DEBUG
 			if (statp->options & RES_DEBUG)
 				printf(";; res_nquery: retry without EDNS0\n");
+#endif
                         goto again;
 		}
 #ifdef DEBUG
diff --git a/resolv/res_send.c b/resolv/res_send.c
index e78ff967aa..dec3ac7a3f 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -194,7 +194,6 @@ static int		sock_eq(struct sockaddr_in6 *, struct sockaddr_in6 *);
 /* Reachover. */
 
 static void convaddr4to6(struct sockaddr_in6 *sa);
-void res_pquery(const res_state, const u_char *, int, FILE *);
 
 /* Public. */
 
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index f8ae6f25d9..944270dafe 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-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
@@ -58,7 +58,7 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
 	 tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
 	 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
 	 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
-	 scanf16 scanf17
+	 scanf16 scanf17 tst-setvbuf1
 
 test-srcs = tst-unbputc tst-printf
 
@@ -130,3 +130,7 @@ bug15-ENV = LOCPATH=$(common-objpfx)localedata
 ifneq (,$(filter %REENTRANT, $(defines)))
 CPPFLAGS += -D_IO_MTSAFE_IO
 endif
+
+$(objpfx)tst-setvbuf1.out: tst-setvbuf1.expect $(objpfx)tst-setvbuf1
+	$(built-program-cmd) > $@ 2>&1
+	cmp tst-setvbuf1.expect $@
diff --git a/stdio-common/tst-setvbuf1.c b/stdio-common/tst-setvbuf1.c
new file mode 100644
index 0000000000..22410939c9
--- /dev/null
+++ b/stdio-common/tst-setvbuf1.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  if (setvbuf (stderr, NULL, _IOFBF, BUFSIZ) != 0)
+    {
+      puts ("Set full buffer error.");
+      return 1;
+    }
+
+  fprintf (stderr, "Output #1 <stderr>.\n");
+  printf ("Output #2 <stdout>.\n");
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/stdio-common/tst-setvbuf1.expect b/stdio-common/tst-setvbuf1.expect
new file mode 100644
index 0000000000..281c18ca1e
--- /dev/null
+++ b/stdio-common/tst-setvbuf1.expect
@@ -0,0 +1,2 @@
+Output #2 <stdout>.
+Output #1 <stderr>.
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index ca6343c37f..714c76c3d4 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007
+/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -2080,6 +2080,11 @@ _IO_helper_overflow (_IO_FILE *s, int c)
     {
       _IO_size_t written = _IO_sputn (target, s->_wide_data->_IO_write_base,
 				      used);
+      if (written == 0 || written == WEOF)
+	return WEOF;
+      __wmemmove (s->_wide_data->_IO_write_base,
+		  s->_wide_data->_IO_write_base + written,
+		  used - written);
       s->_wide_data->_IO_write_ptr -= written;
     }
 #else
@@ -2087,6 +2092,10 @@ _IO_helper_overflow (_IO_FILE *s, int c)
   if (used)
     {
       _IO_size_t written = _IO_sputn (target, s->_IO_write_base, used);
+      if (written == 0 || written == EOF)
+	return EOF;
+      memmove (s->_IO_write_base, s->_IO_write_base + written,
+	       used - written);
       s->_IO_write_ptr -= written;
     }
 #endif
diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
index 2f890c1b65..b4147cee51 100644
--- a/sysdeps/mach/hurd/bits/fcntl.h
+++ b/sysdeps/mach/hurd/bits/fcntl.h
@@ -22,6 +22,8 @@
 # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
 #endif
 
+#include <sys/types.h>
+
 /* File access modes.  These are understood by io servers; they can be
    passed in `dir_lookup', and are returned by `io_get_openmodes'.
    Consequently they can be passed to `open', `hurd_file_name_lookup', and
diff --git a/sysdeps/mach/hurd/open.c b/sysdeps/mach/hurd/open.c
index bdfed5e311..519789f22f 100644
--- a/sysdeps/mach/hurd/open.c
+++ b/sysdeps/mach/hurd/open.c
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <hurd.h>
 #include <hurd/fd.h>
 
@@ -52,8 +53,20 @@ weak_alias (__libc_open, __open)
 libc_hidden_weak (__open)
 weak_alias (__libc_open, open)
 
+int
+__open_2 (file, oflag)
+     const char *file;
+     int oflag;
+{
+  if (oflag & O_CREAT)
+    __fortify_fail ("invalid open call: O_CREAT without mode");
+
+  return __open (file, oflag);
+}
+
 /* open64 is just the same as open for us.  */
 weak_alias (__libc_open, __libc_open64)
 weak_alias (__libc_open, __open64)
 libc_hidden_weak (_open64)
 weak_alias (__libc_open, open64)
+strong_alias (__open_2, __open64_2)
diff --git a/sysdeps/mach/hurd/openat.c b/sysdeps/mach/hurd/openat.c
index 1faf857e16..f0a3404cd8 100644
--- a/sysdeps/mach/hurd/openat.c
+++ b/sysdeps/mach/hurd/openat.c
@@ -21,6 +21,7 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stddef.h>
+#include <stdio.h>
 #include <sys/stat.h>
 #include <hurd.h>
 #include <hurd/fd.h>
@@ -56,7 +57,20 @@ __openat (fd, file, oflag)
 libc_hidden_def (__openat)
 weak_alias (__openat, openat)
 
+int
+__openat_2 (fd, file, oflag)
+     int fd;
+     const char *file;
+     int oflag;
+{
+  if (oflag & O_CREAT)
+    __fortify_fail ("invalid openat call: O_CREAT without mode");
+
+  return __openat (fd, file, oflag);
+}
+
 /* openat64 is just the same as openat for us.  */
 weak_alias (__openat, __openat64)
 libc_hidden_weak (__openat64)
 weak_alias (__openat, openat64)
+strong_alias (__openat_2, __openat64_2)
diff --git a/time/mktime.c b/time/mktime.c
index e299375a16..e47d69615a 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -1,5 +1,5 @@
 /* Convert a `struct tm' to a time_t value.
-   Copyright (C) 1993-1999, 2002-2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1993-1999, 2002-2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert <eggert@twinsun.com>.
 
@@ -293,7 +293,9 @@ __mktime_internal (struct tm *tp,
   int mday = tp->tm_mday;
   int mon = tp->tm_mon;
   int year_requested = tp->tm_year;
-  int isdst = tp->tm_isdst;
+  /* Normalize the value.  */
+  int isdst = ((tp->tm_isdst >> (8 * sizeof (tp->tm_isdst) - 1))
+	       | (tp->tm_isdst != 0));
 
   /* 1 if the previous probe was DST.  */
   int dst2;