diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-01-01 20:20:26 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-07 04:25:54 -0500 |
commit | 45c4f3665aaa63cab148cc9cc96fa07c666c1c38 (patch) | |
tree | d45a98d97c13ce603b233208f0cf37440137fd29 /argp | |
parent | 48d0341cdd41040714f1e9896efe89d49296bc78 (diff) | |
download | glibc-45c4f3665aaa63cab148cc9cc96fa07c666c1c38.tar glibc-45c4f3665aaa63cab148cc9cc96fa07c666c1c38.tar.gz glibc-45c4f3665aaa63cab148cc9cc96fa07c666c1c38.tar.bz2 glibc-45c4f3665aaa63cab148cc9cc96fa07c666c1c38.zip |
argp: Use fwrite_unlocked instead of __fxprintf when !_LIBC
__fxprintf is not available when argp is built outside libc.
gnulib has the same logic already.
Diffstat (limited to 'argp')
-rw-r--r-- | argp/argp-fmtstream.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c index 982db4e7c8..d951a962e3 100644 --- a/argp/argp-fmtstream.c +++ b/argp/argp-fmtstream.c @@ -100,7 +100,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); |