Eric Blake wrote:
According to Matthew Woehlke on 3/23/2007 1:38 PM:
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*,
SSIZE_MAX is guaranteed to be the maximum value that fits in ssize_t.
Again, if your ssize_t is smaller than 32 bits, your platform has other
issues. Just because POSIX allows ssize_t to be as small as 16 bits
doesn't mean many modern platforms do that.
Hmm... well then I guess this is broken:
/usr/include/limits.h:#define SSIZE_MAX 53248 /* max single
I/O size, 52K */
The man page here says:
If the value of nbytes is greater than SSIZE_MAX,
the read() function returns -1 and sets errno to
[EINVAL].
...and trust me, it ain't lying. This broke at least gawk and gzip, and
even the Linux man page seems to strongly indicate that you should pay
attention to SSIZE_MAX when calling read().
--
Matthew
Excessive obscurity: -5
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash