From 0a043c30ee71245dfe7c9d82d654312c5e1f6127 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 16 Apr 2011 15:40:50 +0200 Subject: vfork: make all archs consistent __vfork is hidden. __GI_vfork is strong (not weak as it was). vfork is weak. e1 can use the generic version. Note: libc_hidden_def(x) has different meaning in .c and .S files. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/vfork.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'libc/sysdeps/linux/common') diff --git a/libc/sysdeps/linux/common/vfork.c b/libc/sysdeps/linux/common/vfork.c index e7c920892..a70ed4a63 100644 --- a/libc/sysdeps/linux/common/vfork.c +++ b/libc/sysdeps/linux/common/vfork.c @@ -4,30 +4,22 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ -#include -#include #include +#if (defined __NR_vfork || (defined __ARCH_USE_MMU__ && defined __NR_fork)) && (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) +# include extern __typeof(vfork) __vfork attribute_hidden; -#ifdef __NR_vfork - -# define __NR___vfork __NR_vfork +# ifdef __NR_vfork +# define __NR___vfork __NR_vfork _syscall0(pid_t, __vfork) - -weak_alias(__vfork,vfork) -libc_hidden_weak(vfork) - -#elif defined __ARCH_USE_MMU__ && defined __NR_fork - +# else /* Trivial implementation for arches that lack vfork */ - pid_t __vfork(void) { return fork(); } - -weak_alias(__vfork,vfork) +# endif +strong_alias(__vfork,vfork) libc_hidden_weak(vfork) - #endif -- cgit v1.2.3