use __packed/__aligned rather than GCC-specific __attribute__.

This commit is contained in:
Alfred Perlstein 2002-09-23 06:35:33 +00:00
parent e80f1025f9
commit 744ae3e66a
3 changed files with 16 additions and 16 deletions

View File

@ -108,18 +108,18 @@ typedef union {
u_int8_t Dev;
u_int8_t Bus:6;
u_int8_t Mode:2;
} PeripDev __attribute__ ((__packed__));
} PeripDev __packed;
struct {
u_int8_t DevLSB;
u_int8_t DevMSB:6;
u_int8_t Mode:2;
} LogDev __attribute__ ((__packed__));
} LogDev __packed;
struct {
u_int8_t Dev:5;
u_int8_t Bus:3;
u_int8_t Targ:6;
u_int8_t Mode:2;
} LogUnit __attribute__ ((__packed__));
} LogUnit __packed;
} SCSI3Addr_struct;
typedef struct {
@ -127,20 +127,20 @@ typedef struct {
u_int32_t Bus:6;
u_int32_t Mode:2;
SCSI3Addr_struct Target[2];
} PhysDevAddr_struct __attribute__ ((__packed__));
} PhysDevAddr_struct __packed;
typedef struct {
u_int32_t VolId:30;
u_int32_t Mode:2;
u_int8_t reserved[4];
} LogDevAddr_struct __attribute__ ((__packed__));
} LogDevAddr_struct __packed;
typedef union {
u_int8_t LunAddrBytes[8];
SCSI3Addr_struct SCSI3Lun[4];
PhysDevAddr_struct PhysDev;
LogDevAddr_struct LogDev;
} LUNAddr_struct __attribute__ ((__packed__));
} LUNAddr_struct __packed;
typedef struct {
u_int8_t CDBLen;
@ -148,24 +148,24 @@ typedef struct {
u_int8_t Type:3;
u_int8_t Attribute:3;
u_int8_t Direction:2;
} Type __attribute__ ((__packed__));
} Type __packed;
u_int16_t Timeout;
u_int8_t CDB[16];
} RequestBlock_struct __attribute__ ((__packed__));
} RequestBlock_struct __packed;
typedef union {
struct {
u_int8_t Reserved[3];
u_int8_t Type;
u_int32_t ErrorInfo;
} Common_Info __attribute__ ((__packed__));
} Common_Info __packed;
struct {
u_int8_t Reserved[2];
u_int8_t offense_size;
u_int8_t offense_num;
u_int32_t offense_value;
} Invalid_Cmd __attribute__ ((__packed__));
} MoreErrInfo_struct __attribute__ ((__packed__));
} Invalid_Cmd __packed;
} MoreErrInfo_struct __packed;
typedef struct {
u_int8_t ScsiStatus;
@ -174,7 +174,7 @@ typedef struct {
u_int32_t ResidualCnt;
MoreErrInfo_struct MoreErrInfo;
u_int8_t SenseInfo[SENSEINFOBYTES];
} ErrorInfo_struct __attribute__ ((__packed__));
} ErrorInfo_struct __packed;
typedef struct {
LUNAddr_struct LUN_info; /* 8 */
@ -182,7 +182,7 @@ typedef struct {
ErrorInfo_struct error_info; /* 48 */
u_int16_t buf_size; /* 2 */
u_int8_t *buf; /* 4 */
} IOCTL_Command_struct __attribute__ ((__packed__));
} IOCTL_Command_struct __packed;
/*
* Note that we'd normally pass the struct in directly, but

View File

@ -1253,7 +1253,7 @@ calc_crc32(u_int32_t crc, caddr_t p, u_int len)
#endif /* ASM_CRC */
static u_int32_t crc32tab[] __attribute__ ((aligned(8))) = {
static u_int32_t crc32tab[] __aligned(8) = {
0xD202EF8D, 0xA505DF1B, 0x3C0C8EA1, 0x4B0BBE37,
0xD56F2B94, 0xA2681B02, 0x3B614AB8, 0x4C667A2E,
0xDCD967BF, 0xABDE5729, 0x32D70693, 0x45D03605,

View File

@ -95,12 +95,12 @@ struct iso88025_header {
u_int8_t iso88025_shost[ISO88025_ADDR_LEN]; /* source address */
u_int16_t rcf; /* route control field */
u_int16_t rd[RIF_MAX_RD]; /* routing designators */
} __attribute__ ((__packed__));
} __packed;
struct iso88025_rif {
u_int16_t rcf; /* route control field */
u_int16_t rd[RIF_MAX_RD]; /* routing designators */
} __attribute__ ((__packed__));
} __packed;
struct iso88025_sockaddr_data {
u_char ether_dhost[ISO88025_ADDR_LEN];