>> To be type-correct, the various structs sockaddr_* really need to be >> a single discriminated union...and I'm not sure sockaddr_un can ever >> be done type-correctly; I'd have to think about it more.) > GCC's transparent unions are really nice for this.
Yes, though all they do is remove an otherwise-necessary layer of member naming. The part that I'd really find irritating is having to allocate the whole union - roughly the equivalent of today's struct sockaddr_storage - even when I know it's going to hold only one flavour of sockaddr, which wastes most of the space allocated. (The space wasted is small enough to be unimportant...in most cases.) /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B