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

[commits] r9290 - in /fsf/trunk/libc: ./ locale/ nptl/ nptl/sysdeps/unix/sysv/linux/i386/i486/ nptl/sysdeps/unix/sysv/linux/x86_64/ po...



Author: eglibc
Date: Wed Nov 18 00:03:28 2009
New Revision: 9290

Log:
Import glibc-mainline for 2009-11-18

Added:
    fsf/trunk/libc/locale/tst-duplocale.c
    fsf/trunk/libc/locale/tst-locname.c
    fsf/trunk/libc/posix/bug-regex30.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
    fsf/trunk/libc/posix/Makefile
    fsf/trunk/libc/posix/regcomp.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sync_file_range.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Nov 18 00:03:28 2009
@@ -1,3 +1,30 @@
+2009-11-17  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Change misleading names
+	of parameters of sync_file_range.
+	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+
+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-17  Paolo Bonzini  <bonzini@xxxxxxx>
+
+	* posix/bug-regex30.c: New file.
+	* posix/Makefile: Add rules to build and run bug-regex30.
+	* posix/regcomp.c (re_compile_fastmap_iter): Add all multibyte
+	character lead bytes when there is a range in a COMPLEX_BRACKET.
+	Reported by Oleg Bylatov.
+
 2009-11-17  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	[BZ #10969]

Added: fsf/trunk/libc/locale/tst-duplocale.c
==============================================================================
--- fsf/trunk/libc/locale/tst-duplocale.c (added)
+++ fsf/trunk/libc/locale/tst-duplocale.c Wed Nov 18 00:03:28 2009
@@ -1,0 +1,14 @@
+#include <locale.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  locale_t d = duplocale (LC_GLOBAL_LOCALE);
+  if (d != (locale_t) 0)
+    freelocale (d);
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

Added: fsf/trunk/libc/locale/tst-locname.c
==============================================================================
--- fsf/trunk/libc/locale/tst-locname.c (added)
+++ fsf/trunk/libc/locale/tst-locname.c Wed Nov 18 00:03:28 2009
@@ -1,0 +1,20 @@
+#include <langinfo.h>
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+static int
+do_test (void)
+{
+  const char *s = nl_langinfo (_NL_LOCALE_NAME (LC_CTYPE));
+  if (s == NULL || strcmp (s, "C") != 0)
+    {
+      printf ("incorrect locale name returned: %s, expected \"C\"\n", s);
+      return 1;
+    }
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Wed Nov 18 00:03:28 2009
@@ -1,3 +1,13 @@
+2009-11-17  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
+	reduce size of unwind info.
+
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
+	cfi directives.
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
+	Based on a patch by Dinakar Guniguntala <dino@xxxxxxxxxx>.
+
 2009-11-03  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
 
 	[BZ #4457]

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S Wed Nov 18 00:03:28 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
 
@@ -34,14 +34,29 @@
 	.align	16
 __pthread_cond_timedwait:
 .LSTARTCODE:
+	cfi_startproc
+#ifdef SHARED
+	cfi_personality(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect,
+			DW.ref.__gcc_personality_v0)
+	cfi_lsda(DW_EH_PE_pcrel | DW_EH_PE_sdata4, .LexceptSTART)
+#else
+	cfi_personality(DW_EH_PE_udata4, __gcc_personality_v0)
+	cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
+#endif
+
 	pushl	%ebp
-.Lpush_ebp:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset(%ebp, 0)
 	pushl	%edi
-.Lpush_edi:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset(%edi, 0)
 	pushl	%esi
-.Lpush_esi:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset(%esi, 0)
 	pushl	%ebx
-.Lpush_ebx:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset(%ebx, 0)
+	cfi_remember_state
 
 	movl	20(%esp), %ebx
 	movl	28(%esp), %ebp
@@ -82,7 +97,7 @@
 
 #define FRAME_SIZE 24
 	subl	$FRAME_SIZE, %esp
-.Lsubl:
+	cfi_adjust_cfa_offset(FRAME_SIZE)
 
 	/* Get and store current wakeup_seq value.  */
 	movl	wakeup_seq(%ebx), %edi
@@ -273,7 +288,7 @@
 11:	movl	24+FRAME_SIZE(%esp), %eax
 	call	__pthread_mutex_cond_lock
 	addl	$FRAME_SIZE, %esp
-.Laddl:
+	cfi_adjust_cfa_offset(-FRAME_SIZE);
 
 	/* We return the result of the mutex_lock operation if it failed.  */
 	testl	%eax, %eax
@@ -286,19 +301,24 @@
 #endif
 
 18:	popl	%ebx
-.Lpop_ebx:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%ebx)
 	popl	%esi
-.Lpop_esi:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%esi)
 	popl	%edi
-.Lpop_edi:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%edi)
 	popl	%ebp
