Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: SVID and writev() Message-ID: <3924@auspex.auspex.com> Date: 20 Aug 90 21:42:40 GMT References: <1990Aug19.210351.24632@dde.dk> Organization: Auspex Systems, Santa Clara Lines: 27 >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.