On Mon, Apr 1, 2013 at 9:06 PM, Ted Unangst <t...@tedunangst.com> wrote:

> My (admittedly weak) rationale is that if a struct contains a field, I
> would
> like to be able to declare local variables of the same type as that field.
> And I don't want my local variables in my code to be using __int types.

In the specific cases here, sa_len and __ss_pad2, the answers are "no, you
should *not* be modelling variables on those!".  sa_len should only be used
by code using routing-domain sockets, and there are macros for setting it
after you've updated the socket, and you shouldn't be modelling your own
data structures after what routing sockets do "on the wire".

Reusing the type of an double-underbar-prefix *padding* member gets you
hurt in back alleys.

Note that the stuff that it makes sense to copy into your own data
structures does use real, public types.

Philip Guenther

Reply via email to