From 0c4edf0c7b734e3f9fc7180b997507b99d00d282 Mon Sep 17 00:00:00 2001
From: Peter S. Mazinger <ps.m@gmx.net>
Date: Sat, 19 Mar 2011 15:06:06 +0100
Subject: [PATCH 122/396] stdio.h: move uClibc specific parts to the common place for these changes

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

diff --git a/include/stdio.h b/include/stdio.h
index 87160c6..3c64a5b 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -494,11 +494,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
@@ -553,11 +548,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.  */
 
 
@@ -909,6 +899,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.0.4

