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

[commits] r3779 - in /fsf/trunk/libc: ./ iconv/ inet/netinet/ locale/programs/ sysdeps/gnu/netinet/ sysdeps/unix/bsd/bsd4.4/bits/ sysd...



Author: eglibc
Date: Fri Oct 12 00:03:20 2007
New Revision: 3779

Log:
Import glibc-mainline for 2007-10-12

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/iconv/gconv_simple.c
    fsf/trunk/libc/inet/netinet/in.h
    fsf/trunk/libc/locale/programs/ld-collate.c
    fsf/trunk/libc/sysdeps/gnu/netinet/tcp.h
    fsf/trunk/libc/sysdeps/unix/bsd/bsd4.4/bits/socket.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Oct 12 00:03:20 2007
@@ -1,3 +1,22 @@
+2007-10-11  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* iconv/gconv_simple.c: Add some branch prediction.
+
+2007-10-12  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* locale/programs/ld-collate.c (collate_read): If ignore_content
+	and nowtok is tok_define, eat any tok_eol tokens.
+
+2007-10-11  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC.
+	(struct tcp_md5sig): Change tcpm_addr type to struct sockaddr_storage.
+
+	* inet/netinet/in.h: Don't include bits/socket.h.
+	* sysdeps/unix/sysv/linux/bits/socket.h: Only check _SYS_SOCKET_H
+	macro.
+	* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise.
+
 2007-10-10  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* locale/programs/locfile-token.h: Remove tok_elif, add tok_elifdef

Modified: fsf/trunk/libc/iconv/gconv_simple.c
==============================================================================
--- fsf/trunk/libc/iconv/gconv_simple.c (original)
+++ fsf/trunk/libc/iconv/gconv_simple.c Fri Oct 12 00:03:20 2007
@@ -1,5 +1,5 @@
 /* Simple transformations functions.
-   Copyright (C) 1997-2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997-2003, 2004, 2005, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -880,7 +880,7 @@
   {									      \
     uint32_t wc = *((const uint32_t *) inptr);				      \
 									      \
-    if (wc < 0x80)							      \
+    if (__builtin_expect (wc < 0x80, 1))				      \
       /* It's an one byte sequence.  */					      \
       *outptr++ = (unsigned char) wc;					      \
     else if (__builtin_expect (wc <= 0x7fffffff, 1))			      \
@@ -940,21 +940,19 @@
 #define LOOPFCT			FROM_LOOP
 #define BODY \
   {									      \
-    uint32_t ch;							      \
-    uint_fast32_t cnt;							      \
-    uint_fast32_t i;							      \
-									      \
     /* Next input byte.  */						      \
-    ch = *inptr;							      \
-									      \
-    if (ch < 0x80)							      \
+    uint32_t ch = *inptr;						      \
+									      \
+    if (__builtin_expect (ch < 0x80, 1))				      \
       {									      \
 	/* One byte sequence.  */					      \
-	cnt = 1;							      \
 	++inptr;							      \
       }									      \
     else								      \
       {									      \
+	uint_fast32_t cnt;						      \
+	uint_fast32_t i;						      \
+									      \
 	if (ch >= 0xc2 && ch < 0xe0)					      \
 	  {								      \
 	    /* We expect two bytes.  The first byte cannot be 0xc0 or 0xc1,   \

Modified: fsf/trunk/libc/inet/netinet/in.h
==============================================================================
--- fsf/trunk/libc/inet/netinet/in.h (original)
+++ fsf/trunk/libc/inet/netinet/in.h Fri Oct 12 00:03:20 2007
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007
+   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
@@ -211,9 +212,6 @@
 #define INET_ADDRSTRLEN 16
 #define INET6_ADDRSTRLEN 46
 
-/* Get the definition of the macro to define the common sockaddr members.  */
-#include <bits/socket.h>
-
 
 /* Structure describing an Internet socket address.  */
 struct sockaddr_in

Modified: fsf/trunk/libc/locale/programs/ld-collate.c
==============================================================================
--- fsf/trunk/libc/locale/programs/ld-collate.c (original)
+++ fsf/trunk/libc/locale/programs/ld-collate.c Fri Oct 12 00:03:20 2007
@@ -2719,25 +2719,24 @@
   while (nowtok == tok_define)
     {
       if (ignore_content)
-	{
-	  lr_ignore_rest (ldfile, 0);
-	  continue;
-	}
-
-      arg = lr_token (ldfile, charmap, result, NULL, verbose);
-      if (arg->tok != tok_ident)
-	SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
+	lr_ignore_rest (ldfile, 0);
       else
 	{
-	  /* Simply add the new symbol.  */
-	  struct name_list *newsym = xmalloc (sizeof (*newsym)
-					  + arg->val.str.lenmb + 1);
-	  memcpy (newsym->str, arg->val.str.startmb, arg->val.str.lenmb);
-	  newsym->str[arg->val.str.lenmb] = '\0';
-	  newsym->next = defined;
-	  defined = newsym;
-
-	  lr_ignore_rest (ldfile, 1);
+	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
+	  if (arg->tok != tok_ident)
+	    SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
+	  else
+	    {
+	      /* Simply add the new symbol.  */
+	      struct name_list *newsym = xmalloc (sizeof (*newsym)
+						  + arg->val.str.lenmb + 1);
+	      memcpy (newsym->str, arg->val.str.startmb, arg->val.str.lenmb);
+	      newsym->str[arg->val.str.lenmb] = '\0';
+	      newsym->next = defined;
+	      defined = newsym;
+
+	      lr_ignore_rest (ldfile, 1);
+	    }
 	}
 
       do

Modified: fsf/trunk/libc/sysdeps/gnu/netinet/tcp.h
==============================================================================
--- fsf/trunk/libc/sysdeps/gnu/netinet/tcp.h (original)
+++ fsf/trunk/libc/sysdeps/gnu/netinet/tcp.h Fri Oct 12 00:03:20 2007
@@ -54,6 +54,7 @@
 
 #ifdef __USE_MISC
 # include <sys/types.h>
+# include <sys/socket.h>
 
 # ifdef __FAVOR_BSD
 typedef	u_int32_t tcp_seq;
@@ -233,7 +234,7 @@
 
 struct tcp_md5sig
 {
-  struct __kernel_sockaddr_storage tcpm_addr;	/* Address associated.  */
+  struct sockaddr_storage tcpm_addr;		/* Address associated.  */
   u_int16_t	__tcpm_pad1;			/* Zero.  */
   u_int16_t	tcpm_keylen;			/* Key length.  */
   u_int32_t	__tcpm_pad2;			/* Zero.  */

Modified: fsf/trunk/libc/sysdeps/unix/bsd/bsd4.4/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/bsd/bsd4.4/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/bsd/bsd4.4/bits/socket.h Fri Oct 12 00:03:20 2007
@@ -20,7 +20,7 @@
 #ifndef __BITS_SOCKET_H
 #define __BITS_SOCKET_H	1
 
-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
+#ifndef _SYS_SOCKET_H
 # error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
 #endif
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h Fri Oct 12 00:03:20 2007
@@ -21,7 +21,7 @@
 #ifndef __BITS_SOCKET_H
 #define __BITS_SOCKET_H
 
-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
+#ifndef _SYS_SOCKET_H
 # error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
 #endif