summaryrefslogtreecommitdiff
path: root/libc/misc/wchar/wstdio.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-02-11 23:48:50 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-02-11 23:48:50 +0000
commit082e680bd54e999f2bb4eb77141958938b1e9ee9 (patch)
tree203c45b85ca608e1550d8ffc459456fc9cf0b30b /libc/misc/wchar/wstdio.c
parent17c21765b4a97c6f0b74ba8466073e5a3f97cdee (diff)
New stdio core. Should be more maintainable. Fixes a couple of bugs.
Codepaths streamlined. Improved performance for nonthreaded apps when linked with a thread-enabled libc. Minor iconv bug and some locale/thread related startup issues fixed. These showed up in getting a gcj-compiled java helloworld app running. Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
Diffstat (limited to 'libc/misc/wchar/wstdio.c')
-rw-r--r--libc/misc/wchar/wstdio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libc/misc/wchar/wstdio.c b/libc/misc/wchar/wstdio.c
index e984bf837..b49494f35 100644
--- a/libc/misc/wchar/wstdio.c
+++ b/libc/misc/wchar/wstdio.c
@@ -57,7 +57,7 @@
#include <errno.h>
#include <assert.h>
-#ifndef __STDIO_THREADSAFE
+#ifndef __UCLIBC_HAS_THREADS__
#ifdef __BCC__
#define UNLOCKED_STREAM(RETURNTYPE,NAME,PARAMS,ARGS,STREAM) \
@@ -85,7 +85,7 @@ void NAME PARAMS
#define __STDIO_THREADLOCK_OPENLIST
#define __STDIO_THREADUNLOCK_OPENLIST
-#else /* __STDIO_THREADSAFE */
+#else /* __UCLIBC_HAS_THREADS__ */
#include <pthread.h>
@@ -121,7 +121,7 @@ void NAME##_unlocked PARAMS
#define __STDIO_THREADTRYLOCK_OPENLIST \
__pthread_mutex_trylock(&_stdio_openlist_lock)
-#endif /* __STDIO_THREADSAFE */
+#endif /* __UCLIBC_HAS_THREADS__ */
#ifndef __STDIO_BUFFERS
#error stdio buffers are currently required for wide i/o
@@ -404,9 +404,9 @@ wint_t ungetwc(wint_t c, register FILE *stream)
/* If can't read or c == WEOF or ungot slots already filled, then fail. */
if ((stream->modeflags
& (__MASK_UNGOT2|__FLAG_WRITEONLY
-#ifndef __STDIO_AUTO_RW_TRANSITION
+#ifndef __UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__
|__FLAG_WRITING /* Note: technically no, but yes in spirit */
-#endif /* __STDIO_AUTO_RW_TRANSITION */
+#endif /* __UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__ */
))
|| ((stream->modeflags & __MASK_UNGOT1) && (stream->ungot[1]))
|| (c == WEOF) ) {
@@ -417,11 +417,11 @@ wint_t ungetwc(wint_t c, register FILE *stream)
/* ungot_width */
#ifdef __STDIO_BUFFERS
-#ifdef __STDIO_AUTO_RW_TRANSITION
+#ifdef __UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__
if (stream->modeflags & __FLAG_WRITING) {
fflush_unlocked(stream); /* Commit any write-buffered chars. */
}
-#endif /* __STDIO_AUTO_RW_TRANSITION */
+#endif /* __UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__ */
#endif /* __STDIO_BUFFERS */
/* Clear EOF and WRITING flags, and set READING FLAG */