-.Lpop_ebp:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%ebp)
 
 	ret
+
+	cfi_restore_state
 
 	/* Initial locking failed.  */
 1:
-.LSbl1:
 #if cond_lock == 0
 	movl	%ebx, %edx
 #else
@@ -317,9 +337,17 @@
 	call	__lll_lock_wait
 	jmp	2b
 
-	/* Unlock in loop requires wakeup.  */
-3:
-.LSbl2:
+	/* The initial unlocking of the mutex failed.  */
+16:
+	LOCK
+#if cond_lock == 0
+	subl	$1, (%ebx)
+#else
+	subl	$1, cond_lock(%ebx)
+#endif
+	jne	18b
+
+	movl	%eax, %esi
 #if cond_lock == 0
 	movl	%ebx, %eax
 #else
@@ -336,14 +364,18 @@
 	addl	$LLL_PRIVATE, %ecx
 #endif
 	call	__lll_unlock_wake
-	jmp	4b
-
-	/* Locking in loop failed.  */
-5:
-#if cond_lock == 0
-	movl	%ebx, %edx
-#else
-	leal	cond_lock(%ebx), %edx
+
+	movl	%esi, %eax
+	jmp	18b
+
+	cfi_adjust_cfa_offset(FRAME_SIZE)
+
+	/* Unlock in loop requires wakeup.  */
+3:
+#if cond_lock == 0
+	movl	%ebx, %eax
+#else
+	leal	cond_lock(%ebx), %eax
 #endif
 #if (LLL_SHARED-LLL_PRIVATE) > 255
 	xorl	%ecx, %ecx
@@ -355,15 +387,15 @@
 #if LLL_PRIVATE != 0
 	addl	$LLL_PRIVATE, %ecx
 #endif
-	call	__lll_lock_wait
-	jmp	6b
-
-	/* Unlock after loop requires wakeup.  */
-10:
-#if cond_lock == 0
-	movl	%ebx, %eax
-#else
-	leal	cond_lock(%ebx), %eax
+	call	__lll_unlock_wake
+	jmp	4b
+
+	/* Locking in loop failed.  */
+5:
+#if cond_lock == 0
+	movl	%ebx, %edx
+#else
+	leal	cond_lock(%ebx), %edx
 #endif
 #if (LLL_SHARED-LLL_PRIVATE) > 255
 	xorl	%ecx, %ecx
@@ -375,21 +407,11 @@
 #if LLL_PRIVATE != 0
 	addl	$LLL_PRIVATE, %ecx
 #endif
-	call	__lll_unlock_wake
-	jmp	11b
-
-	/* The initial unlocking of the mutex failed.  */
-16:
-.LSbl3:
-	LOCK
-#if cond_lock == 0
-	subl	$1, (%ebx)
-#else
-	subl	$1, cond_lock(%ebx)
-#endif
-	jne	18b
-
-	movl	%eax, %esi
+	call	__lll_lock_wait
+	jmp	6b
+
+	/* Unlock after loop requires wakeup.  */
+10:
 #if cond_lock == 0
 	movl	%ebx, %eax
 #else
@@ -406,13 +428,10 @@
 	addl	$LLL_PRIVATE, %ecx
 #endif
 	call	__lll_unlock_wake
-
-	movl	%esi, %eax
-	jmp	18b
+	jmp	11b
 
 #if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
 	/* clock_gettime not available.  */
-.LSbl4:
 19:	leal	4(%esp), %ebx
 	xorl	%ecx, %ecx
 	movl	$__NR_gettimeofday, %eax
@@ -443,7 +462,6 @@
 	.type	__condvar_tw_cleanup2, @function
 __condvar_tw_cleanup2:
 	subl	$cond_futex, %ebx
