Forráskód Böngészése

drop support for old systems lacking vfork

Only really old systems (<=linux-2.0) lack a dedicated vfork system call.
The code that is in place to support them is causing issues with newer
arches that also don't provide a vfork system call -- instead, they do
vfork by calling clone in userspace.

If anyone cares about these really old systems, they can submit a patch
to make the system work with them while not breaking newer systems.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mark Salter 12 éve
szülő
commit
036daaa8e1
3 módosított fájl, 0 hozzáadás és 20 törlés
  1. 0 9
      libc/stdio/popen.c
  2. 0 5
      libc/stdlib/system.c
  3. 0 6
      libc/stdlib/unix_grantpt.c

+ 0 - 9
libc/stdio/popen.c

@@ -26,15 +26,6 @@
 #warning "hmm... susv3 says Pipe streams are byte-oriented."
 #endif /* __UCLIBC_MJN3_ONLY__ */
 
-
-/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
-#include <sys/syscall.h>
-#if ! defined __NR_vfork
-# define vfork fork
-# define VFORK_LOCK		((void) 0)
-# define VFORK_UNLOCK		((void) 0)
-#endif
-
 #ifndef VFORK_LOCK
 __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
 # define VFORK_LOCK		__UCLIBC_MUTEX_LOCK(mylock)

+ 0 - 5
libc/stdlib/system.c

@@ -24,11 +24,6 @@ extern __typeof(system) __libc_system;
  * need to figure out why still
  */
 #if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__
-/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
-#include <sys/syscall.h>
-#ifndef __NR_vfork
-# define vfork fork
-#endif
 
 int __libc_system(const char *command)
 {

+ 0 - 6
libc/stdlib/unix_grantpt.c

@@ -31,12 +31,6 @@
 #include "pty-private.h"
 
 
-/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
-#include <sys/syscall.h>
-#if ! defined __NR_vfork
-#define vfork fork
-#endif
-
 /* Return the result of ptsname_r in the buffer pointed to by PTS,
    which should be of length BUF_LEN.  If it is too long to fit in
    this buffer, a sufficiently long buffer is allocated using malloc,