about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-08-01 20:49:45 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-08-01 20:49:45 +0000
commita9f1039f0a6a3b5e453107ae2e4c5deff0926ea6 (patch)
tree50eb75e4f72ef6e2948166f5135db3e3fd1f238a /sysdeps
parent5d9eaeecb451dc85479c1905d41a0b41c6d8b1d0 (diff)
downloadglibc-a9f1039f0a6a3b5e453107ae2e4c5deff0926ea6.tar.gz
glibc-a9f1039f0a6a3b5e453107ae2e4c5deff0926ea6.tar.xz
glibc-a9f1039f0a6a3b5e453107ae2e4c5deff0926ea6.zip
Remove __ASSUME_VFORK_SYSCALL (and some __NR_vfork conditionals).
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/i386/vfork.S23
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h11
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S26
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S23
4 files changed, 2 insertions, 81 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/vfork.S b/sysdeps/unix/sysv/linux/i386/vfork.S
index a8a7e45670..11c530de5f 100644
--- a/sysdeps/unix/sysv/linux/i386/vfork.S
+++ b/sysdeps/unix/sysv/linux/i386/vfork.S
@@ -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)
 
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index cfe335d0bd..7357165618 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -100,12 +100,6 @@
    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__
@@ -118,11 +112,6 @@
 # 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.
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
index 6625e207a9..ca20f7bebd 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
@@ -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
@@ -26,32 +26,8 @@
    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)
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
index 7baefd0c16..3ce38be884 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
@@ -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
@@ -27,29 +27,8 @@
 
 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)