-.LSbl5:
 	.size	__condvar_tw_cleanup2, .-__condvar_tw_cleanup2
 	.type	__condvar_tw_cleanup, @function
 __condvar_tw_cleanup:
@@ -583,14 +601,15 @@
 	call	_Unwind_Resume
 	hlt
 .LENDCODE:
+	cfi_endproc
 	.size	__condvar_tw_cleanup, .-__condvar_tw_cleanup
 
 
 	.section .gcc_except_table,"a",@progbits
 .LexceptSTART:
-	.byte	0xff				# @LPStart format (omit)
-	.byte	0xff				# @TType format (omit)
-	.byte	0x0b				# call-site format
+	.byte	DW_EH_PE_omit			# @LPStart format (omit)
+	.byte	DW_EH_PE_omit			# @TType format (omit)
+	.byte	DW_EH_PE_sdata4			# call-site format
 						# DW_EH_PE_sdata4
 	.uleb128 .Lcstend-.Lcstbegin
 .Lcstbegin:
@@ -613,144 +632,13 @@
 .Lcstend:
 
 
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.long	L(ENDCIE)-L(STARTCIE)		# Length of the CIE.
-.LSTARTCIE:
-	.long	0				# CIE ID.
-	.byte	1				# Version number.
-#ifdef SHARED
-	.string	"zPLR"				# NUL-terminated augmentation
-						# string.
-#else
-	.string	"zPL"				# NUL-terminated augmentation
-						# string.
-#endif
-	.uleb128 1				# Code alignment factor.
-	.sleb128 -4				# Data alignment factor.
-	.byte	8				# Return address register
-						# column.
-#ifdef SHARED
-	.uleb128 7				# Augmentation value length.
-	.byte	0x9b				# Personality: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4
-						# + DW_EH_PE_indirect
-	.long	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				# LSDA Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-	.byte	0x1b				# FDE Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-#else
-	.uleb128 6				# Augmentation value length.
-	.byte	0x0				# Personality: absolute
-	.long	__gcc_personality_v0
-	.byte	0x0				# LSDA Encoding: absolute
-#endif
-	.byte 0x0c				# DW_CFA_def_cfa
-	.uleb128 4
-	.uleb128 4
-	.byte	0x88				# DW_CFA_offset, column 0x8
-	.uleb128 1
-	.align 4
-.LENDCIE:
-
-	.long	.LENDFDE-.LSTARTFDE		# Length of the FDE.
-.LSTARTFDE:
-	.long	.LSTARTFDE-.LSTARTFRAME		# CIE pointer.
-#ifdef SHARED
-	.long	.LSTARTCODE-.			# PC-relative start address
-						# of the code
-#else
-	.long	.LSTARTCODE			# Start address of the code.
-#endif
-	.long	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 4				# Augmentation size
-#ifdef SHARED
-	.long	.LexceptSTART-.
-#else
-	.long	.LexceptSTART
-#endif
-	.byte	0x40+.Lpush_ebp-.LSTARTCODE	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte	0x85				# DW_CFA_offset %ebp
-	.uleb128 2
-	.byte	0x40+ .Lpush_edi-.Lpush_ebp	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte	0x87				# DW_CFA_offset %edi
-	.uleb128 3
-	.byte	0x40+.Lpush_esi-.Lpush_edi	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	0x86				# DW_CFA_offset %esi
-	.uleb128 4
-	.byte	0x40+.Lpush_ebx-.Lpush_esi	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 20
-	.byte	0x83				# DW_CFA_offset %ebx
-	.uleb128 5
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.Lsubl-.Lpush_ebx
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 20+FRAME_SIZE
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.Laddl-.Lsubl
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 20
-	.byte	0x40+.Lpop_ebx-.Laddl		# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	0xc3				# DW_CFA_restore %ebx
-	.byte	0x40+.Lpop_esi-.Lpop_ebx	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte	0xc6				# DW_CFA_restore %esi
-	.byte	0x40+.Lpop_edi-.Lpop_esi	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte	0xc7				# DW_CFA_restore %edi
-	.byte	0x40+.Lpop_ebp-.Lpop_edi	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 4
-	.byte	0xc5				# DW_CFA_restore %ebp
-	.byte	0x40+.LSbl1-.Lpop_edi		# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 20
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.LSbl2-.LSbl1
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 20+FRAME_SIZE
-	.byte	0x85				# DW_CFA_offset %ebp
-	.uleb128 2
-	.byte	0x87				# DW_CFA_offset %edi
-	.uleb128 3
-	.byte	0x86				# DW_CFA_offset %esi
-	.uleb128 4
-	.byte	0x83				# DW_CFA_offset %ebx
-	.uleb128 5
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.LSbl3-.LSbl2
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 20
-	.byte	4				# DW_CFA_advance_loc4
-#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
-	.4byte	.LSbl4-.LSbl3
-#else
-	.4byte	.LSbl5-.LSbl3
-#endif
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 20+FRAME_SIZE
-	.align	4
-.LENDFDE:
-
 #ifdef SHARED
 	.hidden DW.ref.__gcc_personality_v0
