diff options
Diffstat (limited to 'libpthread/linuxthreads/sysdeps')
7 files changed, 19 insertions, 15 deletions
diff --git a/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h b/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h index b93bc47f0..5735d0ea2 100644 --- a/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h +++ b/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h @@ -15,8 +15,8 @@ # define PT_EI __extern_always_inline #endif -static inline int -_test_and_set (int *p, int v) __THROW +static __inline__ int +_test_and_set (int *p, int v) { int result; @@ -52,7 +52,7 @@ register char * stack_pointer __asm__ ("sp"); PT_EI int __compare_and_swap(long int *p, long int oldval, long int newval) { - int result; + long int result; __asm__ __volatile__( "/* Inline compare and swap */\n" diff --git a/libpthread/linuxthreads/sysdeps/i386/pt-machine.h b/libpthread/linuxthreads/sysdeps/i386/pt-machine.h index f96452599..a4557891d 100644 --- a/libpthread/linuxthreads/sysdeps/i386/pt-machine.h +++ b/libpthread/linuxthreads/sysdeps/i386/pt-machine.h @@ -32,10 +32,9 @@ # define PT_EI __extern_always_inline #endif -/* extern long int testandset (int *spinlock); extern int __compare_and_swap (long int *p, long int oldval, long int newval); -*/ + /* Get some notion of the current stack. Need not be exactly the top of the stack, just something somewhere in the current frame. */ #define CURRENT_STACK_FRAME __builtin_frame_address (0) diff --git a/libpthread/linuxthreads/sysdeps/mips/pspinlock.c b/libpthread/linuxthreads/sysdeps/mips/pspinlock.c index a106c0f77..4d6617e1b 100644 --- a/libpthread/linuxthreads/sysdeps/mips/pspinlock.c +++ b/libpthread/linuxthreads/sysdeps/mips/pspinlock.c @@ -23,8 +23,6 @@ #include <sys/tas.h> #include "internals.h" -#include <sgidefs.h> - /* This implementation is similar to the one used in the Linux kernel. */ int __pthread_spin_lock (pthread_spinlock_t *lock) diff --git a/libpthread/linuxthreads/sysdeps/pthread/kernel-features.h b/libpthread/linuxthreads/sysdeps/pthread/kernel-features.h index 424922ec0..88a71828b 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/kernel-features.h +++ b/libpthread/linuxthreads/sysdeps/pthread/kernel-features.h @@ -62,6 +62,14 @@ # define __ASSUME_VFORK_SYSCALL 1 #endif +/* Starting with version 2.6.4-rc1 the getdents syscall returns d_type + * information as well and in between 2.6.5 and 2.6.8 most compat wrappers + * were fixed too. Except s390{,x} which was fixed in 2.6.11. */ +#if (__LINUX_KERNEL_VERSION >= 0x020608 && !defined __s390__) \ + || (__LINUX_KERNEL_VERSION >= 0x02060b && defined __s390__) +# define __ASSUME_GETDENTS32_D_TYPE 1 +#endif + /* These features were surely available with 2.4.12. */ #if __LINUX_KERNEL_VERSION >= 132108 && defined __mc68000__ # define __ASSUME_MMAP2_SYSCALL 1 diff --git a/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h index 92619e5b4..e5c577ffb 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h +++ b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h @@ -42,8 +42,6 @@ extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); /* Use a funky version in a probably vein attempt at preventing gdb * from dlopen()'ing glibc's libthread_db library... */ -#define STRINGIFY(s) STRINGIFY2 (s) -#define STRINGIFY2(s) #s -#define VERSION STRINGIFY(__UCLIBC_MAJOR__) "." STRINGIFY(__UCLIBC_MINOR__) "." STRINGIFY(__UCLIBC_SUBLEVEL__) +#define VERSION __stringify(__UCLIBC_MAJOR__) "." __stringify(__UCLIBC_MINOR__) "." __stringify(__UCLIBC_SUBLEVEL__) #endif diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h index f62f7d6e9..a3f303ca3 100644 --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h @@ -19,7 +19,7 @@ #include <limits.h> -extern inline int __libc_use_alloca (size_t size) +__extern_always_inline int __libc_use_alloca (size_t size) { return (__builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) || __libc_alloca_cutoff (size)); diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S index f230c0122..e933eefde 100644 --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S @@ -19,6 +19,7 @@ #include <sysdep-cancel.h> #define _ERRNO_H 1 #include <bits/errno.h> +#include <sys/syscall.h> /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -39,12 +40,12 @@ ENTRY (__vfork) bf .Lhidden_fork mov.w .L1, r3 - trapa #0x10 + trapa #__SH_SYSCALL_TRAP_BASE mov r0, r1 mov #-12, r2 shad r2, r1 - not r1, r1 // r1=0 means r0 = -1 to -4095 - tst r1, r1 // i.e. error in linux + not r1, r1 /* r1=0 means r0 = -1 to -4095 */ + tst r1, r1 /* i.e. error in linux */ bf .Lpseudo_end SYSCALL_ERROR_HANDLER .Lpseudo_end: @@ -63,7 +64,7 @@ ENTRY (__vfork) .long pthread_create #endif -.Lhidden_fork: +.Lhidden_fork: mov.l .L2, r1 braf r1 nop |