From owner-freebsd-arch@FreeBSD.ORG Tue Jan 6 17:27:24 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6855E7A2; Tue, 6 Jan 2015 17:27:24 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14F0166922; Tue, 6 Jan 2015 17:27:23 +0000 (UTC) Received: from [172.29.96.153] ([66.129.239.10]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id t06HRBOb065386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2015 09:27:13 -0800 (PST) (envelope-from marcel@xcllnt.net) Subject: Re: Libxo bugs and fixes. Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A55A2850-5F24-4F06-A669-8373D1853E6A"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 From: Marcel Moolenaar In-Reply-To: <549F742D.3000802@mu.org> Date: Tue, 6 Jan 2015 09:27:04 -0800 Message-Id: <7F04AD6C-6D07-40C1-9753-D37A82B1CC85@xcllnt.net> References: <201408141640.s7EGe422096656@idle.juniper.net> <53ED57F2.5020808@mu.org> <20140815053604.9E40B580A2@chaos.jnpr.net> <53EDB0EF.6090902@mu.org> <20140815173830.93832580A2@chaos.jnpr.net> <53EEA74B.9070107@mu.org> <20140816045254.5F47E580A2@chaos.jnpr.net> <549BA675.9070107@freebsd.org> <29784.1419492726@chaos> <26E73A9E-6EA4-4698-885D-BD91906D32D2@mu.org> <18276.1419528679@chaos> <549C50FB.6050908@mu.org> <23687.1419546234@chaos> <549F742D.3000802@mu.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1993) X-Mailman-Approved-At: Tue, 06 Jan 2015 17:39:30 +0000 Cc: Marcel Moolenaar , Phil Shafer , John-Mark Gurney , Alfred Perlstein , "Simon J. Gerraty" , "arch@freebsd.org" , Poul-Henning Kamp , freebsd-arch , Konstantin Belousov X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2015 17:27:24 -0000 --Apple-Mail=_A55A2850-5F24-4F06-A669-8373D1853E6A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Dec 27, 2014, at 7:08 PM, Alfred Perlstein wrote: >=20 >>=20 > OK, so I've updated https://reviews.freebsd.org/D1379 to include code = to handle this. >=20 > Solaris and glibc have a private libc function to check if a stream is = line buffered called int __flbf (FILE *stream) which returns true/false = if the stream if line buffered or not. I'm still unclear on the need or importance of adding __flbf(). What's wrong with just calling fflush()? What is to be gained by only calling fflush() when the stream is line-buffered? Why not call fflush() when the stream is not line buffered? Put differently: we have 618 instance of fflush() in the source tree and there has been no demand for something like __flbf() before that I know of. Why now? And why specifically for libxo? If __flbf() is really important, then I'd rather see someone go over the source tree to add calls to it for most of those 618 instances of fflush() at the time of its introduction. Not have it introduced as a side-effect of something else when it's not at all obvious that the side-effect was warranted. Can you elaborate? Thanks, -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_A55A2850-5F24-4F06-A669-8373D1853E6A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlSsGukACgkQpgWlLWHuifajUACggBOiDKVbKQ37xbP52l2kznnO OOwAn2UkRwSPfDbUI9sMA2plRvvJg9u3 =s1Ff -----END PGP SIGNATURE----- --Apple-Mail=_A55A2850-5F24-4F06-A669-8373D1853E6A--