]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove __ASSUME_VFORK_SYSCALL (and some __NR_vfork conditionals).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 1 Aug 2012 20:49:45 +0000 (20:49 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 1 Aug 2012 20:49:45 +0000 (20:49 +0000)
ChangeLog
ports/ChangeLog.arm
ports/ChangeLog.m68k
ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
ports/sysdeps/unix/sysv/linux/m68k/vfork.S
sysdeps/unix/sysv/linux/i386/vfork.S
sysdeps/unix/sysv/linux/kernel-features.h
sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S

index 67d9b3920a02a7b5348e5c85c5e32c45766c06ef..6d7aefe43d3f4097026874afa6ceac5824ccf534 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2012-08-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/kernel-features.h
+       (__ASSUME_VFORK_SYSCALL): Remove all definitions.
+       * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork) [__NR_vfork]:
+       Make code unconditional.
+       (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+       (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork)
+       [__NR_vfork]: Make code unconditional.
+       (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+       (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork)
+       [__NR_vfork]: Make code unconditional.
+       (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+       (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+
 2012-08-01  Roland McGrath  <roland@hack.frob.com>
 
        * sysdeps/generic/sys/param.h (NGROUPS): Define only if [NGROUPS_MAX].
index bbf9c681275fa8eccec37c22b0485aff65c35c04..d7d9f4ce510cd3a18d4620b931f8478ab30ac6e9 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/arm/kernel-features.h
+       (__ASSUME_VFORK_SYSCALL): Remove.
+
 2012-08-01  Roland McGrath  <roland@hack.frob.com>
 
        * sysdeps/arm/dl-machine.h (CLEAR_CACHE): Don't define it.
index 84260c0d6b53c0f13b12b3080d26b9cce5a4aaf2..993ba7fd283f2c3dff07d1592b28cddc87eed1e6 100644 (file)
@@ -1,3 +1,12 @@
+2012-08-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+       (__ASSUME_VFORK_SYSCALL): Remove.
+       * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork) [__NR_vfork]:
+       Make code unconditional.
+       (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+       (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+
 2012-08-01  Roland McGrath  <roland@hack.frob.com>
 
        [BZ #14138]
index 9092df7192c0000571ec95e19efdd05c91214af5..0ab5df094e2d89787f6e7d9e00f56a9898c4f383 100644 (file)
@@ -30,9 +30,6 @@
 /* Arm got fcntl64 in 2.4.4.  */
 #define __ASSUME_FCNTL64               1
 
-/* The vfork syscall on arm was definitely available in 2.4.  */
-#define __ASSUME_VFORK_SYSCALL         1
-
 /* The signal frame layout changed in 2.6.18.  */
 #if __LINUX_KERNEL_VERSION >= 132626
 # define __ASSUME_SIGFRAME_V2  1
index 3b0b441aa4dd61a0a6dfef635e8fe8bf21e234da..05d06b2555fe29b8751887ffe33424907e67391b 100644 (file)
@@ -21,7 +21,6 @@
 #define __ASSUME_MMAP2_SYSCALL         1
 #define __ASSUME_STAT64_SYSCALL        1
 #define __ASSUME_FCNTL64               1
-#define __ASSUME_VFORK_SYSCALL         1
 
 /* Many syscalls were added in 2.6.10 for m68k.  */
 #if __LINUX_KERNEL_VERSION >= 132618
index 24e0c9037c1eeb942f111767fe26a7d0b1391bc5..d3e20d40670e5115f58a7dce10725abdc9277b0f 100644 (file)
@@ -36,8 +36,6 @@
 
 ENTRY (__vfork)
 
-#ifdef __NR_vfork
-
        /* SAVE_PID clobbers call-clobbered registers and
           saves data in D1 and A1.  */
 
@@ -66,27 +64,8 @@ ENTRY (__vfork)
        cfi_adjust_cfa_offset (4)
        cfi_rel_offset (%pc, 0)
 
-# ifdef __ASSUME_VFORK_SYSCALL
-#  ifndef PIC
+#ifndef PIC
        jbra    SYSCALL_ERROR_LABEL
-#  endif
-# else
-       /* Check if vfork syscall is known at all.  */
-       movel   #-ENOSYS,%d1
-       cmpl    %d0,%d1
-       jne     SYSCALL_ERROR_LABEL
-
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
-       /* If we don't have vfork, fork is close enough.  */
-
-       movel   #SYS_ify (fork), %d0
-       trap    #0
-       tstl    %d0
-       jmi     SYSCALL_ERROR_LABEL
-       rts
 #endif
 
 PSEUDO_END (__vfork)
index a8a7e45670a9e07bff14b669e277f2c65571989b..11c530de5fbde6e39cb626f1129e35fe063c1016 100644 (file)
@@ -28,8 +28,6 @@
 
 ENTRY (__vfork)
 
-#ifdef __NR_vfork
-
        /* Pop the return PC value into ECX.  */
        popl    %ecx
        cfi_adjust_cfa_offset (-4)
@@ -55,31 +53,10 @@ ENTRY (__vfork)
 
        cmpl    $-4095, %eax
        /* Branch forward if it failed.  */
-# ifdef __ASSUME_VFORK_SYSCALL
        jae     SYSCALL_ERROR_LABEL
-# else
-       jae     .Lerror
-# endif
 
        ret
 
-# ifndef __ASSUME_VFORK_SYSCALL
-.Lerror:
-       /* Check if vfork syscall is known at all.  */
-       cmpl    $-ENOSYS, %eax
-       jne     SYSCALL_ERROR_LABEL
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
-       /* If we don't have vfork, fork is close enough.  */
-
-       movl    $SYS_ify (fork), %eax
-       int     $0x80
-       cmpl    $-4095, %eax
-       jae     SYSCALL_ERROR_LABEL
-       ret
-#endif
 PSEUDO_END (__vfork)
 libc_hidden_def (__vfork)
 
index cfe335d0bd53939955d44d36e969a96fb024af3a..7357165618d598c30aecf5c7c161645b9b0b11c5 100644 (file)
    MIPS n32).  */
 #define __ASSUME_GETDENTS64_SYSCALL    1
 
-/* Starting with 2.4.5 kernels the vfork syscall made it into the
-   official kernel for PPC.  */
-#ifdef __powerpc__
-# define __ASSUME_VFORK_SYSCALL                1
-#endif
-
 /* Starting with 2.4.5 kernels the mmap2 syscall made it into the official
    kernel.  But PowerPC64 does not support a separate MMAP2 call.  */
 #if defined __powerpc__ && !defined __powerpc64__
 # define __ASSUME_SET_THREAD_AREA_SYSCALL      1
 #endif
 
-/* The vfork syscall on x86 and arm was definitely available in 2.4.  */
-#ifdef __i386__
-# define __ASSUME_VFORK_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.
index 6625e207a96de44ef1b73844186b71c4b6f7a8e9..ca20f7bebd0c3054b9666c04d1b839faac8794ed 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 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
    and the process ID of the new process to the old process.  */
 
 ENTRY (__vfork)
-
-#ifdef __NR_vfork
-
        DO_CALL (SYS_ify (vfork))
-
-# ifdef __ASSUME_VFORK_SYSCALL
        PSEUDO_RET
-# else
-       bnslr+
-       /* Check if vfork syscall is known at all.  */
-       cmpwi   r3,ENOSYS
-       bne-    .Lsyscall_error
-
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
-       /* If we don't have vfork, fork is close enough.  */
-
-       DO_CALL (SYS_ify (fork))
-       bnslr+
-
-.Lsyscall_error:
-       b       __syscall_error@local
-#endif
-
 PSEUDO_END (__vfork)
 libc_hidden_def (__vfork)
 
index 7baefd0c16e8e7bec5eb69c2078eabee21af20af..3ce38be8849a0c2809205279cabe9a1aa45601c7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 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
 
 ENTRY (__vfork)
        CALL_MCOUNT 0
-
-#ifdef __NR_vfork
-
        DO_CALL (SYS_ify (vfork))
-
-# ifdef __ASSUME_VFORK_SYSCALL
-       PSEUDO_RET
-# else
-       bnslr+
-       /* Check if vfork syscall is known at all.  */
-       cmpdi   r3,ENOSYS
-       bne     .Local_syscall_error
-
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
-       /* If we don't have vfork, fork is close enough.  */
-
-       DO_CALL (SYS_ify (fork))
        PSEUDO_RET
-#endif
-
 PSEUDO_END (__vfork)
 libc_hidden_def (__vfork)