diff options
Diffstat (limited to 'libc/argp/argp-fmtstream.c')
-rw-r--r-- | libc/argp/argp-fmtstream.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/argp/argp-fmtstream.c b/libc/argp/argp-fmtstream.c index 22bfc4ea7..d13d20923 100644 --- a/libc/argp/argp-fmtstream.c +++ b/libc/argp/argp-fmtstream.c @@ -102,7 +102,11 @@ __argp_fmtstream_free (argp_fmtstream_t fs) __argp_fmtstream_update (fs); if (fs->p > fs->buf) { +#ifdef _LIBC __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf); +#else + fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream); +#endif } free (fs->buf); free (fs); @@ -147,6 +151,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs) size_t i; for (i = 0; i < pad; i++) { +#ifdef _LIBC if (_IO_fwide (fs->stream, 0) > 0) { #if ! _LIBC || __OPTION_POSIX_WIDE_CHAR_DEVICE_IO @@ -156,6 +161,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs) #endif } else +#endif putc_unlocked (' ', fs->stream); } } @@ -316,6 +322,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs) *nl++ = ' '; else for (i = 0; i < fs->wmargin; ++i) +#ifdef _LIBC if (_IO_fwide (fs->stream, 0) > 0) { #ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO @@ -325,6 +332,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs) #endif } else +#endif putc_unlocked (' ', fs->stream); /* Copy the tail of the original buffer into the current buffer |