[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8912 - in /fsf/trunk/libc: ./ hesiod/nss_hesiod/ libio/ nptl/ nptl/sysdeps/unix/sysv/linux/ sysdeps/x86_64/multiarch/
- To: commits@xxxxxxxxxx
- Subject: [commits] r8912 - in /fsf/trunk/libc: ./ hesiod/nss_hesiod/ libio/ nptl/ nptl/sysdeps/unix/sysv/linux/ sysdeps/x86_64/multiarch/
- From: eglibc@xxxxxxxxxx
- Date: Thu, 03 Sep 2009 07:04:01 -0000
Author: eglibc
Date: Thu Sep 3 00:04:00 2009
New Revision: 8912
Log:
Import glibc-mainline for 2009-09-03
Added:
fsf/trunk/libc/libio/bug-wsetpos.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c
fsf/trunk/libc/libio/Makefile
fsf/trunk/libc/libio/wfileops.c
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c
fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fma.c
fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c
fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-c.c
fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Sep 3 00:04:00 2009
@@ -1,3 +1,26 @@
+2009-09-01 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * hesiod/nss_hesiod/hesiod-grp.c (internal_gid_from_group): Fix
+ parsing of group entry.
+
+2009-09-02 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * 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@xxxxxxxxxx>
+
+ * 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@xxxxxxxxxx>
* libio/wfileops.c (_IO_wfile_seekoff): Remove dead code and
Modified: fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c
==============================================================================
--- fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c (original)
+++ fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c Thu Sep 3 00:04:00 2009
@@ -139,21 +139,19 @@
{
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;
Modified: fsf/trunk/libc/libio/Makefile
==============================================================================
--- fsf/trunk/libc/libio/Makefile (original)
+++ fsf/trunk/libc/libio/Makefile Thu Sep 3 00:04:00 2009
@@ -58,7 +58,7 @@
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.
Added: fsf/trunk/libc/libio/bug-wsetpos.c
==============================================================================
--- fsf/trunk/libc/libio/bug-wsetpos.c (added)
+++ fsf/trunk/libc/libio/bug-wsetpos.c Thu Sep 3 00:04:00 2009
@@ -1,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;
+}
Modified: fsf/trunk/libc/libio/wfileops.c
==============================================================================
--- fsf/trunk/libc/libio/wfileops.c (original)
+++ fsf/trunk/libc/libio/wfileops.c Thu Sep 3 00:04:00 2009
@@ -631,8 +631,12 @@
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 @@
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_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;
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Thu Sep 3 00:04:00 2009
@@ -1,3 +1,11 @@
+2009-09-02 Suzuki K P <suzuki@xxxxxxxxxx>
+ Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [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@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/timer_create.c Thu Sep 3 00:04:00 2009
@@ -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@xxxxxxxxxx>, 2003.
@@ -167,6 +167,7 @@
/* 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
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fma.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fma.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fma.c Thu Sep 3 00:04:00 2009
@@ -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));
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c Thu Sep 3 00:04:00 2009
@@ -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));
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-c.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-c.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-c.c Thu Sep 3 00:04:00 2009
@@ -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,
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c Thu Sep 3 00:04:00 2009
@@ -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);