r3699 - in glibc-package/trunk/debian: . patches patches/any
Author: aurel32
Date: 2009-07-26 23:07:28 +0000 (Sun, 26 Jul 2009)
New Revision: 3699
Added:
glibc-package/trunk/debian/patches/any/cvs-signalfd-eventfd.diff
Removed:
glibc-package/trunk/debian/patches/any/submitted-signalfd-eventfd.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* Replace any/submitted-signalfd-eventfd.diff by upstream version
any/cvs-signalfd-eventfd.diff.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2009-07-26 22:03:59 UTC (rev 3698)
+++ glibc-package/trunk/debian/changelog 2009-07-26 23:07:28 UTC (rev 3699)
@@ -17,6 +17,8 @@
* Update any/cvs-broken-dns.diff from upstream.
* any/cvs-pthread_mutex_lock.diff: new patch from upstream to fix
a memory ordering problem in pthread_mutex_{,timed}lock.
+ * Replace any/submitted-signalfd-eventfd.diff by upstream version
+ any/cvs-signalfd-eventfd.diff.
-- Aurelien Jarno <aurel32@debian.org> Mon, 27 Jul 2009 00:01:57 +0200
Added: glibc-package/trunk/debian/patches/any/cvs-signalfd-eventfd.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-signalfd-eventfd.diff (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-signalfd-eventfd.diff 2009-07-26 23:07:28 UTC (rev 3699)
@@ -0,0 +1,100 @@
+2009-07-26 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #10422]
+ * sysdeps/unix/sysv/linux/eventfd.c: Add compatibility for old
+ kernels, dropped when eventfd2 support was added.
+ * sysdeps/unix/sysv/linux/signalfd.c: Add compatibility for old
+ kernels, dropped when signalfd4 support was added.
+ * sysdeps/unix/sysv/linux/kernel-features.h: More CLOEXEC syscalls
+ added, name them.
+
+--- a/sysdeps/unix/sysv/linux/eventfd.c
++++ b/sysdeps/unix/sysv/linux/eventfd.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 2007, 2008, 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
+@@ -19,14 +19,21 @@
+ #include <errno.h>
+ #include <sys/eventfd.h>
+ #include <sysdep.h>
++#include <kernel-features.h>
+
+
+ int
+ eventfd (int count, int flags)
+ {
+ #ifdef __NR_eventfd2
+- return INLINE_SYSCALL (eventfd2, 2, count, flags);
+-#else
++ int res = INLINE_SYSCALL (eventfd2, 2, count, flags);
++# ifndef __ASSUME_EVENTFD2
++ if (res != -1 || errno != ENOSYS)
++# endif
++ return res;
++#endif
++
++#ifndef __ASSUME_EVENTFD2
+ /* The old system call has no flag parameter which is bad. So we have
+ to wait until we have to support to pass additional values to the
+ kernel (sys_indirect) before implementing setting flags like
+@@ -43,5 +50,7 @@ eventfd (int count, int flags)
+ __set_errno (ENOSYS);
+ return -1;
+ # endif
++#elif !defined __NR_eventfd2
++# error "__ASSUME_EVENTFD2 defined but not __NR_eventfd2"
+ #endif
+ }
+--- a/sysdeps/unix/sysv/linux/kernel-features.h
++++ b/sysdeps/unix/sysv/linux/kernel-features.h
+@@ -528,4 +528,6 @@
+ # define __ASSUME_IN_NONBLOCK 1
+ # define __ASSUME_PIPE2 1
+ # define __ASSUME_PACCEPT 1
++# define __ASSUME_EVENTFD2 1
++# define __ASSUME_SIGNALFD4 1
+ #endif
+
+--- a/sysdeps/unix/sysv/linux/signalfd.c
++++ b/sysdeps/unix/sysv/linux/signalfd.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 2007, 2008, 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
+@@ -20,14 +20,21 @@
+ #include <signal.h>
+ #include <sys/signalfd.h>
+ #include <sysdep.h>
++#include <kernel-features.h>
+
+
+ int
+ signalfd (int fd, const sigset_t *mask, int flags)
+ {
+ #ifdef __NR_signalfd4
+- return INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, flags);
+-#else
++ int res = INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, flags);
++# ifndef __ASSUME_SIGNALFD4
++ if (res != -1 || errno != ENOSYS)
++# endif
++ return res;
++#endif
++
++#ifndef __ASSUME_SIGNALFD4
+ /* The old system call has no flag parameter which is bad. So we have
+ to wait until we have to support to pass additional values to the
+ kernel (sys_indirect) before implementing setting flags like
+@@ -44,5 +51,7 @@ signalfd (int fd, const sigset_t *mask, int flags)
+ __set_errno (ENOSYS);
+ return -1;
+ # endif
++#elif !defined __NR_signalfd4
++# error "__ASSUME_SIGNALFD4 defined but not __NR_signalfd4"
+ #endif
+ }
Deleted: glibc-package/trunk/debian/patches/any/submitted-signalfd-eventfd.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-signalfd-eventfd.diff 2009-07-26 22:03:59 UTC (rev 3698)
+++ glibc-package/trunk/debian/patches/any/submitted-signalfd-eventfd.diff 2009-07-26 23:07:28 UTC (rev 3699)
@@ -1,162 +0,0 @@
-2009-07-20 Aurelien Jarno <aurelien@aurel32.net>
-
- * sysdeps/unix/sysv/linux/kernel-features.h: Define
- __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
- * sysdeps/unix/sysv/linux/eventfd.c: Fall back to the old syscall
- in case the signalfd4 syscall is not available.
- * sysdeps/unix/sysv/linux/signalfd.c: Fall back to the old syscall
- in case the eventfd2 syscall is not available.
-
---- a/sysdeps/unix/sysv/linux/eventfd.c
-+++ b/sysdeps/unix/sysv/linux/eventfd.c
-@@ -19,14 +19,20 @@
- #include <errno.h>
- #include <sys/eventfd.h>
- #include <sysdep.h>
-+#include <kernel-features.h>
-
-
- int
- eventfd (int count, int flags)
- {
- #ifdef __NR_eventfd2
-- return INLINE_SYSCALL (eventfd2, 2, count, flags);
--#else
-+ int res = INLINE_SYSCALL (eventfd2, 2, count, flags);
-+# ifndef __ASSUME_EVENTFD2
-+ if (res != -1 || errno != ENOSYS)
-+# endif
-+ return res;
-+#endif
-+
- /* The old system call has no flag parameter which is bad. So we have
- to wait until we have to support to pass additional values to the
- kernel (sys_indirect) before implementing setting flags like
-@@ -37,11 +43,10 @@ eventfd (int count, int flags)
- return -1;
- }
-
--# ifdef __NR_eventfd
-+#ifdef __NR_eventfd
- return INLINE_SYSCALL (eventfd, 1, count);
--# else
-+#else
- __set_errno (ENOSYS);
- return -1;
--# endif
- #endif
- }
---- a/sysdeps/unix/sysv/linux/kernel-features.h
-+++ b/sysdeps/unix/sysv/linux/kernel-features.h
-@@ -529,3 +529,12 @@
- # define __ASSUME_PIPE2 1
- # define __ASSUME_PACCEPT 1
- #endif
-+
-+/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */
-+#if __LINUX_KERNEL_VERSION >= 0x02061b \
-+ && (defined __i386__ || defined __x86_64__ || defined __ia64__ \
-+ || defined __powerpc__ || defined __s390__ || defined __sparc__ \
-+ || defined __sh__)
-+# define __ASSUME_EVENTFD2 1
-+# define __ASSUME_SIGNALFD4 1
-+#endif
---- a/sysdeps/unix/sysv/linux/signalfd.c
-+++ b/sysdeps/unix/sysv/linux/signalfd.c
-@@ -20,14 +20,20 @@
- #include <signal.h>
- #include <sys/signalfd.h>
- #include <sysdep.h>
-+#include <kernel-features.h>
-
-
- int
- signalfd (int fd, const sigset_t *mask, int flags)
- {
- #ifdef __NR_signalfd4
-- return INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, flags);
--#else
-+ int res = INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, flags);
-+# ifndef __ASSUME_SIGNALFD4
-+ if (res != -1 || errno != ENOSYS)
-+# endif
-+ return res;
-+#endif
-+
- /* The old system call has no flag parameter which is bad. So we have
- to wait until we have to support to pass additional values to the
- kernel (sys_indirect) before implementing setting flags like
-@@ -38,11 +44,10 @@ signalfd (int fd, const sigset_t *mask, int flags)
- return -1;
- }
-
--# ifdef __NR_signalfd
-+#ifdef __NR_signalfd
- return INLINE_SYSCALL (signalfd, 3, fd, mask, _NSIG / 8);
--# else
-+#else
- __set_errno (ENOSYS);
- return -1;
--# endif
- #endif
- }
-2009-07-20 Aurelien Jarno <aurelien@aurel32.net>
-
- * sysdeps/unix/sysv/linux/arm/kernel-features.h: Define
- __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
-
---- a/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
-+++ b/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
-@@ -61,6 +61,12 @@
- # define __ASSUME_FUTEX_LOCK_PI 1
- #endif
-
-+/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */
-+#if __LINUX_KERNEL_VERSION >= 0x02061b
-+# define __ASSUME_EVENTFD2 1
-+# define __ASSUME_SIGNALFD4 1
-+#endif
-+
- #include_next <kernel-features.h>
-
- /* These syscalls are not implemented yet for ARM. */
-
-
-2009-07-20 Aurelien Jarno <aurelien@aurel32.net>
-
- * sysdeps/unix/sysv/linux/hppa/kernel-features.h: Define
- __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
-
---- a/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
-+++ b/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
-@@ -46,4 +46,10 @@
- # define __ASSUME_FUTEX_LOCK_PI 1
- #endif
-
-+/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.28. */
-+#if __LINUX_KERNEL_VERSION >= 0x02061c
-+# define __ASSUME_EVENTFD2 1
-+# define __ASSUME_SIGNALFD4 1
-+#endif
-+
- #include_next <kernel-features.h>
-
-
-2009-07-20 Aurelien Jarno <aurelien@aurel32.net>
-
- * sysdeps/unix/sysv/linux/mips/kernel-features.h: Define
- __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
-
---- a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
-+++ b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
-@@ -42,4 +42,10 @@
- # define __ASSUME_FUTEX_LOCK_PI 1
- #endif
-
-+/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */
-+#if __LINUX_KERNEL_VERSION >= 0x02061c
-+# define __ASSUME_EVENTFD2 1
-+# define __ASSUME_SIGNALFD4 1
-+#endif
-+
- #include_next <kernel-features.h>
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2009-07-26 22:03:59 UTC (rev 3698)
+++ glibc-package/trunk/debian/patches/series 2009-07-26 23:07:28 UTC (rev 3699)
@@ -213,6 +213,6 @@
any/local-revert-3270.diff
any/cvs-sunrpc-license.diff
any/submitted-tst-cpucount.diff
-any/submitted-signalfd-eventfd.diff
any/cvs-getaddrinfo-nss-notfound.diff
any/cvs-pthread_mutex_lock.diff
+any/cvs-signalfd-eventfd.diff
Reply to: