aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libio/bits/stdio.h5
-rw-r--r--libio/stdio.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/libio/bits/stdio.h b/libio/bits/stdio.h
index df57e7c..0c60296 100644
--- a/libio/bits/stdio.h
+++ b/libio/bits/stdio.h
@@ -27,7 +27,7 @@
#endif
-#ifdef __USE_EXTERN_INLINES
+#if defined __USE_EXTERN_INLINES || defined _LIBC
/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different
inline. */
# if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function)
@@ -138,7 +138,8 @@ __NTH (ferror_unlocked (FILE *__stream))
#endif /* Use extern inlines. */
-#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \
+#if defined __USE_MISC && defined __GNUC__ \
+ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
&& !defined __cplusplus
/* Perform some simple optimizations. */
# define fread_unlocked(ptr, size, n, stream) \
diff --git a/libio/stdio.h b/libio/stdio.h
index d8d7fa0..44738a4 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -929,7 +929,7 @@ extern void funlockfile (FILE *__stream) __THROW;
/* If we are compiling with optimizing read this file. It contains
several optimizing inline functions and macros. */
-#ifdef __USE_EXTERN_INLINES
+#if defined __USE_EXTERN_INLINES || defined _LIBC
# include <bits/stdio.h>
#endif
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function