gcc.configunix BsdSockets_salen

Anders F Björklund afb at algonet.se
Wed Mar 21 05:17:32 PDT 2007


I came across this unix-mid section, wonder if it is wrong ?

     struct sockaddr
     {
	version(GNU_BsdSockets_salen) {
	    ubyte  sa_len;
	    ubyte  sa_family;
	} else {
	    ushort sa_family;
	}
	ubyte[14] sa_data;
     }

     struct sockaddr_in
     {
	version( BsdSockets_salen ) {
	    ubyte sin_len = sockaddr_in.sizeof;
	    ubyte sin_family = AF_INET;
	} else {
	    ushort sin_family = AF_INET;
	}
	ushort sin_port;
	in_addr sin_addr;
	ubyte[8] sin_zero;
     }

Shouldn't it be "GNU_BsdSockets_salen" for both of them ?

--anders


More information about the D.gnu mailing list