[git commit future 1/1] uClibc_stdio.h: move internal to _stdio.h and make them hidden

Khem Raj raj.khem at gmail.com
Sat Mar 19 18:51:25 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=9f99a03f6f4be7d598690abef166042dda721b33
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future

Move __stdio_mutex_init,_stdio_openlist_{use,del}_count to _stdio.h.
Make _stdio_validate_FILE hidden.
Make _stdio_openlist_{add,del}_lock hidden for non-NPTL.

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 libc/stdio/_stdio.h                           |    6 +++++-
 libc/sysdeps/linux/common/bits/uClibc_stdio.h |   15 ++++++++++-----
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h
index ec98f9e..b8f5c98 100644
--- a/libc/stdio/_stdio.h
+++ b/libc/stdio/_stdio.h
@@ -39,6 +39,9 @@
 
 
 #ifdef __UCLIBC_HAS_THREADS__
+extern void __stdio_init_mutex(__UCLIBC_MUTEX_TYPE *m) attribute_hidden;
+
+extern volatile int _stdio_openlist_use_count attribute_hidden; /* _stdio_openlist_del_lock */
 #define __STDIO_OPENLIST_INC_USE			\
 do {							\
 	__STDIO_THREADLOCK_OPENLIST_DEL;		\
@@ -51,6 +54,7 @@ extern void _stdio_openlist_dec_use(void) attribute_hidden;
 #define __STDIO_OPENLIST_DEC_USE			\
 	_stdio_openlist_dec_use()
 
+extern int _stdio_openlist_del_count attribute_hidden; /* _stdio_openlist_del_lock */
 #define __STDIO_OPENLIST_INC_DEL_CNT			\
 do {							\
 	__STDIO_THREADLOCK_OPENLIST_DEL;		\
@@ -408,7 +412,7 @@ extern int __stdio_adjust_position(FILE *__restrict stream, __offmax_t *pos) att
 #ifdef NDEBUG
 #define __STDIO_STREAM_VALIDATE(S)		((void)0)
 #else
-extern void _stdio_validate_FILE(const FILE *stream);
+extern void _stdio_validate_FILE(const FILE *stream) attribute_hidden;
 #define __STDIO_STREAM_VALIDATE(S)		_stdio_validate_FILE((S))
 #endif
 
diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
index a8cf4eb..d5a522a 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
@@ -359,14 +359,19 @@ extern void _stdio_term(void) attribute_hidden;
 extern struct __STDIO_FILE_STRUCT *_stdio_openlist;
 
 #ifdef __UCLIBC_HAS_THREADS__
-__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_add_lock);
+__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_add_lock)
+# ifndef __UCLIBC_HAS_THREADS_NATIVE__
+	attribute_hidden
+# endif
+	;
 #ifdef __STDIO_BUFFERS
-__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_del_lock);
-extern volatile int _stdio_openlist_use_count; /* _stdio_openlist_del_lock */
-extern int _stdio_openlist_del_count; /* _stdio_openlist_del_lock */
+__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_del_lock)
+# ifndef __UCLIBC_HAS_THREADS_NATIVE__
+	attribute_hidden
+# endif
+	;
 #endif
 extern int _stdio_user_locking;
-extern void __stdio_init_mutex(__UCLIBC_MUTEX_TYPE *m) attribute_hidden;
 #endif
 
 #endif
-- 
1.7.3.4



More information about the uClibc-cvs mailing list