SVID and writev()
Guy Harris
guy at auspex.auspex.com
Tue Aug 21 07:42:40 AEST 1990
>I have not been able to find a specification of {IOV_MAX} anywhere. Unless
>I have overlooked something, it is not defined or mentioned elsewhere
>in the SVID.
{OPEN_MAX} isn't defined there either, because there's no official value
for it; it's implementation-dependent. In that particular case, it's
specified by POSIX, and there's a way to query it with "sysconf()" (or
you can get it with "getrlimit()", but using "sysconf()" is more
portable). There is, unfortunately, no "sysconf()" parameter in the
SVID to get it.
>Is it supposed to be defined in an include-file, and if so,
>which?
It's just a hardcoded 16 in 4.[23]BSD and 4.3-tahoe (quite literally
hardcoded - there's no #define, although there *is* an /* XXX */ on the
line containing the hardcoded 16), and the S5R4 documentation (as
opposed to the SVID) also says 16. It may still be a hardcoded 16 in
S5R4, rather than a #defined constant.
>And what should be its minimum value?
I would not recommend building an implementation with a smaller value
than 16. I don't know that there *is* some minimum value >1 that
somebody writing a program *using* "readv" or "writev", can count on,
but if you have to pick some such arbitrary value you should probably
pick 16.
More information about the Comp.unix.wizards
mailing list