OSDN Git Service

Revert "sparc: disable cancellable system, as it fails in strange ways right now"
authorWaldemar Brodkorb <wbx@openadk.org>
Thu, 28 Aug 2014 10:31:20 +0000 (12:31 +0200)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 28 Aug 2014 10:38:34 +0000 (12:38 +0200)
This reverts commit 1db4f8f8389f6a935ecd83aff7fcce5d1cf2c0f3.

It is unclear in which way this is breaking sparc systems.
With this change added you get following linking error:
libpthread/nptl/libpthread_so.a(pt-system.oS): In function `__libc_system':
libc/stdlib/system.c:64: undefined reference to `__wait4_nocancel'

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/stdlib/system.c

index 151a229..8c5d25d 100644 (file)
 #include <sysdep-cancel.h>
 #endif
 
-extern __typeof(system) __libc_system;
-
-/* TODO: the cancellable version breaks on sparc currently,
- * need to figure out why still
- */
-#if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__
+#if !defined __UCLIBC_HAS_THREADS_NATIVE__
+/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
+#include <sys/syscall.h>
+#ifndef __NR_vfork
+# define vfork fork
+#endif
 
+extern __typeof(system) __libc_system;
 int __libc_system(const char *command)
 {
        int wait_val, pid;