develooper Front page | perl.perl5.porters | Postings from November 2000

Re: sfio97 vs sfio2000

Thread Previous | Thread Next
Nicholas Clark
November 14, 2000 14:30
Re: sfio97 vs sfio2000
Message ID:
On Tue, Nov 14, 2000 at 04:26:17PM +0000, Nick Ing-Simmons wrote:
> I am in the process of making the major overhaul of perlio.h and its
> descendants. To check I had not broken sfio I did a build against 

Good. It was far far to confusing

> the one I have here - shich happens to be sfio97.
> I discovered _my_ changes had not broken it any worse than it was.

Yep. My fault. Sorry.
I tested it with sfio 2000 and sfio 1999
The specific flag appears to be introduced for sfseek between sfio 98 and
sfio1999. It could be used conditionally based on the value of SFIO_VERSION

How many versions of sfio are we supporting?

I've now collected the source for sfio 95, 97, 98, 1999 and 2000.
[which I doubt isn't the full set]
I assume that the answer is "we support as many versions as possible"
however, it does make it a right pig to test everything.

Would it be possible for configure to probe for the value of SFIO_VERSION
and change the line

    useperlio=define d_sfio=define uselargefiles=define usesocks=undef

to report the 8 digit sfio version if sfio used rather than "define"?
(as now reporting undef if sfio not used or not found)

> The recent change away from sftell() does _NOT_ work right with sfio97.
> As it was only to give error rather than something that _might_ be useful
> I have reverted that to use sftell().

I was in two minds about whether it should change.
status quo:	it tells you something useful
change:		I was under the impression that perl scripts shouldn't notice
		anything if sfio is substituted for stdio

now that Jarkko says that C's ftell()'s result is differs for ttys on
different platforms I'm coming round to the view that perl's tell using
sftell is best.

Either way, as long as it's documented it's correct. Previously the return
results weren't.

> Also the perlsfio.h that I inherited seems to have turned off 
> PerlIO_canset_cnt() - and sfio _can_ set count same way that Linux/glibc
> stdio can - set the pointer and count comes too.

Assuming it was me I was attempting to distinguish can set count
(count is a lval), and count changes as a side effect of setting ptr
I felt that this was important. I don't think it was documented before,
and I am guilty of not attempting to rectify that.

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About