-	.weak   DW.ref.__gcc_personality_v0
+	.weak	DW.ref.__gcc_personality_v0
 	.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-	.align 4
-	.type   DW.ref.__gcc_personality_v0, @object
-	.size   DW.ref.__gcc_personality_v0, 4
+	.align	4
+	.type	DW.ref.__gcc_personality_v0, @object
+	.size	DW.ref.__gcc_personality_v0, 4
 DW.ref.__gcc_personality_v0:
 	.long   __gcc_personality_v0
 #endif

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S Wed Nov 18 00:03:28 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
 
@@ -33,13 +33,26 @@
 	.align	16
 __pthread_cond_wait:
 .LSTARTCODE:
+	cfi_startproc
+#ifdef SHARED
+	cfi_personality(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect,
+			DW.ref.__gcc_personality_v0)
+	cfi_lsda(DW_EH_PE_pcrel | DW_EH_PE_sdata4, .LexceptSTART)
+#else
+	cfi_personality(DW_EH_PE_udata4, __gcc_personality_v0)
+	cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
+#endif
 
 	pushl	%edi
-.Lpush_edi:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset(%edi, 0)
 	pushl	%esi
-.Lpush_esi:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset(%esi, 0)
 	pushl	%ebx
-.Lpush_ebx:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset(%ebx, 0)
+	cfi_remember_state
 
 	xorl	%esi, %esi
 	movl	16(%esp), %ebx
@@ -76,7 +89,7 @@
 
 #define FRAME_SIZE 16
 	subl	$FRAME_SIZE, %esp
-.Lsubl:
+	cfi_adjust_cfa_offset(FRAME_SIZE)
 
 	/* Get and store current wakeup_seq value.  */
 	movl	wakeup_seq(%ebx), %edi
@@ -202,21 +215,25 @@
 11:	movl	20+FRAME_SIZE(%esp), %eax
 	call	__pthread_mutex_cond_lock
 	addl	$FRAME_SIZE, %esp
-.Laddl:
+	cfi_adjust_cfa_offset(-FRAME_SIZE);
 
 14:	popl	%ebx
-.Lpop_ebx:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%ebx)
 	popl	%esi
-.Lpop_esi:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%esi)
 	popl	%edi
-.Lpop_edi:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%edi)
 
 	/* We return the result of the mutex_lock operation.  */
 	ret
 
+	cfi_restore_state
+
 	/* Initial locking failed.  */
 1:
-.LSbl1:
 #if cond_lock == 0
 	movl	%ebx, %edx
 #else
@@ -235,9 +252,41 @@
 	call	__lll_lock_wait
 	jmp	2b
 
