Subject: Re: How to translate this stdio code to netbsd?
To: None <mouse@Collatz.McRCIM.McGill.EDU>
From: Mark W. Eichin <eichin@kitten.gen.ma.us>
List: current-users
Date: 03/10/1996 19:56:15
> This is a gross abuse of the interface.  There is no guarantee that any
> particular stdio implementation even _has_ structure elements allowing

True. Last I looked at the sup client, though, it performed a similar
abuse (in the name of "performance", if I recall correctly. That's
usually the reason.) MH is an even greater offender (look for the code
that has comments about how "doing the loop this way compiles to a
shorter sequence of VAX instructions") and it also abuses stdio. PERL
does it too -- but the perl config script checks to see if "your stdio
is not quite std" and has "safe" portable code as well. (That's at
least "OK" in that it will work with a totally opaque stdio, which the
others won't...)

I've found that much of the code that looks at _base and _ptr directly
is assuming 4.3BSD.

In any case, in order to answer the question, we'd probably need to
see more of the code in question; what is it *doing* with those fields
and how could it be handled with actual POSIX stdio interfaces...