bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: source(builtin) and read(2)


From: Schwarz, Konrad
Subject: RE: source(builtin) and read(2)
Date: Tue, 3 Apr 2007 10:29:19 +0200

> -----Original Message-----
> From: Geoff Clare [mailto:address@hidden 
> Sent: Monday, April 02, 2007 10:22 AM
> To: bug-gnulib; Matthew Woehlke; address@hidden
> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]