-	/* Unlock in loop requires waekup.  */
+	/* The initial unlocking of the mutex failed.  */
+12:
+	LOCK
+#if cond_lock == 0
+	subl	$1, (%ebx)
+#else
+	subl	$1, cond_lock(%ebx)
+#endif
+	jne	14b
+
+	movl	%eax, %esi
+#if cond_lock == 0
+	movl	%ebx, %eax
+#else
+	leal	cond_lock(%ebx), %eax
+#endif
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+	xorl	%ecx, %ecx
+#endif
+	cmpl	$-1, dep_mutex(%ebx)
+	setne	%cl
+	subl	$1, %ecx
+	andl	$(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+	addl	$LLL_PRIVATE, %ecx
+#endif
+	call	__lll_unlock_wake
+
+	movl	%esi, %eax
+	jmp	14b
+
+	cfi_adjust_cfa_offset(FRAME_SIZE)
+
+	/* Unlock in loop requires wakeup.  */
 3:
-.LSbl2:
 #if cond_lock == 0
 	movl	%ebx, %eax
 #else
@@ -295,38 +344,6 @@
 #endif
 	call	__lll_unlock_wake
 	jmp	11b
-
-	/* The initial unlocking of the mutex failed.  */
-12:
-.LSbl3:
-	LOCK
-#if cond_lock == 0
-	subl	$1, (%ebx)
-#else
-	subl	$1, cond_lock(%ebx)
-#endif
-	jne	14b
-
-	movl	%eax, %esi
-#if cond_lock == 0
-	movl	%ebx, %eax
-#else
-	leal	cond_lock(%ebx), %eax
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
-	xorl	%ecx, %ecx
-#endif
-	cmpl	$-1, dep_mutex(%ebx)
-	setne	%cl
-	subl	$1, %ecx
-	andl	$(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
-	addl	$LLL_PRIVATE, %ecx
-#endif
-	call	__lll_unlock_wake
-
-	movl	%esi, %eax
-	jmp	14b
 	.size	__pthread_cond_wait, .-__pthread_cond_wait
 versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
 		  GLIBC_2_3_2)
@@ -475,14 +492,15 @@
 	call	_Unwind_Resume
 	hlt
 .LENDCODE:
+	cfi_endproc
 	.size	__condvar_w_cleanup, .-__condvar_w_cleanup
 
 
 	.section .gcc_except_table,"a",@progbits
 .LexceptSTART:
-	.byte	0xff				# @LPStart format (omit)
-	.byte	0xff				# @TType format (omit)
-	.byte	0x0b				# call-site format
+	.byte	DW_EH_PE_omit			# @LPStart format (omit)
+	.byte	DW_EH_PE_omit			# @TType format (omit)
+	.byte	DW_EH_PE_sdata4			# call-site format
 						# DW_EH_PE_sdata4
 	.uleb128 .Lcstend-.Lcstbegin
 .Lcstbegin:
@@ -504,123 +522,6 @@
 	.uleb128  0
 .Lcstend:
 
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.long	L(ENDCIE)-L(STARTCIE)		# Length of the CIE.
-.LSTARTCIE:
-	.long	0				# CIE ID.
-	.byte	1				# Version number.
-#ifdef SHARED
-	.string	"zPLR"				# NUL-terminated augmentation
-						# string.
-#else
-	.string	"zPL"				# NUL-terminated augmentation
-						# string.
-#endif
-	.uleb128 1				# Code alignment factor.
-	.sleb128 -4				# Data alignment factor.
-	.byte	8				# Return address register
-						# column.
-#ifdef SHARED
-	.uleb128 7				# Augmentation value length.
-	.byte	0x9b				# Personality: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4
-						# + DW_EH_PE_indirect
-	.long	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				# LSDA Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-	.byte	0x1b				# FDE Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-#else
-	.uleb128 6				# Augmentation value length.
-	.byte	0x0				# Personality: absolute
-	.long	__gcc_personality_v0
-	.byte	0x0				# LSDA Encoding: absolute
-#endif
-	.byte 0x0c				# DW_CFA_def_cfa
-	.uleb128 4
-	.uleb128 4
-	.byte	0x88				# DW_CFA_offset, column 0x8
-	.uleb128 1
-	.align 4
-.LENDCIE:
-
-	.long	.LENDFDE-.LSTARTFDE		# Length of the FDE.
-.LSTARTFDE:
-	.long	.LSTARTFDE-.LSTARTFRAME		# CIE pointer.
-#ifdef SHARED
-	.long	.LSTARTCODE-.			# PC-relative start address
-						# of the code.
-#else
-	.long	.LSTARTCODE			# Start address of the code.
-#endif
-	.long	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 4				# Augmentation size
-#ifdef SHARED
-	.long	.LexceptSTART-.
-#else
-	.long	.LexceptSTART
-#endif
-	.byte	0x40+.Lpush_edi-.LSTARTCODE	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte	0x87				# DW_CFA_offset %edi
-	.uleb128 2
-	.byte	0x40+.Lpush_esi-.Lpush_edi	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte	0x86				# DW_CFA_offset %esi
-	.uleb128 3
-	.byte	0x40+.Lpush_ebx-.Lpush_esi	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	0x83				# DW_CFA_offset %ebx
-	.uleb128 4
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.Lsubl-.Lpush_ebx
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16+FRAME_SIZE
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.Laddl-.Lsubl
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	0x40+ .Lpop_ebx-.Laddl		# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte	0xc3				# DW_CFA_restore %ebx
-	.byte	0x40+.Lpop_esi-.Lpop_ebx	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte	0xc6				# DW_CFA_restore %esi
-	.byte	0x40+.Lpop_edi-.Lpop_esi	# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 4
-	.byte	0xc7				# DW_CFA_restore %edi
-	.byte	0x40+.LSbl1-.Lpop_edi		# DW_CFA_advance_loc+N
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	0x87				# DW_CFA_offset %edi
-	.uleb128 2
-	.byte	0x86				# DW_CFA_offset %esi
-	.uleb128 3
-	.byte	0x83				# DW_CFA_offset %ebx
-	.uleb128 4
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.LSbl2-.LSbl1
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16+FRAME_SIZE
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.LSbl3-.LSbl2
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	4				# DW_CFA_advance_loc4
-	.4byte	.LSbl4-.LSbl3
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16+FRAME_SIZE
-	.align	4
-.LENDFDE:
-
-
 #ifdef PIC
 	.section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits
 	.globl	__i686.get_pc_thunk.cx

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S Wed Nov 18 00:03:28 2009
@@ -69,6 +69,7 @@
 #endif
 	subq	$FRAME_SIZE, %rsp
 	cfi_adjust_cfa_offset(FRAME_SIZE)
+	cfi_remember_state
 
 	cmpq	$1000000000, 8(%rdx)
 	movl	$EINVAL, %eax
@@ -77,19 +78,19 @@
 	/* Stack frame:
 
 	   rsp + 48
-	            +--------------------------+
+		    +--------------------------+
 	   rsp + 32 | timeout value            |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp + 24 | old wake_seq value       |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp + 16 | mutex pointer            |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  8 | condvar pointer          |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  4 | old broadcast_seq value  |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  0 | old cancellation mode    |
-	            +--------------------------+
+		    +--------------------------+
 	*/
 
 	cmpq	$-1, dep_mutex(%rdi)
@@ -317,11 +318,7 @@
 
 	retq
 
-	cfi_adjust_cfa_offset(4 * 8 + FRAME_SIZE)
-	cfi_rel_offset(%r12, FRAME_SIZE + 24)
-	cfi_rel_offset(%r13, FRAME_SIZE + 16)
-	cfi_rel_offset(%r14, FRAME_SIZE + 8)
-	cfi_rel_offset(%r15, FRAME_SIZE)
+	cfi_restore_state
 
 64:	callq	__pthread_mutex_cond_lock_adjust
 	movq	%r14, %rax
@@ -650,15 +647,15 @@
 	   rsp + 48 | %r14                     |
 		    +--------------------------+
 	   rsp + 24 | unused                   |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp + 16 | mutex pointer            |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  8 | condvar pointer          |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  4 | old broadcast_seq value  |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  0 | old cancellation mode    |
-	            +--------------------------+
+		    +--------------------------+
 	*/
 
 	movq	%rax, 24(%rsp)

Modified: fsf/trunk/libc/posix/Makefile
==============================================================================
--- fsf/trunk/libc/posix/Makefile (original)
+++ fsf/trunk/libc/posix/Makefile Wed Nov 18 00:03:28 2009
@@ -82,7 +82,7 @@
 		   bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
 		   bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
 		   bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
-		   bug-regex29 \
+		   bug-regex29 bug-regex30 \
 		   tst-nice tst-nanosleep tst-regex2 \
 		   transbug tst-rxspencer tst-pcre tst-boost \
 		   bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
@@ -195,6 +195,7 @@
 bug-regex23-ENV = LOCPATH=$(common-objpfx)localedata
 bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata
 bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata
+bug-regex30-ENV = LOCPATH=$(common-objpfx)localedata
 tst-rxspencer-ARGS = --utf8 rxspencer/tests
 tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata
 tst-pcre-ARGS = PCRE.tests

Added: fsf/trunk/libc/posix/bug-regex30.c
==============================================================================
--- fsf/trunk/libc/posix/bug-regex30.c (added)
+++ fsf/trunk/libc/posix/bug-regex30.c Wed Nov 18 00:03:28 2009
@@ -1,0 +1,103 @@
+/* Russian regular expression tests.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Paolo Bonzini <pbonzini@xxxxxxxxxx>, 2009.
+
+   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 <sys/types.h>
+#include <mcheck.h>
+#include <regex.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+
+/* Tests supposed to match.  */
+struct
+{
+  const char *pattern;
+  const char *string;
+  int flags, nmatch;
+  regmatch_t rm[5];
+} tests[] = {
+  /* U+0413	\xd0\x93	CYRILLIC CAPITAL LETTER GHE
+     U+0420	\xd0\xa0        CYRILLIC CAPITAL LETTER ER
+     U+0430	\xd0\xb0	CYRILLIC SMALL LETTER A
+     U+0433	\xd0\xb3	CYRILLIC SMALL LETTER GHE
+     U+0440	\xd1\x80	CYRILLIC SMALL LETTER ER
+     U+044F	\xd1\x8f	CYRILLIC SMALL LETTER YA */
+  { "[\xd0\xb0-\xd1\x8f]", "\xd0\xb3", 0, 1,
+    { { 0, 2 } } },
+  { "[\xd0\xb0-\xd1\x8f]", "\xd0\x93", REG_ICASE, 1,
+    { { 0, 2 } } },
+  { "[\xd1\x80-\xd1\x8f]", "\xd0\xa0", REG_ICASE, 1,
+    { { 0, 2 } } },
+};
+
+
+static int
+do_test (void)
+{
+  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+    {
+      puts ("setlocale failed");
+      return 1;
+    }
+
+  int ret = 0;
+
+  for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
+    {
+      regex_t re;
+      regmatch_t rm[5];
+      int n = regcomp (&re, tests[i].pattern, tests[i].flags);
+      if (n != 0)
+	{
+	  char buf[500];
+	  regerror (n, &re, buf, sizeof (buf));
+	  printf ("regcomp %zd failed: %s\n", i, buf);
+	  ret = 1;
+	  continue;
+	}
+
+      if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
+	{
+	  printf ("regexec %zd failed\n", i);
+	  ret = 1;
+	  regfree (&re);
+	  continue;
+	}
+
+      for (n = 0; n < tests[i].nmatch; ++n)
+	if (rm[n].rm_so != tests[i].rm[n].rm_so
+	      || rm[n].rm_eo != tests[i].rm[n].rm_eo)
+	  {
+	    if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
+	      break;
+	    printf ("regexec match failure rm[%d] %d..%d\n",
+		    n, rm[n].rm_so, rm[n].rm_eo);
+	    ret = 1;
+	    break;
+	  }
+
+      regfree (&re);
+    }
+
+  return ret;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

Modified: fsf/trunk/libc/posix/regcomp.c
==============================================================================
--- fsf/trunk/libc/posix/regcomp.c (original)
+++ fsf/trunk/libc/posix/regcomp.c Wed Nov 18 00:03:28 2009
@@ -377,7 +377,7 @@
 	     applies to multibyte character sets; for single byte character
 	     sets, the SIMPLE_BRACKET again suffices.  */
 	  if (dfa->mb_cur_max > 1
-	      && (cset->nchar_classes || cset->non_match
+	      && (cset->nchar_classes || cset->non_match || cset->nranges
 # ifdef _LIBC
 		  || cset->nequiv_classes
 # endif /* _LIBC */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h Wed Nov 18 00:03:28 2009
@@ -237,7 +237,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h Wed Nov 18 00:03:28 2009
@@ -231,7 +231,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h Wed Nov 18 00:03:28 2009
@@ -237,7 +237,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 

Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c Wed Nov 18 00:03:28 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/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h Wed Nov 18 00:03:28 2009
@@ -257,7 +257,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h Wed Nov 18 00:03:28 2009
@@ -237,7 +237,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h Wed Nov 18 00:03:28 2009
@@ -256,7 +256,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sync_file_range.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sync_file_range.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sync_file_range.c Wed Nov 18 00:03:28 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)

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h Wed Nov 18 00:03:28 2009
@@ -251,7 +251,7 @@
 
 
 /* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
 			    unsigned int __flags);