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

r2698 - in glibc-package/trunk/debian: . patches patches/alpha



Author: aurel32
Date: 2007-11-26 00:42:52 +0000 (Mon, 26 Nov 2007)
New Revision: 2698

Added:
   glibc-package/trunk/debian/patches/alpha/submitted-fdatasync.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * alpha/submitted-fdatasync.diff: new patch to fix fdatasync() on alpha.
    Closes: #452081.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2007-11-25 23:14:28 UTC (rev 2697)
+++ glibc-package/trunk/debian/changelog	2007-11-26 00:42:52 UTC (rev 2698)
@@ -3,8 +3,10 @@
   [ Aurelien Jarno ]
   * sysdeps/alpha.mk: define alphaev67_MIN_KERNEL_SUPPORTED to 2.6.9.
     Closes: #452890.
+  * alpha/submitted-fdatasync.diff: new patch to fix fdatasync() on alpha.
+    Closes: #452081.
 
- -- Aurelien Jarno <aurel32@debian.org>  Mon, 26 Nov 2007 00:14:02 +0100
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 26 Nov 2007 01:41:39 +0100
 
 glibc (2.7-1) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/alpha/submitted-fdatasync.diff
===================================================================
--- glibc-package/trunk/debian/patches/alpha/submitted-fdatasync.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/alpha/submitted-fdatasync.diff	2007-11-26 00:42:52 UTC (rev 2698)
@@ -0,0 +1,104 @@
+2007-11-26  Aurelien Jarno  <aurelien@aurel32.net>
+
+        * sysdeps/unix/sysv/linux/kernel-features.h: define 
+	__ASSUME_FDATASYNC. 
+        * sysdeps/unix/sysv/linux/fdatasync.c: New file.
+        * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync.
+
+--- sysdeps/unix/sysv/linux/kernel-features.h.orig	2007-11-25 23:17:51.000000000 +0000
++++ sysdeps/unix/sysv/linux/kernel-features.h	2007-11-26 00:10:14.000000000 +0000
+@@ -467,6 +467,12 @@
+ # define __ASSUME_FUTEX_LOCK_PI	1
+ #endif
+ 
++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it
++   was already present in 2.0 kernels on other architectures.  */
++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616)
++# define __ASSUME_FDATASYNC	1
++#endif
++
+ /* Support for utimensat syscall was added in 2.6.22, on alpha and s390
+    only after 2.6.22-rc1.  */
+ #if __LINUX_KERNEL_VERSION >= 0x020616 \
+--- /dev/null	2007-11-12 14:07:24.000000000 +0000
++++ sysdeps/unix/sysv/linux/fdatasync.c	2007-11-26 00:07:25.000000000 +0000
+@@ -0,0 +1,69 @@
++/* fdatasync -- synchronize at least the data part of a file with 
++   the underlying media. Linux version. 
++
++   Copyright (C) 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
++   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 <unistd.h>
++
++#include <sysdep-cancel.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++
++#include <kernel-features.h>
++
++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC
++static int __have_no_fdatasync;
++#endif
++
++static int
++do_fdatasync (int fd)
++{
++#ifdef __ASSUME_FDATASYNC
++  return INLINE_SYSCALL (fdatasync, 1, fd);
++#elif defined __NR_fdatasync
++  if (!__builtin_expect (__have_no_fdatasync, 0))
++    {
++      int result = INLINE_SYSCALL (fdatasync, 1, fd);
++      if (__builtin_expect (result, 0) != -1 || errno != ENOSYS)
++	return result;
++
++      __have_no_fdatasync = 1;
++    }
++#endif
++  return INLINE_SYSCALL (sync, 1, fd);
++}
++
++int
++__fdatasync (int fd)
++{
++  if (SINGLE_THREAD_P)
++    return do_fdatasync (fd);
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++
++  int result = do_fdatasync (fd);
++
++  LIBC_CANCEL_RESET (oldtype);
++
++  return result;
++}
++
++weak_alias (__fdatasync, fdatasync)
++
+--- sysdeps/unix/sysv/linux/syscalls.list.orig	2007-11-26 00:12:42.000000000 +0000
++++ sysdeps/unix/sysv/linux/syscalls.list	2007-11-26 00:12:51.000000000 +0000
+@@ -10,7 +10,6 @@
+ epoll_create	EXTRA	epoll_create	i:i	epoll_create
+ epoll_ctl	EXTRA	epoll_ctl	i:iiip	epoll_ctl
+ epoll_wait	EXTRA	epoll_wait	Ci:ipii	epoll_wait
+-fdatasync	-	fdatasync	Ci:i	fdatasync
+ flock		-	flock		i:ii	__flock		flock
+ fork		-	fork		i:	__libc_fork	__fork fork
+ get_kernel_syms	EXTRA	get_kernel_syms	i:p	get_kernel_syms

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2007-11-25 23:14:28 UTC (rev 2697)
+++ glibc-package/trunk/debian/patches/series	2007-11-26 00:42:52 UTC (rev 2698)
@@ -51,6 +51,7 @@
 
 alpha/local-gcc4.1.diff -p0
 alpha/local-dl-procinfo.diff -p0
+alpha/submitted-fdatasync.diff -p0
 alpha/submitted-fpu-round.diff -p0
 alpha/submitted-xstat.diff -p0
 alpha/submitted-PTR_MANGLE.diff



Reply to: