]> sourceware.org Git - glibc.git/commitdiff
argp: Use fwrite_unlocked instead of __fxprintf when !_LIBC
authorKhem Raj <raj.khem@gmail.com>
Fri, 1 Jan 2016 20:20:26 +0000 (20:20 +0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 7 Jan 2016 09:25:54 +0000 (04:25 -0500)
__fxprintf is not available when argp is built outside libc.
gnulib has the same logic already.

ChangeLog
argp/argp-fmtstream.c

index 7dc2a942a8c395a3dc1b2a041982e4044a8d37d3..67f21816bfeed93b90acb8b04d8b4514031c607c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-07  Khem Raj  <raj.khem@gmail.com>
+
+       * argp/argp-fmtstream.c (__argp_fmtstream_free): Use fwrite_unlocked
+       instead of __fxprintf when _LIBC is undefined.
+
 2016-01-07  Marko Myllynen  <myllynen@redhat.com>
 
        * catgets/test-gencat.sh: Remove space after shebang.
index 982db4e7c8690fe1623c3ed4dc403a75e41eec91..d951a962e3deb78a82ad69cb256c9f1b5a3a623a 100644 (file)
@@ -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);
This page took 0.17589 seconds and 5 git commands to generate.