Andreas Schwab wrote:
Matthew Woehlke writes:
Um. In fact, it is also an *ERROR* (i.e. read() will fail outright with -
IIRC - EINVAL) to try to read more than SSIZE_MAX bytes at once. Many, but
not all, systems define SSIZE_MAX to be a very large value, but it may be
as small as 32k. I guess I've never tried to source an autoconf configure
script on such a system.
If your ssize_t is smaller than 32 bits you'll have to worry about more
things than that.
Huh? I never said anything about ssize_t, I said SSIZE_MAX which appears
to be guaranteed by POSIX to be at least 32 *kilobytes*, often bigger
but /not reliably so/. Nothing about sizeof(ssize_t).
The point was that this is an error on some systems:
read(fd, buffer, 65536); // size > SSIZE_MAX, will fail with EINVAL
--
Matthew
Excessive obscurity: -5
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash