Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 19 Dec 2002 08:41:52 +0000 (08:41 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 19 Dec 2002 08:41:52 +0000 (08:41 +0000)
2002-12-19  Ulrich Drepper  <drepper@redhat.com>

* sysdeps/unix/sysv/linux/i386/system.c: Define FORK only if
__ASSUME_CLONE_THREAD_FLAGS is defined.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_CLONE_THREAD_FLAGS): Define for x86 and kernel >=
2.5.50.

* sysdeps/unix/sysv/linux/i386/brk.c: Use INTERNAL_SYSCALL instead
of asm.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.

ChangeLog
sysdeps/unix/sysv/linux/i386/system.c
sysdeps/unix/sysv/linux/kernel-features.h

index 058e0ef..be2b655 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
+2002-12-19  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/i386/system.c: Define FORK only if
+       __ASSUME_CLONE_THREAD_FLAGS is defined.
+       * sysdeps/unix/sysv/linux/kernel-features.h
+       (__ASSUME_CLONE_THREAD_FLAGS): Define for x86 and kernel >=
+       2.5.50.
+
 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/i386/brk.c: Use INTERNAL_SYSCALL instead
+       of asm.
+       * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
+
        * elf/dl-support.c [NEED_DL_SYSINFO]: Define and initialize
        _dl_sysinfo.
        [DL_SYSINFO_IMPLEMENTATION]: If defined use it to generate the needed
index 1107fd6..aa33471 100644 (file)
@@ -22,6 +22,7 @@
 #include <unistd.h>
 #include <sys/wait.h>
 #include <bits/libc-lock.h>
+#include <kernel-features.h>
 
 /* We have to and actually can handle cancelable system().  The big
    problem: we have to kill the child process if necessary.  To do
    return.  It might still be in the kernel when the cancellation
    request comes.  Therefore we have to use the clone() calls ability
    to have the kernel write the PID into the user-level variable.  */
-#define FORK() \
+#ifdef __ASSUME_CLONE_THREAD_FLAGS
+# define FORK() \
   INLINE_SYSCALL (clone, 3, CLONE_PARENT_SETTID | SIGCHLD, 0, &pid)
+#endif
 
 static void cancel_handler (void *arg);
 
index 0796a8a..c84305c 100644 (file)
 # define __ASSUME_FCNTL64              1
 # define __ASSUME_GETDENTS64_SYSCALL   1
 #endif
+
+/* The late 2.5 kernels saw a lot of new CLONE_* flags.  Summarize
+   their availability with one define.  The changes were made first
+   for i386 and the have to be done separately for the other archs.
+   For i386 we pick 2.5.50 as the first version with support.  */
+#if __LINUX_KERNEL_VERSION >= 132432
+# define __ASSUME_CLONE_THREAD_FLAGS   1
+#endif