[git commit future 1/1] stdio.h: move uClibc specific parts to the common place for these changes

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


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

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 include/stdio.h |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index 0c00277..f542ddc 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -492,11 +492,6 @@ extern int getc_unlocked (FILE *__stream);
 libc_hidden_proto(getc_unlocked)
 extern int getchar_unlocked (void);
 libc_hidden_proto(getchar_unlocked)
-
-# ifdef __UCLIBC__
-/* SUSv3 allows getc_unlocked to be a macro */
-#  define getc_unlocked(_fp) __GETC_UNLOCKED(_fp)
-# endif
 #endif /* Use POSIX or MISC.  */
 
 #ifdef __USE_MISC
@@ -551,11 +546,6 @@ extern int fputc_unlocked (int __c, FILE *__stream);
    marked with __THROW.  */
 extern int putc_unlocked (int __c, FILE *__stream);
 extern int putchar_unlocked (int __c);
-
-# ifdef __UCLIBC__
-/* SUSv3 allows putc_unlocked to be a macro */
-#  define putc_unlocked(_ch, _fp) __PUTC_UNLOCKED(_ch, _fp)
-# endif
 #endif /* Use POSIX or MISC.  */
 
 
@@ -907,6 +897,13 @@ extern void funlockfile (FILE *__stream) __THROW;
 #define fgetc(_fp)                   __FGETC(_fp)
 #define fputc(_ch, _fp)              __FPUTC(_ch, _fp)
 
+#if defined __USE_POSIX || defined __USE_MISC
+/* SUSv3 allows getc_unlocked to be a macro */
+#define getc_unlocked(_fp) __GETC_UNLOCKED(_fp)
+/* SUSv3 allows putc_unlocked to be a macro */
+#define putc_unlocked(_ch, _fp) __PUTC_UNLOCKED(_ch, _fp)
+#endif
+
 #ifdef __USE_MISC
 #define fgetc_unlocked(_fp)          __FGETC_UNLOCKED(_fp)
 #define fputc_unlocked(_ch, _fp)     __FPUTC_UNLOCKED(_ch, _fp)
-- 
1.7.3.4



More information about the uClibc-cvs mailing list