d_packed_structs.c revision 1.1
11.1Sjruoho/* packed tests */ 21.1Sjruoho 31.1Sjruohostruct in_addr { 41.1Sjruoho int x; 51.1Sjruoho}; 61.1Sjruohostruct ip_timestamp { 71.1Sjruoho char ipt_code; 81.1Sjruoho char ipt_len; 91.1Sjruoho char ipt_ptr; 101.1Sjruoho unsigned int ipt_flg:4, 111.1Sjruoho ipt_oflw:4; 121.1Sjruoho union ipt_timestamp { 131.1Sjruoho int ipt_time[1]; 141.1Sjruoho struct ipt_ta { 151.1Sjruoho struct in_addr ipt_addr; 161.1Sjruoho int ipt_time; 171.1Sjruoho } ipt_ta[1] __packed; 181.1Sjruoho } ipt_timestamp __packed; 191.1Sjruoho} __packed; 201.1Sjruoho 211.1Sjruohotypedef struct __packed { 221.1Sjruoho int x; 231.1Sjruoho} t; 241.1Sjruoho 251.1Sjruohostruct x { 261.1Sjruoho char c; 271.1Sjruoho long l; 281.1Sjruoho} __packed; 291.1Sjruoho 301.1Sjruohostruct y { 311.1Sjruoho char c; 321.1Sjruoho long l; 331.1Sjruoho}; 341.1Sjruoho 351.1Sjruohoint a[sizeof(struct y) - sizeof(struct x) - 1]; 36