Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2015 10:34:33 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        Marcel Moolenaar <marcel@freebsd.org>, Phil Shafer <phil@juniper.net>, John-Mark Gurney <jmg@funkthat.com>, "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:  <FD41F9E0-F1D3-4A6B-8FAD-DA6C1C8AF559@mu.org>
In-Reply-To: <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> <7F04AD6C-6D07-40C1-9753-D37A82B1CC85@xcllnt.net>

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

On Jan 6, 2015, at 9:27 AM, Marcel Moolenaar wrote:

>=20
>> 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.
>=20
> 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?
>=20
> 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?
>=20
> 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.
>=20
> Can you elaborate?

Nope.  the code is up, figure it out yourself.

https://github.com/splbio/freebsd/tree/ap_libxo_master/contrib/libxo

-Alfred




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FD41F9E0-F1D3-4A6B-8FAD-DA6C1C8AF559>