Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2015 09:27:04 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Marcel Moolenaar <marcel@freebsd.org>, Phil Shafer <phil@juniper.net>, John-Mark Gurney <jmg@funkthat.com>, Alfred Perlstein <alfred@freebsd.org>, "Simon J. Gerraty" <sjg@juniper.net>, "arch@freebsd.org" <arch@freebsd.org>, Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-arch <freebsd-arch@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com>
Subject:   Re: Libxo bugs and fixes.
Message-ID:  <7F04AD6C-6D07-40C1-9753-D37A82B1CC85@xcllnt.net>
In-Reply-To: <549F742D.3000802@mu.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <bright@mu.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7F04AD6C-6D07-40C1-9753-D37A82B1CC85>