This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.10-327-g01034d7


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  01034d7590f0db29a689d0037cf9b837e38e7482 (commit)
       via  38eb61366303c2857f1b00785757bc21da983d70 (commit)
       via  2eeb9a5d73bd86261b69e61955741e3ce86c28f6 (commit)
       via  5d2e69766a8faba5bae37702094c36113365a6ca (commit)
       via  22bb992d51903bc8cd5f67a207d00e3a6aa8e1a9 (commit)
      from  d840539e1271020600edba752e6ee908c00f66eb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=01034d7590f0db29a689d0037cf9b837e38e7482

commit 01034d7590f0db29a689d0037cf9b837e38e7482
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Wed Sep 2 19:59:43 2009 -0700

    Fix whitespaces.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 4221722..b73ab9c 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -4,7 +4,7 @@
 	[BZ #7094]
 	* sysdeps/unix/sysv/linux/timer_create.c (timer_create):
 	Initialize the sigev_notify field for newly created timer to make sure
-	the timer gets deleted from the active timer's list upon timer_delete.  
+	the timer gets deleted from the active timer's list upon timer_delete.
 
 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=38eb61366303c2857f1b00785757bc21da983d70

commit 38eb61366303c2857f1b00785757bc21da983d70
Author: Suzuki Poulose <suzuki@in.ibm.com>
Date:   Wed Sep 2 19:58:50 2009 -0700

    Fix timer_create to initialize timer_t properly.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 911312f..4221722 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
+	    Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #7094]
+	* sysdeps/unix/sysv/linux/timer_create.c (timer_create):
+	Initialize the sigev_notify field for newly created timer to make sure
+	the timer gets deleted from the active timer's list upon timer_delete.  
+
 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_create.c b/nptl/sysdeps/unix/sysv/linux/timer_create.c
index a07234d..cdf127c 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_create.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_create.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003,2004, 2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -167,6 +167,7 @@ timer_create (clock_id, evp, timerid)
 	      /* Copy the thread parameters the user provided.  */
 	      newp->sival = evp->sigev_value;
 	      newp->thrfunc = evp->sigev_notify_function;
+	      newp->sigev_notify = SIGEV_THREAD;
 
 	      /* We cannot simply copy the thread attributes since the
 		 implementation might keep internal information for

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2eeb9a5d73bd86261b69e61955741e3ce86c28f6

commit 2eeb9a5d73bd86261b69e61955741e3ce86c28f6
Author: Andreas Schwab <schwab@redhat.com>
Date:   Wed Sep 2 19:48:39 2009 -0700

    Fix lookup of group names in hesiod initgroups.
    
    Resolving names from a grplist entry actually never worked.

diff --git a/ChangeLog b/ChangeLog
index 23cf69e..01e7c91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-01  Andreas Schwab  <schwab@redhat.com>
+
+	* hesiod/nss_hesiod/hesiod-grp.c (internal_gid_from_group): Fix
+	parsing of group entry.
+
 2009-09-02  Andreas Schwab  <schwab@redhat.com>
 
 	* libio/wfileops.c (_IO_wfile_seekoff): Account for readahead in
diff --git a/hesiod/nss_hesiod/hesiod-grp.c b/hesiod/nss_hesiod/hesiod-grp.c
index 50c53f7..f0c8c31 100644
--- a/hesiod/nss_hesiod/hesiod-grp.c
+++ b/hesiod/nss_hesiod/hesiod-grp.c
@@ -139,21 +139,19 @@ internal_gid_from_group (void *context, const char *groupname, gid_t *group)
     {
       char *p = *grp_res;
 
+      /* Skip to third field.  */
       while (*p != '\0' && *p != ':')
 	++p;
-      while (*p != '\0' && *p == ':')
+      if (*p != '\0')
 	++p;
       while (*p != '\0' && *p != ':')
 	++p;
-      while (*p != '\0' && *p == ':')
-	++p;
-      if (*p == ':')
+      if (*p != '\0')
 	{
 	  char *endp;
 	  char *q = ++p;
 	  long int val;
 
-	  q = p;
 	  while (*q != '\0' && *q != ':')
 	    ++q;
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d2e69766a8faba5bae37702094c36113365a6ca

commit 5d2e69766a8faba5bae37702094c36113365a6ca
Author: Andreas Schwab <schwab@redhat.com>
Date:   Wed Sep 2 19:45:33 2009 -0700

    Fix fsetpos on wide stream.

diff --git a/ChangeLog b/ChangeLog
index ef087c7..23cf69e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-02  Andreas Schwab  <schwab@redhat.com>
+
+	* libio/wfileops.c (_IO_wfile_seekoff): Account for readahead in
+	external buffer.  Always discard readahead in internal buffer.
+	* libio/Makefile (tests): Add bug-wsetpos.
+	* libio/bug-wsetpos.c: New file.
+
 2009-09-02  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/x86_64/multiarch/strstr-c.c (__strstr_sse42, __strstr_sse2):
diff --git a/libio/Makefile b/libio/Makefile
index 501e80c..83b9458 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -58,7 +58,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc   \
 	tst-memstream1 tst-memstream2 \
 	tst-wmemstream1 tst-wmemstream2 \
 	bug-memstream1 bug-wmemstream1 \
-	tst-setvbuf1 tst-popen1 tst-fgetwc
+	tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos
 test-srcs = test-freopen
 
 all: # Make this the default target; it will be defined in Rules.
diff --git a/libio/bug-wsetpos.c b/libio/bug-wsetpos.c
new file mode 100644
index 0000000..ccb22a4
--- /dev/null
+++ b/libio/bug-wsetpos.c
@@ -0,0 +1,75 @@
+/* Test program for fsetpos on a wide character stream.  */
+
+#include <assert.h>
+#include <stdio.h>
+#include <wchar.h>
+
+static void do_prepare (void);
+#define PREPARE(argc, argv) do_prepare ()
+static int do_test (void);
+#define TEST_FUNCTION do_test ()
+#include <test-skeleton.c>
+
+static const char pattern[] = "12345";
+static char *temp_file;
+
+static void
+do_prepare (void)
+{
+  int fd = create_temp_file ("bug-wsetpos.", &temp_file);
+  if (fd == -1)
+    {
+      printf ("cannot create temporary file: %m\n");
+      exit (1);
+    }
+  write (fd, pattern, sizeof (pattern));
+  close (fd);
+}
+
+static int
+do_test (void)
+{
+  FILE *fp = fopen (temp_file, "r");
+  fpos_t pos;
+  wchar_t c;
+
+  if (fp == NULL)
+    {
+      printf ("fdopen: %m\n");
+      return 1;
+    }
+
+  c = fgetwc (fp); assert (c == L'1');
+  c = fgetwc (fp); assert (c == L'2');
+
+  if (fgetpos (fp, &pos) == EOF)
+    {
+      printf ("fgetpos: %m\n");
+      return 1;
+    }
+
+  rewind (fp);
+  if (ferror (fp))
+    {
+      printf ("rewind: %m\n");
+      return 1;
+    }
+
+  c = fgetwc (fp); assert (c == L'1');
+
+  if (fsetpos (fp, &pos) == EOF)
+    {
+      printf ("fsetpos: %m\n");
+      return 1;
+    }
+
+  c = fgetwc (fp);
+  if (c != L'3')
+    {
+      puts ("fsetpos failed");
+      return 1;
+    }
+
+  puts ("Test succeeded.");
+  return 0;
+}
diff --git a/libio/wfileops.c b/libio/wfileops.c
index be8ae78..5bc08be 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -631,8 +631,12 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
       clen = (*cv->__codecvt_do_encoding) (cv);
 
       if (clen > 0)
-	offset -= (fp->_wide_data->_IO_read_end
-		   - fp->_wide_data->_IO_read_ptr) * clen;
+	{
+	  offset -= (fp->_wide_data->_IO_read_end
+		     - fp->_wide_data->_IO_read_ptr) * clen;
+	  /* Adjust by readahead in external buffer.  */
+	  offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+	}
       else
 	{
 	  int nread;
@@ -690,39 +694,11 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
 		    fp->_IO_buf_base + (offset - start_offset),
 		    fp->_IO_read_end);
 	  _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
-
-	  /* Now set the pointer for the internal buffer.  This
-	     might be an iterative process.  Though the read
-	     pointer is somewhere in the current external buffer
-	     this does not mean we can convert this whole buffer
-	     at once fitting in the internal buffer.  */
-	  fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
-	  read_ptr_copy = fp->_IO_read_base;
-	  fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
-	  do
-	    {
-	      wchar_t buffer[1024];
-	      wchar_t *ignore;
-	      status = (*cd->__codecvt_do_in) (cd,
-					       &fp->_wide_data->_IO_state,
-					       read_ptr_copy,
-					       fp->_IO_read_ptr,
-					       &read_ptr_copy,
-					       buffer,
-					       buffer
-					       + (sizeof (buffer)
-						  / sizeof (buffer[0])),
-					       &ignore);
-	      if (status != __codecvt_ok && status != __codecvt_partial)
-		{
-		  fp->_flags |= _IO_ERR_SEEN;
-		  goto dumb;
-		}
-	    }
-	  while (read_ptr_copy != fp->_IO_read_ptr);
-
-	  fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
-
+	  _IO_wsetg (fp, fp->_wide_data->_IO_buf_base,
+		     fp->_wide_data->_IO_buf_base,
+		     fp->_wide_data->_IO_buf_base);
+	  _IO_wsetp (fp, fp->_wide_data->_IO_buf_base,
+		     fp->_wide_data->_IO_buf_base);
 	  _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
 	  goto resync;
 	}
@@ -760,6 +736,9 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
   _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + delta,
 	    fp->_IO_buf_base + count);
   _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+  _IO_wsetg (fp, fp->_wide_data->_IO_buf_base,
+	     fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base);
+  _IO_wsetp (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base);
   fp->_offset = result + count;
   _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
   return offset;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22bb992d51903bc8cd5f67a207d00e3a6aa8e1a9

