From patchwork Fri Jan 1 20:20:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 10189 Received: (qmail 124900 invoked by alias); 1 Jan 2016 20:20:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 124889 invoked by uid 89); 1 Jan 2016 20:20:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1061, ldv@altlinux.org, D*altlinux.org, sk:ldvalt X-HELO: mail-qk0-f172.google.com X-Received: by 10.55.41.138 with SMTP id p10mr99135322qkp.18.1451679631950; Fri, 01 Jan 2016 12:20:31 -0800 (PST) From: Khem Raj To: libc-alpha@sourceware.org Cc: Khem Raj Subject: [PATCH] argp: Use fwrite_unlocked instead of __fxprintf when !_LIBC Date: Fri, 1 Jan 2016 20:20:26 +0000 Message-Id: <1451679626-28351-1-git-send-email-raj.khem@gmail.com> __fxprintf is not available when argp is built outside libc Signed-off-by: Khem Raj --- ChangeLog | 5 +++++ argp/argp-fmtstream.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 51a055c..0bfb1fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-01-01 Khem Raj + + * argp/argp-fmtstream.c (__argp_fmtstream_free): Use fwrite_unlocked + instead of __fxprintf when _LIBC is undefined. + 2015-12-30 Dmitry V. Levin [BZ #19408] diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c index 2b845e0..f8de40e 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);