summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/local.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/local.h')
-rw-r--r--newlib/libc/stdio/local.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index 434d3f85c..cf8e6a921 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -60,7 +60,16 @@
#define _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
#endif
-#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
+#if defined(__SINGLE_THREAD__) || defined(__IMPL_UNLOCKED__)
+
+# define _newlib_flockfile_start(_fp)
+# define _newlib_flockfile_exit(_fp)
+# define _newlib_flockfile_end(_fp)
+# define _newlib_sfp_lock_start()
+# define _newlib_sfp_lock_exit()
+# define _newlib_sfp_lock_end()
+
+#elif defined(_STDIO_WITH_THREAD_CANCELLATION_SUPPORT)
#include <pthread.h>
/* Start a stream oriented critical section: */
@@ -102,7 +111,7 @@
pthread_setcancelstate (__oldsfpcancel, &__oldsfpcancel); \
}
-#elif !defined(__SINGLE_THREAD__) /* !_STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
+#else /* !__SINGLE_THREAD__ && !__IMPL_UNLOCKED__ && !_STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
# define _newlib_flockfile_start(_fp) \
{ \
@@ -129,17 +138,10 @@
__sfp_lock_release (); \
}
-#else /* __SINGLE_THREAD__ */
-
-# define _newlib_flockfile_start(_fp)
-# define _newlib_flockfile_exit(_fp)
-# define _newlib_flockfile_end(_fp)
-# define _newlib_sfp_lock_start()
-# define _newlib_sfp_lock_exit()
-# define _newlib_sfp_lock_end()
-
-#endif /* _STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
+#endif /* __SINGLE_THREAD__ || __IMPL_UNLOCKED__ */
+extern wint_t _EXFUN(__fgetwc, (struct _reent *, FILE *));
+extern wint_t _EXFUN(__fputwc, (struct _reent *, wchar_t, FILE *));
extern u_char *_EXFUN(__sccl, (char *, u_char *fmt));
extern int _EXFUN(__svfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
extern int _EXFUN(__ssvfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));