commit 22bb992d51903bc8cd5f67a207d00e3a6aa8e1a9
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Sep 2 19:43:04 2009 -0700

    Fix strstr/strcasestr/fma/fmaf on x86_64.

diff --git a/ChangeLog b/ChangeLog
index 0812312..ef087c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-09-02  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/x86_64/multiarch/strstr-c.c (__strstr_sse42, __strstr_sse2):
+	Add attribute_hidden.
+	* sysdeps/x86_64/multiarch/strcasestr-c.c (__strcasestr_sse42,
+	__strcasestr_sse2): Likewise.
+	* sysdeps/x86_64/multiarch/s_fma.c (__fma_sse2): Add attribute_hidden.
+	(__fma_fma): Make static.
+	* sysdeps/x86_64/multiarch/s_fmaf.c (__fmaf_sse2): Add attribute_hidden.
+	(__fmaf_fma): Make static.
+
 2009-08-31  Andreas Schwab  <schwab@redhat.com>
 
 	* libio/wfileops.c (_IO_wfile_seekoff): Remove dead code and
diff --git a/sysdeps/x86_64/multiarch/s_fma.c b/sysdeps/x86_64/multiarch/s_fma.c
index 40601e9..cfecf9b 100644
--- a/sysdeps/x86_64/multiarch/s_fma.c
+++ b/sysdeps/x86_64/multiarch/s_fma.c
@@ -24,10 +24,10 @@
 
 #ifdef HAVE_AVX_SUPPORT
 
