[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r16783 - in /fsf/trunk/libc: ./ nscd/ wcsmbs/



Author: eglibc
Date: Sun Jan 22 00:02:09 2012
New Revision: 16783

Log:
Import glibc-mainline for 2012-01-22

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/nscd/aicache.c
    fsf/trunk/libc/nscd/grpcache.c
    fsf/trunk/libc/nscd/hstcache.c
    fsf/trunk/libc/nscd/initgrcache.c
    fsf/trunk/libc/nscd/pwdcache.c
    fsf/trunk/libc/nscd/servicescache.c
    fsf/trunk/libc/wcsmbs/uchar.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Jan 22 00:02:09 2012
@@ -1,3 +1,17 @@
+2012-01-21  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* wcsmbs/uchar.h: Test __STDC_VERSION__.
+
+2012-01-20  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nscd/aicache.c (addhstaiX): Do not cache negative results of
+	transient errors.
+	* nscd/grpcache.c (cache_addgr): Likewise.
+	* nscd/hstcache.c (cache_addhst): Likewise.
+	* nscd/initgrcache.c (addinitgroupsX): Likewise.
+	* nscd/pwdcache.c (cache_addpw): Likewise.
+	* nscd/servicescache.c (cache_addserv): Likewise.
+
 2012-01-16  Ulrich Drepper  <drepper@xxxxxxxxx>
 
 	* malloc/malloc.c: Various cleanups.

Modified: fsf/trunk/libc/nscd/aicache.c
==============================================================================
--- fsf/trunk/libc/nscd/aicache.c (original)
+++ fsf/trunk/libc/nscd/aicache.c Sun Jan 22 00:02:09 2012
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2004.
 
@@ -514,8 +514,9 @@
       if (fd != -1)
 	TEMP_FAILURE_RETRY (send (fd, &notfound, total, MSG_NOSIGNAL));
 
-      /* If we cannot permanently store the result, so be it.  */
-      if (__builtin_expect (db->negtimeout == 0, 0))
+      /* If we have a transient error or cannot permanently store the
+	 result, so be it.  */
+      if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
 	{
 	  /* Mark the old entry as obsolete.  */
 	  if (dh != NULL)

Modified: fsf/trunk/libc/nscd/grpcache.c
==============================================================================
--- fsf/trunk/libc/nscd/grpcache.c (original)
+++ fsf/trunk/libc/nscd/grpcache.c Sun Jan 22 00:02:09 2012
@@ -1,5 +1,5 @@
 /* Cache handling for group lookup.
-   Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
 
@@ -120,8 +120,9 @@
 	  else
 	    written = total;
 
-	  /* If we cannot permanently store the result, so be it.  */
-	  if (db->negtimeout == 0)
+	  /* If we have a transient error or cannot permanently store
+	     the result, so be it.  */
+	  if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
 	    {
 	      /* Mark the old entry as obsolete.  */
 	      if (dh != NULL)

Modified: fsf/trunk/libc/nscd/hstcache.c
==============================================================================
--- fsf/trunk/libc/nscd/hstcache.c (original)
+++ fsf/trunk/libc/nscd/hstcache.c Sun Jan 22 00:02:09 2012
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
 
@@ -141,8 +141,9 @@
 					MSG_NOSIGNAL)) != total)
 	    all_written = false;
 
-	  /* If we cannot permanently store the result, so be it.  */
-	  if (__builtin_expect (db->negtimeout == 0, 0))
+	  /* If we have a transient error or cannot permanently store
+	     the result, so be it.  */
+	  if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
 	    {
 	      /* Mark the old entry as obsolete.  */
 	      if (dh != NULL)

Modified: fsf/trunk/libc/nscd/initgrcache.c
==============================================================================
--- fsf/trunk/libc/nscd/initgrcache.c (original)
+++ fsf/trunk/libc/nscd/initgrcache.c Sun Jan 22 00:02:09 2012
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2004.
 
@@ -202,8 +202,9 @@
 	    written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
 						MSG_NOSIGNAL));
 
-	  /* If we cannot permanently store the result, so be it.  */
-	  if (__builtin_expect (db->negtimeout == 0, 0))
+	  /* If we have a transient error or cannot permanently store
+	     the result, so be it.  */
+	  if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
 	    {
 	      /* Mark the old entry as obsolete.  */
 	      if (dh != NULL)

Modified: fsf/trunk/libc/nscd/pwdcache.c
==============================================================================
--- fsf/trunk/libc/nscd/pwdcache.c (original)
+++ fsf/trunk/libc/nscd/pwdcache.c Sun Jan 22 00:02:09 2012
@@ -1,5 +1,5 @@
 /* Cache handling for passwd lookup.
-   Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
 
@@ -124,8 +124,9 @@
 	    written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
 						MSG_NOSIGNAL));
 
-	  /* If we cannot permanently store the result, so be it.  */
-	  if (__builtin_expect (db->negtimeout == 0, 0))
+	  /* If we have a transient error or cannot permanently store
+	     the result, so be it.  */
+	  if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
 	    {
 	      /* Mark the old entry as obsolete.  */
 	      if (dh != NULL)

Modified: fsf/trunk/libc/nscd/servicescache.c
==============================================================================
--- fsf/trunk/libc/nscd/servicescache.c (original)
+++ fsf/trunk/libc/nscd/servicescache.c Sun Jan 22 00:02:09 2012
@@ -1,5 +1,5 @@
 /* Cache handling for services lookup.
-   Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxxx>, 2007.
 
@@ -108,8 +108,9 @@
 	    written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
 						MSG_NOSIGNAL));
 
-	  /* If we cannot permanently store the result, so be it.  */
-	  if (__builtin_expect (db->negtimeout == 0, 0))
+	  /* If we have a transient error or cannot permanently store
+	     the result, so be it.  */
+	  if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
 	    {
 	      /* Mark the old entry as obsolete.  */
 	      if (dh != NULL)

Modified: fsf/trunk/libc/wcsmbs/uchar.h
==============================================================================
--- fsf/trunk/libc/wcsmbs/uchar.h (original)
+++ fsf/trunk/libc/wcsmbs/uchar.h Sun Jan 22 00:02:09 2012
@@ -44,7 +44,7 @@
 /* Define the 16-bit and 32-bit character types.  Use the information
    provided by the compiler.  */
 # if !defined __CHAR16_TYPE__ || !defined __CHAR32_TYPE__
-#  if defined __STDC__ && __STDC__ < 201000L
+#  if defined __STDC_VERSION__ && __STDC_VERSION__ < 201000L
 #   error "<uchar.h> requires ISO C11 mode"
 #  else
 #   error "definitions of __CHAR16_TYPE__ and/or __CHAR32_TYPE__ missing"

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits