diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2002-09-23 18:54:32 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2002-09-23 18:54:32 +0000 |
commit | 4f492bfab53a4732222656e2be91c50a2df9e13c (patch) | |
tree | 8158103cc2a98a399f6b85e558005d61c5a4bb29 /sys/boot | |
parent | b8581e0d567d1cdf5ddb03df7e535ffd181347f7 (diff) | |
download | src-4f492bfab53a4732222656e2be91c50a2df9e13c.tar.gz src-4f492bfab53a4732222656e2be91c50a2df9e13c.zip |
use __packed.
Notes
Notes:
svn path=/head/; revision=103870
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/i386/libi386/biosmem.c | 2 | ||||
-rw-r--r-- | sys/boot/i386/libi386/biospnp.c | 46 | ||||
-rw-r--r-- | sys/boot/i386/libi386/pxe.h | 4 | ||||
-rw-r--r-- | sys/boot/pc98/libpc98/biosmem.c | 2 |
4 files changed, 27 insertions, 27 deletions
diff --git a/sys/boot/i386/libi386/biosmem.c b/sys/boot/i386/libi386/biosmem.c index 7614e843ce49..718445273f4c 100644 --- a/sys/boot/i386/libi386/biosmem.c +++ b/sys/boot/i386/libi386/biosmem.c @@ -42,7 +42,7 @@ struct smap { u_int64_t base; u_int64_t length; u_int32_t type; -} __attribute__ ((packed)); +} __packed; static struct smap smap; diff --git a/sys/boot/i386/libi386/biospnp.c b/sys/boot/i386/libi386/biospnp.c index 66ef1a52f4da..1bf5a22dab2e 100644 --- a/sys/boot/i386/libi386/biospnp.c +++ b/sys/boot/i386/libi386/biospnp.c @@ -48,37 +48,37 @@ struct pnphandler biospnphandler = struct pnp_ICstructure { - u_int8_t pnp_signature[4] __attribute__ ((packed)); - u_int8_t pnp_version __attribute__ ((packed)); - u_int8_t pnp_length __attribute__ ((packed)); - u_int16_t pnp_BIOScontrol __attribute__ ((packed)); - u_int8_t pnp_checksum __attribute__ ((packed)); - u_int32_t pnp_eventflag __attribute__ ((packed)); - u_int16_t pnp_rmip __attribute__ ((packed)); - u_int16_t pnp_rmcs __attribute__ ((packed)); - u_int16_t pnp_pmip __attribute__ ((packed)); - u_int32_t pnp_pmcs __attribute__ ((packed)); - u_int8_t pnp_OEMdev[4] __attribute__ ((packed)); - u_int16_t pnp_rmds __attribute__ ((packed)); - u_int32_t pnp_pmds __attribute__ ((packed)); + u_int8_t pnp_signature[4] __packed; + u_int8_t pnp_version __packed; + u_int8_t pnp_length __packed; + u_int16_t pnp_BIOScontrol __packed; + u_int8_t pnp_checksum __packed; + u_int32_t pnp_eventflag __packed; + u_int16_t pnp_rmip __packed; + u_int16_t pnp_rmcs __packed; + u_int16_t pnp_pmip __packed; + u_int32_t pnp_pmcs __packed; + u_int8_t pnp_OEMdev[4] __packed; + u_int16_t pnp_rmds __packed; + u_int32_t pnp_pmds __packed; }; struct pnp_devNode { - u_int16_t dn_size __attribute__ ((packed)); - u_int8_t dn_handle __attribute__ ((packed)); - u_int8_t dn_id[4] __attribute__ ((packed)); - u_int8_t dn_type[3] __attribute__ ((packed)); - u_int16_t dn_attrib __attribute__ ((packed)); - u_int8_t dn_data[1] __attribute__ ((packed)); + u_int16_t dn_size __packed; + u_int8_t dn_handle __packed; + u_int8_t dn_id[4] __packed; + u_int8_t dn_type[3] __packed; + u_int16_t dn_attrib __packed; + u_int8_t dn_data[1] __packed; }; struct pnp_isaConfiguration { - u_int8_t ic_revision __attribute__ ((packed)); - u_int8_t ic_nCSN __attribute__ ((packed)); - u_int16_t ic_rdport __attribute__ ((packed)); - u_int16_t ic_reserved __attribute__ ((packed)); + u_int8_t ic_revision __packed; + u_int8_t ic_nCSN __packed; + u_int16_t ic_rdport __packed; + u_int16_t ic_reserved __packed; }; static struct pnp_ICstructure *pnp_Icheck = NULL; diff --git a/sys/boot/i386/libi386/pxe.h b/sys/boot/i386/libi386/pxe.h index 3c9f2ff09f9b..f1f22aac712f 100644 --- a/sys/boot/i386/libi386/pxe.h +++ b/sys/boot/i386/libi386/pxe.h @@ -44,11 +44,11 @@ * out why PXE was mis-reading structures I was passing it (at least * from my point of view) * - * Solution: use gcc's '__attribute__ ((packed))' to correctly align + * Solution: use gcc's '__packed' to correctly align * structures passed into PXE * Question: does this really work for PXE's expected ABI? */ -#define PACKED __attribute__ ((packed)) +#define PACKED __packed #define S_SIZE(s) s, sizeof(s) - 1 diff --git a/sys/boot/pc98/libpc98/biosmem.c b/sys/boot/pc98/libpc98/biosmem.c index d111755e9ea9..b68714de1866 100644 --- a/sys/boot/pc98/libpc98/biosmem.c +++ b/sys/boot/pc98/libpc98/biosmem.c @@ -43,7 +43,7 @@ struct smap { u_int64_t base; u_int64_t length; u_int32_t type; -} __attribute__ ((packed)); +} __packed; static struct smap smap; #endif |