[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9309 - in /fsf/glibc-2_11-branch/libc: ./ libio/ sysdeps/unix/sysv/linux/ sysdeps/unix/sysv/linux/bits/ sysdeps/unix/sysv/l...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9309 - in /fsf/glibc-2_11-branch/libc: ./ libio/ sysdeps/unix/sysv/linux/ sysdeps/unix/sysv/linux/bits/ sysdeps/unix/sysv/l...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 20 Nov 2009 08:06:11 -0000
Author: eglibc
Date: Fri Nov 20 00:06:10 2009
New Revision: 9309
Log:
Import glibc-2.11 for 2009-11-20
Added:
fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
Modified:
fsf/glibc-2_11-branch/libc/ChangeLog
fsf/glibc-2_11-branch/libc/libio/libio.h
fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/bits/sched.h
fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/sync_file_range.c
Modified: fsf/glibc-2_11-branch/libc/ChangeLog
==============================================================================
--- fsf/glibc-2_11-branch/libc/ChangeLog (original)
+++ fsf/glibc-2_11-branch/libc/ChangeLog Fri Nov 20 00:06:10 2009
@@ -1,3 +1,24 @@
+2009-11-16 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range):
+ Implement using sync_file_range2 syscall if __NR_sync_file_range2
+ is defined.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c: New
+ file.
+
+2009-11-19 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #10958]
+ * libio/libio.h (_IO_getwc_unlocked): Check for _wide_data being
+ initialized before using it.
+ (_IO_putwc_unlocked): Likewise.
+
+ [BZ #10918]
+ * sysdeps/unix/sysv/linux/bits/sched.h (__CPU_ISSET_S): Use __const
+ in cast to not throw away const-ness of parameters.
+ (__CPU_EQUAL_S): Likewise.
+ (__CPU_OP_S): Likewise.
+
2009-11-17 Paolo Bonzini <bonzini@xxxxxxx>
* posix/bug-regex30.c: New file.
Modified: fsf/glibc-2_11-branch/libc/libio/libio.h
==============================================================================
--- fsf/glibc-2_11-branch/libc/libio/libio.h (original)
+++ fsf/glibc-2_11-branch/libc/libio/libio.h Fri Nov 20 00:06:10 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1995,1997-2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995,1997-2006,2007,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@xxxxxxxxxx>.
@@ -442,13 +442,15 @@
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define _IO_getwc_unlocked(_fp) \
- (_IO_BE ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end,\
- 0) \
+ (_IO_BE ((_fp)->_wide_data == NULL \
+ || ((_fp)->_wide_data->_IO_read_ptr \
+ >= (_fp)->_wide_data->_IO_read_end), 0) \
? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++)
# define _IO_putwc_unlocked(_wch, _fp) \
- (_IO_BE ((_fp)->_wide_data->_IO_write_ptr \
- >= (_fp)->_wide_data->_IO_write_end, 0) \
- ? __woverflow (_fp, _wch) \
+ (_IO_BE ((_fp)->_wide_data == NULL \
+ || ((_fp)->_wide_data->_IO_write_ptr \
+ >= (_fp)->_wide_data->_IO_write_end), 0) \
+ ? __woverflow (_fp, _wch) \
: (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))
#endif
Modified: fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/bits/sched.h
==============================================================================
--- fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/bits/sched.h (original)
+++ fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/bits/sched.h Fri Nov 20 00:06:10 2009
@@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008
+ Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -154,7 +154,7 @@
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu < 8 * (setsize) \
- ? ((((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
+ ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
& __CPUMASK (__cpu))) != 0 \
: 0; }))
@@ -167,8 +167,8 @@
# else
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__extension__ \
- ({ __cpu_mask *__arr1 = (cpusetp1)->__bits; \
- __cpu_mask *__arr2 = (cpusetp2)->__bits; \
+ ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
+ __const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
@@ -180,8 +180,8 @@
# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
(__extension__ \
({ cpu_set_t *__dest = (destset); \
- __cpu_mask *__arr1 = (srcset1)->__bits; \
- __cpu_mask *__arr2 = (srcset2)->__bits; \
+ __const __cpu_mask *__arr1 = (srcset1)->__bits; \
+ __const __cpu_mask *__arr2 = (srcset2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
Added: fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
==============================================================================
--- fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c (added)
+++ fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c Fri Nov 20 00:06:10 2009
@@ -1,0 +1,44 @@
+/* Selective file content synch'ing.
+ Copyright (C) 2006, 2007, 2009 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+
+#if defined __NR_sync_file_range2
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+}
+#else
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (sync_file_range)
+
+# include <stub-tag.h>
+#endif
Modified: fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/sync_file_range.c
==============================================================================
--- fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/sync_file_range.c (original)
+++ fsf/glibc-2_11-branch/libc/sysdeps/unix/sysv/linux/sync_file_range.c Fri Nov 20 00:06:10 2009
@@ -1,5 +1,5 @@
/* Selective file content synch'ing.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2009 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
@@ -34,6 +34,14 @@
__LONG_LONG_PAIR ((long) (to >> 32), (long) to),
flags);
}
+#elif defined __NR_sync_file_range2
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ return INLINE_SYSCALL (sync_file_range2, 6, fd, flags,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to));
+}
#else
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)