diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-19 18:06:15 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:29 +0200 |
commit | 0849f6008742424ff64d36d01c096de958dc1964 (patch) | |
tree | eec6eb742b89a35aaa7a21814ed4b105f22f1e23 /libc/sysdeps/linux | |
parent | c206e4fc49303c5f8ff8cf05927e395c7c7dfa24 (diff) |
uClibc_stdio.h: guard internals with _LIBC
Provide __UCLIBC_IO_MUTEX for the installed version
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r-- | libc/sysdeps/linux/common/bits/uClibc_stdio.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h index 2641431a3..c0c3e561c 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h +++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h @@ -78,6 +78,7 @@ #define __STDIO_PUTC_MACRO #endif +#ifdef _LIBC /**********************************************************************/ #include <bits/uClibc_mutex.h> @@ -132,6 +133,8 @@ #endif #endif +#endif /* _LIBC */ + /**********************************************************************/ #define __STDIO_IOFBF 0 /* Fully buffered. */ @@ -187,7 +190,7 @@ typedef struct { __io_close_fn *close; } _IO_cookie_io_functions_t; -#if defined(_LIBC) || defined(_GNU_SOURCE) +#ifdef __USE_GNU typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; @@ -201,6 +204,16 @@ typedef _IO_cookie_io_functions_t cookie_io_functions_t; #endif /**********************************************************************/ +#if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_IO_MUTEX +# ifdef __UCLIBC_HAS_THREADS_NATIVE__ +# include <bits/stdio-lock.h> +# define __UCLIBC_IO_MUTEX(M) _IO_lock_t M +# else +# include <bits/pthreadtypes.h> +# define __UCLIBC_IO_MUTEX(M) pthread_mutex_t M +# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */ +#endif + struct __STDIO_FILE_STRUCT { unsigned short __modeflags; /* There could be a hole here, but modeflags is used most.*/ |