diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-11-16 20:30:08 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-11-16 20:30:08 +0000 |
commit | 4e13879e64b64a3bf17cb067b974522e66b3a70e (patch) | |
tree | 46805a15b406a5fde2f0d261f52111f68d5a812d | |
parent | 95c782cbe9adab15695a4d56e505761194cc49ee (diff) |
convert __attribute__((__packed__)) to __packed so that parsers unaware
of gcc extensions have more of a chance.
ok mcbride@, no objections from millert@, deraadt@
-rw-r--r-- | sys/arch/hppa/hppa/intr.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/disklabel.h | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/segments.h | 10 | ||||
-rw-r--r-- | sys/arch/i386/pci/pcibiosvar.h | 8 | ||||
-rw-r--r-- | sys/arch/m68k/include/frame.h | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/include/frame.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/aacreg.h | 14 | ||||
-rw-r--r-- | sys/dev/ic/cacreg.h | 12 | ||||
-rw-r--r-- | sys/dev/ic/osiopvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/siopreg.h | 14 | ||||
-rw-r--r-- | sys/dev/ic/siopvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/siopvar_common.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/uhareg.h | 4 | ||||
-rw-r--r-- | sys/dev/isa/mcdreg.h | 16 | ||||
-rw-r--r-- | sys/dev/pci/czreg.h | 8 | ||||
-rw-r--r-- | sys/dev/pci/if_stgereg.h | 6 | ||||
-rw-r--r-- | sys/dev/pci/pcireg.h | 8 | ||||
-rw-r--r-- | sys/dev/usb/usb.h | 4 | ||||
-rw-r--r-- | sys/net/bridgestp.c | 6 | ||||
-rw-r--r-- | sys/net/if_gre.h | 10 | ||||
-rw-r--r-- | sys/net/if_ieee80211.h | 4 | ||||
-rw-r--r-- | sys/net/if_token.h | 6 | ||||
-rw-r--r-- | sys/netinet/icmp6.h | 38 | ||||
-rw-r--r-- | sys/netinet/ip6.h | 26 | ||||
-rw-r--r-- | sys/netinet/ip_carp.h | 4 | ||||
-rw-r--r-- | sys/netinet6/in6_cksum.c | 4 |
26 files changed, 116 insertions, 116 deletions
diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c index 8a7b037bafa..f48b4ed617b 100644 --- a/sys/arch/hppa/hppa/intr.c +++ b/sys/arch/hppa/hppa/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.12 2003/10/15 16:59:23 mickey Exp $ */ +/* $OpenBSD: intr.c,v 1.13 2003/11/16 20:30:06 avsm Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -57,7 +57,7 @@ struct hppa_iv { struct hppa_iv *next; struct hppa_iv *share; int pad2[3]; -} __attribute__((__packed__)); +} __packed; register_t kpsw = PSL_Q | PSL_P | PSL_C | PSL_D; volatile int cpl = IPL_NESTED; diff --git a/sys/arch/i386/include/disklabel.h b/sys/arch/i386/include/disklabel.h index 0f22355259d..190a38ed616 100644 --- a/sys/arch/i386/include/disklabel.h +++ b/sys/arch/i386/include/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.25 2003/01/06 01:31:42 weingart Exp $ */ +/* $OpenBSD: disklabel.h,v 1.26 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp $ */ /* @@ -79,7 +79,7 @@ struct dos_mbr { u_int8_t dmbr_boot[DOSPARTOFF]; struct dos_partition dmbr_parts[NDOSPART]; u_int16_t dmbr_sign; -} __attribute__((__packed__)); +} __packed; #define DOSMBR_SIGNATURE (0xaa55) #define DOSMBR_SIGNATURE_OFF (0x1fe) diff --git a/sys/arch/i386/include/segments.h b/sys/arch/i386/include/segments.h index b7863d819e4..ac01a2a2e26 100644 --- a/sys/arch/i386/include/segments.h +++ b/sys/arch/i386/include/segments.h @@ -1,4 +1,4 @@ -/* $OpenBSD: segments.h,v 1.11 2003/06/02 23:27:47 millert Exp $ */ +/* $OpenBSD: segments.h,v 1.12 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: segments.h,v 1.23 1996/02/01 22:31:03 mycroft Exp $ */ /*- @@ -87,7 +87,7 @@ struct segment_descriptor { unsigned sd_def32:1; /* default 32 vs 16 bit size */ unsigned sd_gran:1; /* limit granularity (byte/page) */ unsigned sd_hibase:8; /* segment base address (msb) */ -} __attribute__((__packed__)); +} __packed; /* * Gate descriptors (e.g. indirect descriptors) @@ -101,7 +101,7 @@ struct gate_descriptor { unsigned gd_dpl:2; /* segment descriptor priority level */ unsigned gd_p:1; /* segment descriptor present */ unsigned gd_hioffset:16; /* gate offset (msb) */ -} __attribute__((__packed__)); +} __packed; /* * Generic descriptor @@ -109,7 +109,7 @@ struct gate_descriptor { union descriptor { struct segment_descriptor sd; struct gate_descriptor gd; -} __attribute__((__packed__)); +} __packed; /* * region descriptors, used to load gdt/idt tables before segments yet exist. @@ -117,7 +117,7 @@ union descriptor { struct region_descriptor { unsigned rd_limit:16; /* segment extent */ unsigned rd_base:32; /* base address */ -} __attribute__((__packed__)); +} __packed; #if __GNUC__ == 2 && __GNUC_MINOR__ < 7 #pragma pack(4) diff --git a/sys/arch/i386/pci/pcibiosvar.h b/sys/arch/i386/pci/pcibiosvar.h index 48bb39081ad..e00e38a8910 100644 --- a/sys/arch/i386/pci/pcibiosvar.h +++ b/sys/arch/i386/pci/pcibiosvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcibiosvar.h,v 1.11 2003/07/30 05:26:33 mickey Exp $ */ +/* $OpenBSD: pcibiosvar.h,v 1.12 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: pcibios.h,v 1.2 2000/04/28 17:15:16 uch Exp $ */ /* @@ -72,7 +72,7 @@ struct pcibios_softc { struct pcibios_linkmap { u_int8_t link; u_int16_t bitmap; -} __attribute__((__packed__)); +} __packed; struct pcibios_intr_routing { u_int8_t bus; @@ -80,7 +80,7 @@ struct pcibios_intr_routing { struct pcibios_linkmap linkmap[4]; /* INT[A:D]# */ u_int8_t slot; u_int8_t reserved; -} __attribute__((__packed__)); +} __packed; /* * $PIR header. Reference: @@ -98,7 +98,7 @@ struct pcibios_pir_header { u_int32_t miniport; u_int8_t reserved[11]; u_int8_t checksum; -} __attribute__((__packed__)); +} __packed; #define PIR_DEVFUNC_DEVICE(devfunc) (((devfunc) >> 3) & 0x1f) #define PIR_DEVFUNC_FUNCTION(devfunc) ((devfunc) & 7) diff --git a/sys/arch/m68k/include/frame.h b/sys/arch/m68k/include/frame.h index 185d606e513..b2eaa751aec 100644 --- a/sys/arch/m68k/include/frame.h +++ b/sys/arch/m68k/include/frame.h @@ -1,4 +1,4 @@ -/* $OpenBSD: frame.h,v 1.7 2003/06/02 23:27:48 millert Exp $ */ +/* $OpenBSD: frame.h,v 1.8 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: frame.h,v 1.15 1997/05/03 12:49:05 mycroft Exp $ */ /* @@ -51,7 +51,7 @@ struct frame { u_int tf_pc; u_short tf_format:4, tf_vector:12; - } __attribute__((__packed__)) F_t; + } __packed F_t; union F_u { struct fmt2 { u_int f_iaddr; diff --git a/sys/arch/mvme88k/include/frame.h b/sys/arch/mvme88k/include/frame.h index 58ffd088b8b..0d23bcc53bf 100644 --- a/sys/arch/mvme88k/include/frame.h +++ b/sys/arch/mvme88k/include/frame.h @@ -1,4 +1,4 @@ -/* $OpenBSD: frame.h,v 1.5 2003/06/02 23:27:52 millert Exp $ */ +/* $OpenBSD: frame.h,v 1.6 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: frame.h,v 1.15 1997/05/03 12:49:05 mycroft Exp $ */ /* @@ -43,7 +43,7 @@ #define _M88K_FRAME_H_ struct frame { - struct m88100_saved_state __attribute__((__packed__)) F_t; + struct m88100_saved_state __packed F_t; }; #endif /* _M88K_FRAME_H_ */ diff --git a/sys/dev/ic/aacreg.h b/sys/dev/ic/aacreg.h index 6ed608ddd21..08d5bafce56 100644 --- a/sys/dev/ic/aacreg.h +++ b/sys/dev/ic/aacreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aacreg.h,v 1.4 2002/09/08 01:09:07 deraadt Exp $ */ +/* $OpenBSD: aacreg.h,v 1.5 2003/11/16 20:30:06 avsm Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -123,7 +123,7 @@ struct aac_adapter_init { u_int32_t PrintfBufferSize; u_int32_t HostPhysMemPages; u_int32_t HostElapsedSeconds; -} __attribute__((__packed__)); +} __packed; /* * Shared data types @@ -221,7 +221,7 @@ struct FsaRevision { u_int32_t ul; } external; u_int32_t buildNumber; -} __attribute__((__packed__)); +} __packed; /* * Adapter Information @@ -319,7 +319,7 @@ struct aac_adapter_info { AAC_BatteryPlatform batteryPlatform; u_int32_t SupportedOptions; /* supported features of this ctrlr */ AAC_OemFlavor OemVariant; -} __attribute__((__packed__)); +} __packed; /* * Monitor/Kernel interface. @@ -569,7 +569,7 @@ struct aac_blockwrite_response { struct aac_fib_list_entry { struct fib_list_entry *Flink; struct fib_list_entry *Blink; -} __attribute__((__packed__)); +} __packed; /* * FIB (FSA Interface Block?); this is the datastructure passed between the @@ -592,14 +592,14 @@ struct aac_fib_header { } _s; struct aac_fib_list_entry FibLinks; } _u; -} __attribute__((__packed__)); +} __packed; #define AAC_FIB_DATASIZE (512 - sizeof(struct aac_fib_header)) struct aac_fib { struct aac_fib_header Header; u_int8_t data[AAC_FIB_DATASIZE]; -} __attribute__((__packed__)); +} __packed; /* * FIB commands diff --git a/sys/dev/ic/cacreg.h b/sys/dev/ic/cacreg.h index c18b8f99559..1e8b4cbed00 100644 --- a/sys/dev/ic/cacreg.h +++ b/sys/dev/ic/cacreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cacreg.h,v 1.3 2003/03/06 22:31:21 mickey Exp $ */ +/* $OpenBSD: cacreg.h,v 1.4 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: cacreg.h,v 1.5 2001/01/10 16:48:04 ad Exp $ */ /*- @@ -142,7 +142,7 @@ struct cac_drive_info { u_int8_t nsectors; u_int8_t checksum; u_int8_t mirror; -} __attribute__((__packed__)); +} __packed; struct cac_controller_info { u_int8_t num_drvs; @@ -179,13 +179,13 @@ struct cac_controller_info { u_int8_t red_ctlr_stat; u_int8_t red_fail_reason; u_int8_t reserved[403]; -} __attribute__((__packed__)); +} __packed; struct cac_hdr { u_int8_t drive; /* logical drive */ u_int8_t priority; /* block priority */ u_int16_t size; /* size of request, in words */ -} __attribute__((__packed__)); +} __packed; struct cac_req { u_int16_t next; /* offset of next request */ @@ -195,11 +195,11 @@ struct cac_req { u_int16_t bcount; /* block count */ u_int8_t sgcount; /* number of scatter/gather entries */ u_int8_t reserved; /* reserved */ -} __attribute__((__packed__)); +} __packed; struct cac_sgb { u_int32_t length; /* length of S/G segment */ u_int32_t addr; /* physical address of block */ -} __attribute__((__packed__)); +} __packed; #endif /* !_IC_CACREG_H_ */ diff --git a/sys/dev/ic/osiopvar.h b/sys/dev/ic/osiopvar.h index 1c47f8249f9..9aba89816e4 100644 --- a/sys/dev/ic/osiopvar.h +++ b/sys/dev/ic/osiopvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: osiopvar.h,v 1.8 2003/10/21 18:58:49 jmc Exp $ */ +/* $OpenBSD: osiopvar.h,v 1.9 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: osiopvar.h,v 1.3 2002/05/14 02:58:35 matt Exp $ */ /* @@ -114,7 +114,7 @@ struct osiop_ds { struct scsi_generic scsi_cmd; /* DMA'able copy of xs->cmd */ u_int32_t pad[1+4]; /* pad to 256 bytes */ -} __attribute__((__packed__)); +} __packed; /* status can hold the SCSI_* status values, and 2 additional values: */ #define SCSI_OSIOP_NOCHECK 0xfe /* don't check the scsi status */ diff --git a/sys/dev/ic/siopreg.h b/sys/dev/ic/siopreg.h index 57bc43536f7..75a699dfa34 100644 --- a/sys/dev/ic/siopreg.h +++ b/sys/dev/ic/siopreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: siopreg.h,v 1.7 2003/10/21 18:58:49 jmc Exp $ */ +/* $OpenBSD: siopreg.h,v 1.8 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: siopreg.h,v 1.13 2002/08/29 16:43:23 bouyer Exp $ */ /* @@ -457,7 +457,7 @@ struct nvram_symbios { u_int16_t flags; #define NVRAM_SYM_HOST_F_SCAN_AT_BOOT 0x0001 u_int16_t io_port; /* PCI I/O address */ - } __attribute__((__packed__)) host[4]; + } __packed host[4]; /* Targets (8 bytes x 16) */ struct nvram_symbios_target { @@ -471,7 +471,7 @@ struct nvram_symbios { u_int8_t sync_offset; /* 8, 16, etc. */ u_int16_t sync_period; /* 4 * factor */ u_int16_t timeout; - } __attribute__((__packed__)) target[16]; + } __packed target[16]; /* SCAM table (8 bytes x 4) */ struct nvram_symbios_scam { @@ -488,11 +488,11 @@ struct nvram_symbios { #define NVRAM_SYM_SCAM_ID_VALID 3 u_int8_t target_id; u_int8_t rsvd; - } __attribute__((__packed__)) scam[4]; + } __packed scam[4]; u_int8_t spare_devices[15 * 8]; u_int8_t trailer[6]; /* 0xfe 0xfe 0x00 0x00 0x00 0x00 */ -} __attribute__((__packed__)); +} __packed; #define SIOP_NVRAM_TEK_SIZE 64 #define SIOP_NVRAM_TEK_93c46_ADDRESS 0 @@ -516,7 +516,7 @@ struct nvram_tekram { #define NVRAM_TEK_TARG_F_WIDE_NEGO 0x20 u_int8_t sync_index; u_int16_t word2; - } __attribute__((__packed__)) target[16]; + } __packed target[16]; u_int8_t host_id; u_int8_t flags; #define NVRAM_TEK_F_MORE_THAN_2_DRIVES 0x01 @@ -531,4 +531,4 @@ struct nvram_tekram { u_int16_t flags1; #define NVRAM_TEK_F_F2_F6_ENABLED 0x0001 u_int16_t spare[29]; -} __attribute__((__packed__)); +} __packed; diff --git a/sys/dev/ic/siopvar.h b/sys/dev/ic/siopvar.h index 746a3dd3249..21bafe3d8cb 100644 --- a/sys/dev/ic/siopvar.h +++ b/sys/dev/ic/siopvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: siopvar.h,v 1.9 2003/10/21 18:58:49 jmc Exp $ */ +/* $OpenBSD: siopvar.h,v 1.10 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: siopvar.h,v 1.18 2002/04/23 20:41:15 bouyer Exp $ */ /* @@ -45,7 +45,7 @@ struct siop_xfer { /* u_int32_t resel[sizeof(load_dsa) / sizeof(load_dsa[0])]; */ /* Add some entries to make size 384 bytes (256+128) */ u_int32_t resel[36]; -} __attribute__((__packed__)); +} __packed; /* * This describes a command handled by the SCSI controller diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h index 9c3762c1245..751a4ee6e3e 100644 --- a/sys/dev/ic/siopvar_common.h +++ b/sys/dev/ic/siopvar_common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: siopvar_common.h,v 1.17 2003/10/21 18:58:49 jmc Exp $ */ +/* $OpenBSD: siopvar_common.h,v 1.18 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: siopvar_common.h,v 1.22 2002/10/23 02:32:36 christos Exp $ */ /* @@ -41,7 +41,7 @@ typedef struct scr_table { u_int32_t count; u_int32_t addr; -} scr_table_t __attribute__((__packed__)); +} scr_table_t __packed; /* Number of scatter/gather entries */ /* XXX Ensure alignment of siop_xfer's. */ @@ -66,7 +66,7 @@ struct siop_common_xfer { scr_table_t cmd; /* 88 */ scr_table_t t_status; /* 96 */ scr_table_t data[SIOP_NSG]; /* 104 */ -} __attribute__((__packed__)); +} __packed; /* status can hold the SCSI_* status values, and 2 additional values: */ #define SCSI_SIOP_NOCHECK 0xfe /* don't check the scsi status */ diff --git a/sys/dev/ic/uhareg.h b/sys/dev/ic/uhareg.h index e0ffe6bb05c..00d45a2e778 100644 --- a/sys/dev/ic/uhareg.h +++ b/sys/dev/ic/uhareg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uhareg.h,v 1.3 2000/12/06 21:16:45 mickey Exp $ */ +/* $OpenBSD: uhareg.h,v 1.4 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: uhareg.h,v 1.2 1996/09/01 00:54:41 mycroft Exp $ */ /* @@ -226,5 +226,5 @@ struct uha_mscp { #define MSCP_ALLOC 0x01 #define MSCP_ABORT 0x02 int timeout; -} __attribute__((__packed__)); +} __packed; diff --git a/sys/dev/isa/mcdreg.h b/sys/dev/isa/mcdreg.h index effa19f7d25..9a527d2b892 100644 --- a/sys/dev/isa/mcdreg.h +++ b/sys/dev/isa/mcdreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mcdreg.h,v 1.5 2000/12/06 17:18:41 deraadt Exp $ */ +/* $OpenBSD: mcdreg.h,v 1.6 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: mcdreg.h,v 1.8 1997/04/04 18:59:37 christos Exp $ */ /* @@ -163,14 +163,14 @@ union mcd_qchninfo { u_char upccode[7]; u_char junk[2]; } upc; -} __attribute__((__packed__)); +} __packed; struct mcd_volinfo { bcd_t trk_low; bcd_t trk_high; bcd_t vol_msf[3]; bcd_t trk1_msf[3]; -} __attribute__((__packed__)); +} __packed; struct mcd_result { u_char length; @@ -185,7 +185,7 @@ struct mcd_result { union mcd_qchninfo qchninfo; struct mcd_volinfo volinfo; } data; -} __attribute__((__packed__)); +} __packed; struct mcd_command { u_char opcode; @@ -223,19 +223,19 @@ struct mcd_command { u_char data1, data2; } config; } data; -} __attribute__((__packed__)); +} __packed; struct mcd_mbox { struct mcd_command cmd; struct mcd_result res; -} __attribute__((__packed__)); +} __packed; struct mcd_volume { u_char v0l; u_char v0rs; u_char v0r; u_char v0ls; -} __attribute__((__packed__)); +} __packed; struct mcd_rawsector { u_char sync1[12]; @@ -244,4 +244,4 @@ struct mcd_rawsector { u_char subheader2[4]; u_char data[MCD_BLKSIZE_COOKED]; u_char ecc_bits[280]; -} __attribute__((__packed__)); +} __packed; diff --git a/sys/dev/pci/czreg.h b/sys/dev/pci/czreg.h index 4567d567b90..3114ef4e5a6 100644 --- a/sys/dev/pci/czreg.h +++ b/sys/dev/pci/czreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: czreg.h,v 1.1 2001/06/21 13:21:50 nate Exp $ */ +/* $OpenBSD: czreg.h,v 1.2 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD$ */ /*- @@ -171,7 +171,7 @@ struct zfirm_header { u_int32_t zfh_nblocks; u_int32_t zfh_blockoff; u_int32_t zfh_reserved[9]; -} __attribute__((__packed__)); +} __packed; struct zfirm_config { u_int8_t zfc_name[64]; @@ -179,7 +179,7 @@ struct zfirm_config { u_int32_t zfc_function; u_int32_t zfc_nblocks; u_int32_t zfc_blocklist[ZFIRM_MAX_BLOCKS]; -} __attribute__((__packed__)); +} __packed; #define ZFC_FUNCTION_NORMAL 0 /* normal operation */ #define ZFC_FUNCTION_TEST 1 /* test mode operation */ @@ -189,7 +189,7 @@ struct zfirm_block { u_int32_t zfb_fileoff; u_int32_t zfb_ramoff; u_int32_t zfb_size; -} __attribute__((__packed__)); +} __packed; #define ZFB_TYPE_FIRMWARE 0 /* MIPS firmware */ #define ZFB_TYPE_FPGA 1 /* FPGA code */ diff --git a/sys/dev/pci/if_stgereg.h b/sys/dev/pci/if_stgereg.h index 79c6fd01d80..63c63f26595 100644 --- a/sys/dev/pci/if_stgereg.h +++ b/sys/dev/pci/if_stgereg.h @@ -52,7 +52,7 @@ */ struct stge_frag { uint64_t frag_word0; /* address, length */ -} __attribute__((__packed__)); +} __packed; #define FRAG_ADDR(x) (((uint64_t)(x)) << 0) #define FRAG_ADDR_MASK FRAG_ADDR(0xfffffffffULL) @@ -69,7 +69,7 @@ struct stge_tfd { uint64_t tfd_control; /* control bits */ /* the buffer fragments */ struct stge_frag tfd_frags[STGE_NTXFRAGS]; -} __attribute__((__packed__)); +} __packed; #define TFD_FrameId(x) ((x) << 0) #define TFD_FrameId_MAX 0xffff @@ -98,7 +98,7 @@ struct stge_rfd { uint64_t rfd_next; /* next RFD in list */ uint64_t rfd_status; /* status bits */ struct stge_frag rfd_frag; /* the buffer */ -} __attribute__((__packed__)); +} __packed; #define RFD_RxDMAFrameLen(x) ((x) & 0xffff) #define RFD_RxFIFOOverrun (1ULL << 16) diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index 596d0df6ebd..e70882fea25 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcireg.h,v 1.24 2003/10/06 16:04:45 fgsch Exp $ */ +/* $OpenBSD: pcireg.h,v 1.25 2003/11/16 20:30:06 avsm Exp $ */ /* $NetBSD: pcireg.h,v 1.26 2000/05/10 16:58:42 thorpej Exp $ */ /* @@ -511,14 +511,14 @@ typedef u_int8_t pci_intr_line_t; struct pci_vpd_smallres { uint8_t vpdres_byte0; /* length of data + tag */ /* Actual data. */ -} __attribute__((__packed__)); +} __packed; struct pci_vpd_largeres { uint8_t vpdres_byte0; uint8_t vpdres_len_lsb; /* length of data only */ uint8_t vpdres_len_msb; /* Actual data. */ -} __attribute__((__packed__)); +} __packed; #define PCI_VPDRES_ISLARGE(x) ((x) & 0x80) @@ -539,7 +539,7 @@ struct pci_vpd { uint8_t vpd_key1; uint8_t vpd_len; /* length of data only */ /* Actual data. */ -} __attribute__((__packed__)); +} __packed; /* * Recommended VPD fields: diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index a4780f9773a..addd5a3bcd0 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.h,v 1.22 2003/07/08 13:19:09 nate Exp $ */ +/* $OpenBSD: usb.h,v 1.23 2003/11/16 20:30:07 avsm Exp $ */ /* $NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ @@ -100,7 +100,7 @@ typedef u_int8_t uDWord[4]; #define USETDW(w,v) (*(u_int32_t *)(w) = (v)) #endif -#define UPACKED __attribute__((__packed__)) +#define UPACKED __packed typedef struct { uByte bmRequestType; diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index e9df62f152e..0accee5b6f0 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bridgestp.c,v 1.15 2003/06/02 18:42:56 jason Exp $ */ +/* $OpenBSD: bridgestp.c,v 1.16 2003/11/16 20:30:07 avsm Exp $ */ /* * Copyright (c) 2000 Jason L. Wright (jason@thought.net) @@ -108,7 +108,7 @@ struct bstp_cbpdu { u_int16_t cbu_maxage; /* maximum age */ u_int16_t cbu_hellotime; /* hello time */ u_int16_t cbu_forwarddelay; /* forwarding delay */ -} __attribute__((__packed__)); +} __packed; /* topology change notification bridge protocol data unit */ struct bstp_tbpdu { @@ -118,7 +118,7 @@ struct bstp_tbpdu { u_int16_t tbu_protoid; /* protocol id */ u_int8_t tbu_protover; /* protocol version */ u_int8_t tbu_bpdutype; /* message type */ -} __attribute__((__packed__)); +} __packed; u_int8_t bstp_etheraddr[] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 }; diff --git a/sys/net/if_gre.h b/sys/net/if_gre.h index e09cc0c52bd..6230f00ba88 100644 --- a/sys/net/if_gre.h +++ b/sys/net/if_gre.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.h,v 1.7 2003/11/07 10:16:46 jmc Exp $ */ +/* $OpenBSD: if_gre.h,v 1.8 2003/11/16 20:30:07 avsm Exp $ */ /* $NetBSD: if_gre.h,v 1.5 1999/11/19 20:41:19 thorpej Exp $ */ /* @@ -76,12 +76,12 @@ struct gre_h { struct gre_sre[] routing Routing fileds (see below) Present if (rt_pres == 1) */ -} __attribute__((__packed__)); +} __packed; struct greip { struct ip gi_i; struct gre_h gi_g; -} __attribute__((__packed__)); +} __packed; #define gi_pr gi_i.ip_p #define gi_len gi_i.ip_len @@ -120,12 +120,12 @@ struct mobile_h { u_int16_t hcrc; /* header checksum */ u_int32_t odst; /* original destination address */ u_int32_t osrc; /* original source addr, if S-bit set */ -} __attribute__((__packed__)); +} __packed; struct mobip_h { struct ip mi; struct mobile_h mh; -} __attribute__((__packed__)); +} __packed; #define MOB_H_SIZ_S (sizeof(struct mobile_h) - sizeof(u_int32_t)) diff --git a/sys/net/if_ieee80211.h b/sys/net/if_ieee80211.h index d5b68c8f500..e86de84394c 100644 --- a/sys/net/if_ieee80211.h +++ b/sys/net/if_ieee80211.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ieee80211.h,v 1.8 2003/09/21 11:22:24 fgsch Exp $ */ +/* $OpenBSD: if_ieee80211.h,v 1.9 2003/11/16 20:30:07 avsm Exp $ */ /* $NetBSD: if_ieee80211.h,v 1.36 2003/07/06 20:54:24 dyoung Exp $ */ /*- @@ -48,7 +48,7 @@ struct ieee80211_plcp_hdr { u_int16_t i_crc; /* CRC16 of i_signal, i_service, * i_length */ -} __attribute__((__packed__)); +} __packed; #define IEEE80211_PLCP_SFD 0xF3A0 #define IEEE80211_PLCP_SERVICE 0x00 diff --git a/sys/net/if_token.h b/sys/net/if_token.h index 666cc45fb1d..00dc3e2361d 100644 --- a/sys/net/if_token.h +++ b/sys/net/if_token.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_token.h,v 1.5 2003/11/07 10:16:46 jmc Exp $ */ +/* $OpenBSD: if_token.h,v 1.6 2003/11/16 20:30:07 avsm Exp $ */ /* $NetBSD: if_token.h,v 1.6 1999/11/19 20:41:19 thorpej Exp $ */ /* @@ -43,7 +43,7 @@ struct token_header { u_int8_t token_fc; /* frame control field */ u_int8_t token_dhost[ISO88025_ADDR_LEN]; /* dest. address */ u_int8_t token_shost[ISO88025_ADDR_LEN]; /* source address */ -} __attribute__((__packed__)); +} __packed; #define TOKEN_MAX_BRIDGE 8 @@ -51,7 +51,7 @@ struct token_header { struct token_rif { u_int16_t tr_rcf; /* route control field */ u_int16_t tr_rdf[TOKEN_MAX_BRIDGE]; /* route-designator fields */ -} __attribute__((__packed__)); +} __packed; /* standard values for address control and frame control field */ #define TOKEN_AC 0x10 diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index abfc4c732ef..085e00fed44 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.h,v 1.27 2003/06/11 02:54:02 itojun Exp $ */ +/* $OpenBSD: icmp6.h,v 1.28 2003/11/16 20:30:07 avsm Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ /* @@ -76,7 +76,7 @@ struct icmp6_hdr { u_int16_t icmp6_un_data16[2]; /* type-specific field */ u_int8_t icmp6_un_data8[4]; /* type-specific field */ } icmp6_dataun; -} __attribute__((__packed__)); +} __packed; #define icmp6_data32 icmp6_dataun.icmp6_un_data32 #define icmp6_data16 icmp6_dataun.icmp6_un_data16 @@ -175,7 +175,7 @@ struct icmp6_hdr { struct mld_hdr { struct icmp6_hdr mld_icmp6_hdr; struct in6_addr mld_addr; /* multicast address */ -} __attribute__((__packed__)); +} __packed; /* definitions to provide backward compatibility to old KAME applications */ #ifndef _KERNEL @@ -202,7 +202,7 @@ struct mld_hdr { struct nd_router_solicit { /* router solicitation */ struct icmp6_hdr nd_rs_hdr; /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_rs_type nd_rs_hdr.icmp6_type #define nd_rs_code nd_rs_hdr.icmp6_code @@ -214,7 +214,7 @@ struct nd_router_advert { /* router advertisement */ u_int32_t nd_ra_reachable; /* reachable time */ u_int32_t nd_ra_retransmit; /* retransmit timer */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_ra_type nd_ra_hdr.icmp6_type #define nd_ra_code nd_ra_hdr.icmp6_code @@ -229,7 +229,7 @@ struct nd_neighbor_solicit { /* neighbor solicitation */ struct icmp6_hdr nd_ns_hdr; struct in6_addr nd_ns_target; /*target address */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_ns_type nd_ns_hdr.icmp6_type #define nd_ns_code nd_ns_hdr.icmp6_code @@ -240,7 +240,7 @@ struct nd_neighbor_advert { /* neighbor advertisement */ struct icmp6_hdr nd_na_hdr; struct in6_addr nd_na_target; /* target address */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_na_type nd_na_hdr.icmp6_type #define nd_na_code nd_na_hdr.icmp6_code @@ -263,7 +263,7 @@ struct nd_redirect { /* redirect */ struct in6_addr nd_rd_target; /* target address */ struct in6_addr nd_rd_dst; /* destination address */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_rd_type nd_rd_hdr.icmp6_type #define nd_rd_code nd_rd_hdr.icmp6_code @@ -274,7 +274,7 @@ struct nd_opt_hdr { /* Neighbor discovery option header */ u_int8_t nd_opt_type; u_int8_t nd_opt_len; /* followed by option specific data*/ -} __attribute__((__packed__)); +} __packed; #define ND_OPT_SOURCE_LINKADDR 1 #define ND_OPT_TARGET_LINKADDR 2 @@ -291,7 +291,7 @@ struct nd_opt_prefix_info { /* prefix information */ u_int32_t nd_opt_pi_preferred_time; u_int32_t nd_opt_pi_reserved2; struct in6_addr nd_opt_pi_prefix; -} __attribute__((__packed__)); +} __packed; #define ND_OPT_PI_FLAG_ONLINK 0x80 #define ND_OPT_PI_FLAG_AUTO 0x40 @@ -302,14 +302,14 @@ struct nd_opt_rd_hdr { /* redirected header */ u_int16_t nd_opt_rh_reserved1; u_int32_t nd_opt_rh_reserved2; /* followed by IP header and data */ -} __attribute__((__packed__)); +} __packed; struct nd_opt_mtu { /* MTU option */ u_int8_t nd_opt_mtu_type; u_int8_t nd_opt_mtu_len; u_int16_t nd_opt_mtu_reserved; u_int32_t nd_opt_mtu_mtu; -} __attribute__((__packed__)); +} __packed; /* * icmp6 namelookup @@ -324,7 +324,7 @@ struct icmp6_namelookup { u_int8_t icmp6_nl_name[3]; #endif /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; /* * icmp6 node information @@ -333,7 +333,7 @@ struct icmp6_nodeinfo { struct icmp6_hdr icmp6_ni_hdr; u_int8_t icmp6_ni_nonce[8]; /* could be followed by reply data */ -} __attribute__((__packed__)); +} __packed; #define ni_type icmp6_ni_hdr.icmp6_type #define ni_code icmp6_ni_hdr.icmp6_code @@ -396,7 +396,7 @@ struct ni_reply_fqdn { u_int32_t ni_fqdn_ttl; /* TTL */ u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */ u_int8_t ni_fqdn_name[3]; /* XXX: alignment */ -} __attribute__((__packed__)); +} __packed; /* * Router Renumbering. as router-renum-08.txt @@ -407,7 +407,7 @@ struct icmp6_router_renum { /* router renumbering header */ u_int8_t rr_flags; u_int16_t rr_maxdelay; u_int32_t rr_reserved; -} __attribute__((__packed__)); +} __packed; #define ICMP6_RR_FLAGS_TEST 0x80 #define ICMP6_RR_FLAGS_REQRESULT 0x40 @@ -429,7 +429,7 @@ struct rr_pco_match { /* match prefix part */ u_int8_t rpm_maxlen; u_int16_t rpm_reserved; struct in6_addr rpm_prefix; -} __attribute__((__packed__)); +} __packed; #define RPM_PCO_ADD 1 #define RPM_PCO_CHANGE 2 @@ -445,7 +445,7 @@ struct rr_pco_use { /* use prefix part */ u_int32_t rpu_pltime; u_int32_t rpu_flags; struct in6_addr rpu_prefix; -} __attribute__((__packed__)); +} __packed; #define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80 #define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40 @@ -463,7 +463,7 @@ struct rr_result { /* router renumbering result message */ u_int8_t rrr_matchedlen; u_int32_t rrr_ifid; struct in6_addr rrr_prefix; -} __attribute__((__packed__)); +} __packed; #if BYTE_ORDER == BIG_ENDIAN #define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 #define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index 0eac1fcca6d..4239e4629a7 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6.h,v 1.12 2003/06/11 04:42:01 itojun Exp $ */ +/* $OpenBSD: ip6.h,v 1.13 2003/11/16 20:30:07 avsm Exp $ */ /* $KAME: ip6.h,v 1.45 2003/06/05 04:46:38 keiichi Exp $ */ /* @@ -81,7 +81,7 @@ struct ip6_hdr { } ip6_ctlun; struct in6_addr ip6_src; /* source address */ struct in6_addr ip6_dst; /* destination address */ -} __attribute__((__packed__)); +} __packed; #define ip6_vfc ip6_ctlun.ip6_un2_vfc #define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow @@ -115,7 +115,7 @@ struct ip6_hdr { struct ip6_ext { u_int8_t ip6e_nxt; u_int8_t ip6e_len; -} __attribute__((__packed__)); +} __packed; /* Hop-by-Hop options header */ /* XXX should we pad it to force alignment on an 8-byte boundary? */ @@ -123,7 +123,7 @@ struct ip6_hbh { u_int8_t ip6h_nxt; /* next header */ u_int8_t ip6h_len; /* length in units of 8 octets */ /* followed by options */ -} __attribute__((__packed__)); +} __packed; /* Destination options header */ /* XXX should we pad it to force alignment on an 8-byte boundary? */ @@ -131,7 +131,7 @@ struct ip6_dest { u_int8_t ip6d_nxt; /* next header */ u_int8_t ip6d_len; /* length in units of 8 octets */ /* followed by options */ -} __attribute__((__packed__)); +} __packed; /* Option types and related macros */ #define IP6OPT_PAD1 0x00 /* 00 0 00000 */ @@ -160,14 +160,14 @@ struct ip6_dest { struct ip6_opt { u_int8_t ip6o_type; u_int8_t ip6o_len; -} __attribute__((__packed__)); +} __packed; /* Jumbo Payload Option */ struct ip6_opt_jumbo { u_int8_t ip6oj_type; u_int8_t ip6oj_len; u_int8_t ip6oj_jumbo_len[4]; -} __attribute__((__packed__)); +} __packed; #define IP6OPT_JUMBO_LEN 6 /* NSAP Address Option */ @@ -178,21 +178,21 @@ struct ip6_opt_nsap { u_int8_t ip6on_dst_nsap_len; /* followed by source NSAP */ /* followed by destination NSAP */ -} __attribute__((__packed__)); +} __packed; /* Tunnel Limit Option */ struct ip6_opt_tunnel { u_int8_t ip6ot_type; u_int8_t ip6ot_len; u_int8_t ip6ot_encap_limit; -} __attribute__((__packed__)); +} __packed; /* Router Alert Option */ struct ip6_opt_router { u_int8_t ip6or_type; u_int8_t ip6or_len; u_int8_t ip6or_value[2]; -} __attribute__((__packed__)); +} __packed; /* Router alert values (in network byte order) */ #if BYTE_ORDER == BIG_ENDIAN #define IP6_ALERT_MLD 0x0000 @@ -213,7 +213,7 @@ struct ip6_rthdr { u_int8_t ip6r_type; /* routing type */ u_int8_t ip6r_segleft; /* segments left */ /* followed by routing type specific data */ -} __attribute__((__packed__)); +} __packed; /* Type 0 Routing header */ struct ip6_rthdr0 { @@ -222,7 +222,7 @@ struct ip6_rthdr0 { u_int8_t ip6r0_type; /* always zero */ u_int8_t ip6r0_segleft; /* segments left */ u_int32_t ip6r0_reserved; /* reserved field */ -} __attribute__((__packed__)); +} __packed; /* Fragment header */ struct ip6_frag { @@ -230,7 +230,7 @@ struct ip6_frag { u_int8_t ip6f_reserved; /* reserved field */ u_int16_t ip6f_offlg; /* offset, reserved, and flag */ u_int32_t ip6f_ident; /* identification */ -} __attribute__((__packed__)); +} __packed; #if BYTE_ORDER == BIG_ENDIAN #define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h index 0e2bc6a974c..057699b9d26 100644 --- a/sys/netinet/ip_carp.h +++ b/sys/netinet/ip_carp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.h,v 1.3 2003/11/07 23:38:48 mcbride Exp $ */ +/* $OpenBSD: ip_carp.h,v 1.4 2003/11/16 20:30:07 avsm Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -43,7 +43,7 @@ struct carp_header { u_int16_t carp_cksum; u_int32_t carp_counter[2]; unsigned char carp_md[20]; /* sha1 message digest */ -} __attribute__((__packed__)); +} __packed; #define CARP_DFLTTL 255 diff --git a/sys/netinet6/in6_cksum.c b/sys/netinet6/in6_cksum.c index 52bc1cce9f7..254f2ef7fa9 100644 --- a/sys/netinet6/in6_cksum.c +++ b/sys/netinet6/in6_cksum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_cksum.c,v 1.12 2003/07/18 06:48:05 itojun Exp $ */ +/* $OpenBSD: in6_cksum.c,v 1.13 2003/11/16 20:30:07 avsm Exp $ */ /* $KAME: in6_cksum.c,v 1.10 2000/12/03 00:53:59 itojun Exp $ */ /* @@ -101,7 +101,7 @@ in6_cksum(m, nxt, off, len) u_int32_t ph_len; u_int8_t ph_zero[3]; u_int8_t ph_nxt; - } ph __attribute__((__packed__)); + } ph __packed; } uph; union { u_int8_t c[2]; |