From 75f9a2b1874f3c50727c6b91fd5b5735a2a5deb3 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Tue, 9 Aug 2005 05:50:49 +0000 Subject: In reality, the futex support that was originally added was only for STDIO operations internal to libc. The futexes should not be visible to anything other than libc. These changes clean up futex and STDIO. --- libc/sysdeps/linux/common/bits/errno.h | 4 +++- libc/sysdeps/linux/common/bits/uClibc_stdio.h | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps/linux/common') diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h index cb9c2ee43..bf73a8fe1 100644 --- a/libc/sysdeps/linux/common/bits/errno.h +++ b/libc/sysdeps/linux/common/bits/errno.h @@ -39,7 +39,9 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); # if defined _LIBC /* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) ((errno) = (val)) +# ifndef __set_errno +# define __set_errno(val) ((errno) = (val)) +# endif # endif /* _LIBC */ # if defined __UCLIBC_HAS_THREADS__ diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h index e378489a4..18ec2beca 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h +++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h @@ -119,7 +119,7 @@ #ifdef __UCLIBC_HAS_THREADS__ /* Need this for pthread_mutex_t. */ #include -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ #include #endif @@ -137,7 +137,7 @@ #define __STDIO_AUTO_THREADLOCK_VAR int __infunc_user_locking -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ #define __STDIO_SET_USER_LOCKING(__stream) ((__stream)->__user_locking = 1) @@ -313,7 +313,7 @@ struct __STDIO_FILE_STRUCT { #endif #ifdef __UCLIBC_HAS_THREADS__ int __user_locking; -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ _IO_lock_t _lock; #else pthread_mutex_t __lock; @@ -392,7 +392,7 @@ extern void _stdio_term(void); extern struct __STDIO_FILE_STRUCT *_stdio_openlist; #ifdef __UCLIBC_HAS_THREADS__ -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ extern _IO_lock_t _stdio_openlist_lock; #else extern pthread_mutex_t _stdio_openlist_lock; -- cgit v1.2.3