> -----Original Message----- > From: Geoff Clare [mailto:[EMAIL PROTECTED] > Sent: Monday, April 02, 2007 10:22 AM > To: bug-gnulib; Matthew Woehlke; [EMAIL PROTECTED] > Subject: Re: source(builtin) and read(2)
> I'll submit a defect report. Perhaps it would be possible to typedef ssize_t to ptrdiff_t at the same time (or eliminate ssize_t alltogether). There does not seem to be any worthwhile reason for separating the two: The only technical reason given for the existance of ssize_t is the ability to alias it with size_t when processing arguments with <stdarg.h> -- which I consider of marginal importance at best; the C standards committee has certainly not made ssize_t part of the C standard. The argument that since ptrdiff_t is intended to represent the difference of pointers makes it somehow unsuitable to represent the result of read()/write() is missing the point: on any useful ABI, ptrdiff_t can represent the size of any object, can represent 0, and can represent -1, which is what read() and cousins require. Regards, Konrad Schwarz