-extern double __fma_sse2 (double x, double y, double z);
+extern double __fma_sse2 (double x, double y, double z) attribute_hidden;
 
 
-double
+static double
 __fma_fma (double x, double y, double z)
 {
   asm ("vfmadd213sd %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z));
diff --git a/sysdeps/x86_64/multiarch/s_fmaf.c b/sysdeps/x86_64/multiarch/s_fmaf.c
index f3d37f8..de1c4b6 100644
--- a/sysdeps/x86_64/multiarch/s_fmaf.c
+++ b/sysdeps/x86_64/multiarch/s_fmaf.c
@@ -23,10 +23,10 @@
 
 #ifdef HAVE_AVX_SUPPORT
 
-extern float __fmaf_sse2 (float x, float y, float z);
+extern float __fmaf_sse2 (float x, float y, float z) attribute_hidden;
 
 
-float
+static float
 __fmaf_fma (float x, float y, float z)
 {
   asm ("vfmadd213ss %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z));
diff --git a/sysdeps/x86_64/multiarch/strcasestr-c.c b/sysdeps/x86_64/multiarch/strcasestr-c.c
index e687953..3cb5557 100644
--- a/sysdeps/x86_64/multiarch/strcasestr-c.c
+++ b/sysdeps/x86_64/multiarch/strcasestr-c.c
@@ -7,7 +7,8 @@
 
 #include "string/strcasestr.c"
 
-extern char *__strcasestr_sse42 (const char *, const char *);
+extern char *__strcasestr_sse42 (const char *, const char *) attribute_hidden;
+extern __typeof (__strcasestr_sse2) __strcasestr_sse2 attribute_hidden;
 
 #if 1
 libc_ifunc (__strcasestr,
diff --git a/sysdeps/x86_64/multiarch/strstr-c.c b/sysdeps/x86_64/multiarch/strstr-c.c
index cff99b7..d593089 100644
--- a/sysdeps/x86_64/multiarch/strstr-c.c
+++ b/sysdeps/x86_64/multiarch/strstr-c.c
@@ -7,6 +7,7 @@
 
 #include "string/strstr.c"
 
-extern char *__strstr_sse42 (const char *, const char *);
+extern char *__strstr_sse42 (const char *, const char *) attribute_hidden;
+extern __typeof (__strstr_sse2) __strstr_sse2 attribute_hidden;
 
 libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_sse2);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                   |   23 ++++++++
 hesiod/nss_hesiod/hesiod-grp.c              |    8 +--
 libio/Makefile                              |    2 +-
 libio/bug-wsetpos.c                         |   75 +++++++++++++++++++++++++++
 libio/wfileops.c                            |   49 +++++------------
 nptl/ChangeLog                              |    8 +++
 nptl/sysdeps/unix/sysv/linux/timer_create.c |    3 +-
 sysdeps/x86_64/multiarch/s_fma.c            |    4 +-
 sysdeps/x86_64/multiarch/s_fmaf.c           |    4 +-
 sysdeps/x86_64/multiarch/strcasestr-c.c     |    3 +-
 sysdeps/x86_64/multiarch/strstr-c.c         |    3 +-
 11 files changed, 134 insertions(+), 48 deletions(-)
 create mode 100644 libio/bug-wsetpos.c


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]