Hi,

In message "Re: Why is I/O slow?"
    on 02/06/22, Ian Macdonald <ian / caliban.org> writes:

|> "stdio" just doesn't provide the way to distinguish buffered and
|> unbuffered input.  And glibc does not exist everywhere.  So I have to
|> do the job by myself, if I want to tweak the buffer.  And I want to.
|
|But if you're agreeing that you don't need to tweak the buffer with
|glibc, then why don't you just place an #ifdef macro for Linux around
|that piece of code?

I don't know (yet) whether I don't need to tweak the buffer with
glibc.  I've just told glibc fread(3) does not do double copy.  And I
need to tweak the buffer for other reasons anyway.

|If using glibc makes sense in the cases that it's available, why would
|you not want to do so in such cases?

If glibc does provide all I need.  But unfortunately, I don't think so.

Maybe I misunderstand something.  If somebody knows the way to improve
the IO performance using portable stdio and #ifdef'ed glibc features,
tell me.

							matz.