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

[commits] r14364 - in /fsf/glibc-2_14-branch/libc: ChangeLog iconvdata/gb18030.c sysdeps/posix/getaddrinfo.c



Author: eglibc
Date: Wed Jun 29 00:04:06 2011
New Revision: 14364

Log:
Import glibc-2.14 for 2011-06-29

Modified:
    fsf/glibc-2_14-branch/libc/ChangeLog
    fsf/glibc-2_14-branch/libc/iconvdata/gb18030.c
    fsf/glibc-2_14-branch/libc/sysdeps/posix/getaddrinfo.c

Modified: fsf/glibc-2_14-branch/libc/ChangeLog
==============================================================================
--- fsf/glibc-2_14-branch/libc/ChangeLog (original)
+++ fsf/glibc-2_14-branch/libc/ChangeLog Wed Jun 29 00:04:06 2011
@@ -1,3 +1,18 @@
+2011-06-27  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* iconvdata/gb18030.c (BODY for TO_LOOP): Fix encoding of non-BMP
+	two-byte characters.
+
+2011-06-22  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix last change.
+
+2011-06-21  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12885]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): When looking up only IPv6
+	addresses using gethostbyname4_r ignore IPv4 addresses.
+
 2011-06-15  Ulrich Drepper  <drepper@xxxxxxxxx>
 
 	* resolv/res_send.c (__libc_res_nsend): Fix typos in last patch.  We

Modified: fsf/glibc-2_14-branch/libc/iconvdata/gb18030.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/iconvdata/gb18030.c (original)
+++ fsf/glibc-2_14-branch/libc/iconvdata/gb18030.c Wed Jun 29 00:04:06 2011
@@ -18233,17 +18233,17 @@
 	      len = 0;							      \
 	  }								      \
 	else if (ch == 0x20087)						      \
-	  idx = 0xfe51;							      \
+	  cp = (const unsigned char *) "\xfe\x51";			      \
 	else if (ch == 0x20089)						      \
-	  idx = 0xfe52;							      \
+	  cp = (const unsigned char *) "\xfe\x52";			      \
 	else if (ch == 0x200CC)						      \
-	  idx = 0xfe53;							      \
+	  cp = (const unsigned char *) "\xfe\x53";			      \
 	else if (ch == 0x215d7)						      \
-	  idx = 0xfe6c;							      \
+	  cp = (const unsigned char *) "\xfe\x6c";			      \
 	else if (ch == 0x2298F)						      \
-	  idx = 0xfe76;							      \
+	  cp = (const unsigned char *) "\xfe\x76";			      \
 	else if (ch == 0x241FE)						      \
-	  idx = 0xfe91;							      \
+	  cp = (const unsigned char *) "\xfe\x91";			      \
 	else								      \
 	  len = 0;							      \
 									      \

Modified: fsf/glibc-2_14-branch/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/posix/getaddrinfo.c (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/posix/getaddrinfo.c Wed Jun 29 00:04:06 2011
@@ -881,16 +881,44 @@
 			}
 		    }
 
-		  no_inet6_data = no_data;
-
 		  if (status == NSS_STATUS_SUCCESS)
 		    {
+		      assert (!no_data);
+		      no_data = 1;
+
 		      if ((req->ai_flags & AI_CANONNAME) != 0 && canon == NULL)
 			canon = (*pat)->name;
 
 		      while (*pat != NULL)
-			pat = &((*pat)->next);
+			{
+			  if ((*pat)->family == AF_INET
+			      && req->ai_family == AF_INET6
+			      && (req->ai_flags & AI_V4MAPPED) != 0)
+			    {
+			      uint32_t *pataddr = (*pat)->addr;
+			      (*pat)->family = AF_INET6;
+			      pataddr[3] = pataddr[0];
+			      pataddr[2] = htonl (0xffff);
+			      pataddr[1] = 0;
+			      pataddr[0] = 0;
+			      pat = &((*pat)->next);
+			      no_data = 0;
+			    }
+			  else if (req->ai_family == AF_UNSPEC
+				   || (*pat)->family == req->ai_family)
+			    {
+			      pat = &((*pat)->next);
+
+			      no_data = 0;
+			      if (req->ai_family == AF_INET6)
+				got_ipv6 = true;
+			    }
+			  else
+			    *pat = ((*pat)->next);
+			}
 		    }
+
+		  no_inet6_data = no_data;
 		}
 	      else
 		{