Review of AEAD Encryption API Project; concluding December 5, 2008

Philip Guenther guenther at gmail.com
Mon Dec 1 21:17:18 EST 2008


On Mon, Dec 1, 2008 at 11:49 AM, Sam Hartman <hartmans at mit.edu> wrote:
>>>>>> "Love" == Love Hörnquist Åstrand <lha at kth.se> writes:
...
>    Love> iov_count should not be size_t, it should be unsigned
>    Love> int. size_t is to describe memory sizes, iov_count is not
>    Love> that.
>
> I think this is a style question.  On my C library at least, qsort and
> calloc take size_t for their counts, while writev takes int.  I don't
> have a strong preference, but in the interest of making changes only
> when there is a reason to do so, I'd say we should make this change
> only if we get others calling for it.

I'm with Love on this one.  XPG and the SUS have specified for better
than a decade that the iov count for writev(), readv(), and the struct
msghdr used with sendmsg() and recvmsg() is to be of type 'int'.  To
create a new interface that was so obviously modeled on those but
differ on that point, I would expect some sort of justification for
the difference.


Philip Guenther




More information about the krbdev mailing list