]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Add gcc_struct to all packed structures when compiling with mingw.
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 15 Dec 2013 13:14:30 +0000 (14:14 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 15 Dec 2013 13:14:30 +0000 (14:14 +0100)
Just "packed" doesn't always pack the way we expect.

105 files changed:
ChangeLog
grub-core/bus/usb/ohci.c
grub-core/bus/usb/serial/pl2303.c
grub-core/bus/usb/uhci.c
grub-core/commands/i386/pc/drivemap.c
grub-core/commands/verify.c
grub-core/disk/dmraid_nvidia.c
grub-core/disk/geli.c
grub-core/disk/ldm.c
grub-core/disk/luks.c
grub-core/disk/mdraid1x_linux.c
grub-core/disk/mdraid_linux.c
grub-core/disk/usbms.c
grub-core/fs/affs.c
grub-core/fs/bfs.c
grub-core/fs/btrfs.c
grub-core/fs/cpio.c
grub-core/fs/cpio_be.c
grub-core/fs/fat.c
grub-core/fs/hfs.c
grub-core/fs/hfsplus.c
grub-core/fs/hfspluscomp.c
grub-core/fs/iso9660.c
grub-core/fs/jfs.c
grub-core/fs/newc.c
grub-core/fs/nilfs2.c
grub-core/fs/ntfs.c
grub-core/fs/odc.c
grub-core/fs/reiserfs.c
grub-core/fs/sfs.c
grub-core/fs/squash4.c
grub-core/fs/tar.c
grub-core/fs/udf.c
grub-core/fs/ufs.c
grub-core/fs/xfs.c
grub-core/fs/zfs/zfs_lz4.c
grub-core/io/lzopio.c
grub-core/kern/i386/pc/mmap.c
grub-core/loader/i386/bsd.c
grub-core/loader/i386/linux.c
grub-core/loader/linux.c
grub-core/mmap/i386/pc/mmap.c
grub-core/net/arp.c
grub-core/net/dns.c
grub-core/net/drivers/i386/pc/pxe.c
grub-core/net/ethernet.c
grub-core/net/icmp.c
grub-core/net/icmp6.c
grub-core/net/ip.c
grub-core/net/tcp.c
grub-core/net/tftp.c
grub-core/partmap/acorn.c
grub-core/partmap/amiga.c
grub-core/partmap/dvh.c
grub-core/partmap/sun.c
grub-core/partmap/sunpc.c
grub-core/tests/video_checksum.c
grub-core/video/readers/tga.c
include/grub/acpi.h
include/grub/bsdlabel.h
include/grub/btrfs.h
include/grub/cbfs_core.h
include/grub/efi/api.h
include/grub/efi/pe32.h
include/grub/efiemu/efiemu.h
include/grub/efiemu/runtime.h
include/grub/exfat.h
include/grub/fat.h
include/grub/gpt_partition.h
include/grub/hfs.h
include/grub/hfsplus.h
include/grub/i386/bsd.h
include/grub/i386/coreboot/lbio.h
include/grub/i386/gdb.h
include/grub/i386/linux.h
include/grub/i386/macho.h
include/grub/i386/netbsd_bootinfo.h
include/grub/i386/openbsd_bootarg.h
include/grub/i386/pc/biosdisk.h
include/grub/i386/pc/int.h
include/grub/i386/pc/pxe.h
include/grub/i386/pc/vbe.h
include/grub/i386/xnu.h
include/grub/lvm.h
include/grub/macho.h
include/grub/msdos_partition.h
include/grub/net.h
include/grub/net/udp.h
include/grub/ntfs.h
include/grub/offsets.h
include/grub/scsicmd.h
include/grub/sparc64/ieee1275/boot.h
include/grub/types.h
include/grub/unicode.h
include/grub/usbdesc.h
include/grub/usbtrans.h
include/grub/video.h
include/grub/xnu.h
include/grub/zfs/zap_leaf.h
include/grub/zfs/zio.h
include/multiboot.h
include/multiboot2.h
util/grub-mkfont.c
util/grub-mkstandalone.c
util/render-label.c

index 00f2d7fdd607995817563e2a30e9d48c62600b0a..f27d3048215a0da3ae5a723eefbf16cb56f22edb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Add gcc_struct to all packed structures when compiling with mingw.
+
+       Just "packed" doesn't always pack the way we expect.
+
 2013-12-14  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/i386/coreboot/lbio.h: Add missing attribute (packed).
index 3b552d7fc7211288621ce139b7dc08371a6f5656..946a4ed7d5b93b6ee76d63110154e08426e75079 100644 (file)
@@ -47,7 +47,7 @@ struct grub_ohci_hcca
   grub_uint32_t donehead;
 
   grub_uint8_t reserved[116];
-} __attribute__((packed));
+} GRUB_PACKED;
 
 /* OHCI General Transfer Descriptor */
 struct grub_ohci_td
@@ -64,7 +64,7 @@ struct grub_ohci_td
                                * physical address in CPU endian */
   grub_uint32_t tr_index; /* index of TD in transfer */
   grub_uint8_t pad[8 - sizeof (volatile struct grub_ohci_td *)]; /* padding to 32 bytes */
-} __attribute__((packed));
+} GRUB_PACKED;
 
 /* OHCI Endpoint Descriptor.  */
 struct grub_ohci_ed
@@ -73,7 +73,7 @@ struct grub_ohci_ed
   grub_uint32_t td_tail;
   grub_uint32_t td_head;
   grub_uint32_t next_ed;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 typedef volatile struct grub_ohci_td *grub_ohci_td_t;
 typedef volatile struct grub_ohci_ed *grub_ohci_ed_t;
index 08095622ae22f163a8266cb246dcdbe1fed6c857..d1945a2cba6f14e03414bc9683e7f33b3c64d68e 100644 (file)
@@ -55,7 +55,7 @@ struct grub_pl2303_config
   grub_uint8_t stop_bits;
   grub_uint8_t parity;
   grub_uint8_t word_len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static void
 real_config (struct grub_serial_port *port)
index 978cb3f90e1f0a1766df4d996781defafe2b262e..a95fdfe077b8e819d328790ba0e281eebd0d624e 100644 (file)
@@ -105,7 +105,7 @@ struct grub_uhci_qh
   /* Queue heads are aligned on 16 bytes, pad so a queue head is 16
      bytes so we can store many in a 4K page.  */
   grub_uint8_t pad[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* UHCI Transfer Descriptor.  */
 struct grub_uhci_td
@@ -129,7 +129,7 @@ struct grub_uhci_td
 
   /* 3 additional 32 bits words reserved for the Host Controller Driver.  */
   grub_uint32_t data[3];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 typedef volatile struct grub_uhci_td *grub_uhci_td_t;
 typedef volatile struct grub_uhci_qh *grub_uhci_qh_t;
index 7fbf8de873e88ef64345f18992fa69c323ea062c..7f7f2d41c0241bda96168a58f28fef9f6906388c 100644 (file)
@@ -74,7 +74,7 @@ typedef struct drivemap_node
   grub_uint8_t redirto;
 } drivemap_node_t;
 
-typedef struct __attribute__ ((packed)) int13map_node
+typedef struct GRUB_PACKED int13map_node
 {
   grub_uint8_t disknum;
   grub_uint8_t mapto;
index dbe7e83c02326696cca88b51d8949d273288df3e..85a72d65f6befadc61f3365c5b2bef48e0231de8 100644 (file)
@@ -133,7 +133,7 @@ struct signature_v4_header
   grub_uint8_t pkeyalgo;
   grub_uint8_t hash;
   grub_uint16_t hashed_sub;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 const char *hashes[] = {
   [0x01] = "md5",
index 4e7df43106ac4d69c30ece2e5025e65c00dd0be8..6e64055291c7836e8c80654d53662ca29de908a4 100644 (file)
@@ -88,7 +88,7 @@ struct grub_nv_super
   char prodrev[NV_PRODREV_LEN];        /* 0x2C - 0x2F Array product revision */
   grub_uint32_t unit_flags;    /* 0x30 - 0x33 Flags for this disk */
   struct grub_nv_array array;  /* Array information */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_diskfilter_vg *
 grub_dmraid_nv_detect (grub_disk_t disk,
index 73b325c948591c7947b6f53db6a5bd8fccae2f16..9025c9d460798ef3a568aace4b6f0531c5baaa52 100644 (file)
@@ -95,7 +95,7 @@ struct grub_geli_key
   grub_uint8_t iv_key[64];
   grub_uint8_t cipher_key[64];
   grub_uint8_t hmac[64];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_geli_phdr
 {
@@ -111,7 +111,7 @@ struct grub_geli_phdr
   grub_uint32_t niter;
   grub_uint8_t salt[64];
   struct grub_geli_key keys[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
@@ -144,7 +144,7 @@ geli_rekey (struct grub_cryptodisk *dev, grub_uint64_t zoneno)
   const struct {
     char magic[4];
     grub_uint64_t zone;
-  } __attribute__ ((packed)) tohash
+  } GRUB_PACKED tohash
       = { {'e', 'k', 'e', 'y'}, grub_cpu_to_le64 (zoneno) };
   GRUB_PROPERLY_ALIGNED_ARRAY (key, GRUB_CRYPTO_MAX_MDLEN);
 
index f681eea7fe0a9d83e25cd5e2822157a1f7b6708b..d64d0a89df7fb804b14961f98fea7fed4ae72123 100644 (file)
@@ -49,7 +49,7 @@ struct grub_ldm_vblk {
   grub_uint8_t type;
   grub_uint32_t unused2;
   grub_uint8_t dynamic[104];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #define LDM_VBLK_MAGIC "VBLK"
 
 enum
@@ -83,7 +83,7 @@ struct grub_ldm_label
   grub_uint64_t pv_size;
   grub_uint64_t config_start;
   grub_uint64_t config_size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 #define LDM_MAGIC "PRIVHEAD"
index 46f47c2b6a8c4a853bc8421886ecd426d1a3bf26..25020294712b57779f7a2c44cbe48860d28984c6 100644 (file)
@@ -56,7 +56,7 @@ struct grub_luks_phdr
     grub_uint32_t keyMaterialOffset;
     grub_uint32_t stripes;
   } keyblock[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 typedef struct grub_luks_phdr *grub_luks_phdr_t;
 
index a0e65a8cc41505f3f73fd187f0c20ed4aee8397b..7cc80d3df39f75072bae5c81f0bae3fff1062ccd 100644 (file)
@@ -97,7 +97,7 @@ struct grub_raid_super_1x
    */
   grub_uint16_t dev_roles[0];  /* Role in array, or 0xffff for a spare, or 0xfffe for faulty.  */
 };
-/* Could be __attribute__ ((packed)), but since all members in this struct
+/* Could be GRUB_PACKED, but since all members in this struct
    are already appropriately aligned, we can omit this and avoid suboptimal
    assembly in some cases.  */
 
index eb679f5ce1441f81aa6eba4ed82cc841d21c8bf4..4aa5882352ebe2a8d89487c6bcd3bc4f5d5207ec 100644 (file)
@@ -175,7 +175,7 @@ struct grub_raid_super_09
    * Active descriptor
    */
   struct grub_raid_disk_09 this_disk;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_diskfilter_vg *
 grub_mdraid_detect (grub_disk_t disk,
index af92243d2f0e36550db12244c64a1c986554cbec..30756aee52963f8e3dbc532560bd5efe1e9d52ac 100644 (file)
@@ -44,7 +44,7 @@ struct grub_usbms_cbw
   grub_uint8_t lun;
   grub_uint8_t length;
   grub_uint8_t cbwcb[16];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usbms_csw
 {
@@ -52,7 +52,7 @@ struct grub_usbms_csw
   grub_uint32_t tag;
   grub_uint32_t residue;
   grub_uint8_t status;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usbms_dev
 {
index 15f7d9dc6f6a9f712c45d3a48d19864a88dc6fb5..f673897e0fd7ee795f18b6eaa3be9b42c212d91b 100644 (file)
@@ -36,7 +36,7 @@ struct grub_affs_bblock
   grub_uint8_t flags;
   grub_uint32_t checksum;
   grub_uint32_t rootblock;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Set if the filesystem is a AFFS filesystem.  Otherwise this is an
    OFS filesystem.  */
@@ -51,14 +51,14 @@ struct grub_affs_rblock
   grub_uint32_t unused2;
   grub_uint32_t checksum;
   grub_uint32_t hashtable[1];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_affs_time
 {
   grub_int32_t day;
   grub_uint32_t min;
   grub_uint32_t hz;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The second part of a file header block.  */
 struct grub_affs_file
@@ -76,7 +76,7 @@ struct grub_affs_file
   grub_uint32_t parent;
   grub_uint32_t extension;
   grub_uint32_t type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The location of `struct grub_affs_file' relative to the end of a
    file header block.  */
index 36b01efc86cd07fc791e90c0312f0648453b366b..145e771863c7fb59a2cd183f28525dc0622c35f0 100644 (file)
@@ -73,7 +73,7 @@ struct grub_bfs_extent
   grub_uint32_t ag;
   grub_uint16_t start;
   grub_uint16_t len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_bfs_superblock
 {
@@ -89,7 +89,7 @@ struct grub_bfs_superblock
   grub_uint8_t unused3[32];
   grub_uint32_t magic3;
   struct grub_bfs_extent root_dir;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_bfs_inode
 {
@@ -118,11 +118,11 @@ struct grub_bfs_inode
       grub_uint64_t max_double_indirect_range;
       grub_uint64_t size;
       grub_uint32_t pad[4];
-    } __attribute__ ((packed));
+    } GRUB_PACKED;
     char inplace_link[144];
-  } __attribute__ ((packed));
+  } GRUB_PACKED;
   grub_uint8_t small_data[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
 {
@@ -134,7 +134,7 @@ struct grub_bfs_small_data_element_header
   grub_uint32_t type;
   grub_uint16_t name_len;
   grub_uint16_t value_len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_bfs_btree_header
 {
@@ -151,7 +151,7 @@ struct grub_bfs_btree_header
   grub_uint64_t root;
 #endif
   grub_uint32_t unused2[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_bfs_btree_node
 {
@@ -165,7 +165,7 @@ struct grub_bfs_btree_node
   grub_uint16_t count_keys;
   grub_uint16_t total_key_len;
 #endif
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_bfs_data
 {
index a608527566e88b1931f437197dd7e7adf9be938f..b15a9d65d842484094dd0eaa99405d0e2c220f0d 100644 (file)
@@ -53,7 +53,7 @@ struct grub_btrfs_device
   grub_uint64_t device_id;
   grub_uint64_t size;
   grub_uint8_t dummy[0x62 - 0x10];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_superblock
 {
@@ -71,7 +71,7 @@ struct grub_btrfs_superblock
   char label[0x100];
   grub_uint8_t dummy4[0x100];
   grub_uint8_t bootstrap_mapping[0x800];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct btrfs_header
 {
@@ -80,7 +80,7 @@ struct btrfs_header
   grub_uint8_t dummy[0x30];
   grub_uint32_t nitems;
   grub_uint8_t level;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_device_desc
 {
@@ -122,28 +122,28 @@ struct grub_btrfs_chunk_item
   grub_uint8_t dummy2[0xc];
   grub_uint16_t nstripes;
   grub_uint16_t nsubstripes;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_chunk_stripe
 {
   grub_uint64_t device_id;
   grub_uint64_t offset;
   grub_btrfs_uuid_t device_uuid;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_leaf_node
 {
   struct grub_btrfs_key key;
   grub_uint32_t offset;
   grub_uint32_t size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_internal_node
 {
   struct grub_btrfs_key key;
   grub_uint64_t addr;
   grub_uint64_t dummy;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_dir_item
 {
@@ -156,7 +156,7 @@ struct grub_btrfs_dir_item
 #define GRUB_BTRFS_DIR_ITEM_TYPE_SYMLINK 7
   grub_uint8_t type;
   char name[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_leaf_descriptor
 {
@@ -183,7 +183,7 @@ struct grub_btrfs_inode
   grub_uint64_t size;
   grub_uint8_t dummy2[0x70];
   struct grub_btrfs_time mtime;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_btrfs_extent_data
 {
@@ -204,7 +204,7 @@ struct grub_btrfs_extent_data
       grub_uint64_t filled;
     };
   };
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_BTRFS_EXTENT_INLINE 0
 #define GRUB_BTRFS_EXTENT_REGULAR 1
index b14e190f924cebb6602592941eb5805895ac9ed9..dab5f98988e8ac7d9d6d2a76ac4542db745b869c 100644 (file)
@@ -35,7 +35,7 @@ struct head
   grub_uint16_t mtime[2];
   grub_uint16_t namesize[1];
   grub_uint16_t filesize[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static inline unsigned long long
 read_number (const grub_uint16_t *arr, grub_size_t size)
index 83df8195b5ba0f40249d4c6b056a8b22f617cdf7..8465488921f2995b3a3d85c9ee218e7985b811ee 100644 (file)
@@ -35,7 +35,7 @@ struct head
   grub_uint16_t mtime[2];
   grub_uint16_t namesize[1];
   grub_uint16_t filesize[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static inline unsigned long long
 read_number (const grub_uint16_t *arr, grub_size_t size)
index e84f6c6722c04ea26ee3bd4b1fbc7d332c7a1381..79fe864d762b4e4d72812a1629a2464d25c3d6bd 100644 (file)
@@ -92,7 +92,7 @@ struct grub_fat_dir_entry
       grub_uint8_t m_time_tenth;
       grub_uint8_t a_time_tenth;
       grub_uint8_t reserved2[9];
-    }  __attribute__ ((packed)) file;
+    }  GRUB_PACKED file;
     struct {
       grub_uint8_t flags;
       grub_uint8_t reserved1;
@@ -103,17 +103,17 @@ struct grub_fat_dir_entry
       grub_uint32_t reserved3;
       grub_uint32_t first_cluster;
       grub_uint64_t file_size;
-    }   __attribute__ ((packed)) stream_extension;
+    }   GRUB_PACKED stream_extension;
     struct {
       grub_uint8_t flags;
       grub_uint16_t str[15];
-    }  __attribute__ ((packed))  file_name;
+    }  GRUB_PACKED  file_name;
     struct {
       grub_uint8_t character_count;
       grub_uint16_t str[15];
-    }  __attribute__ ((packed))  volume_label;
-  }  __attribute__ ((packed)) type_specific;
-} __attribute__ ((packed));
+    }  GRUB_PACKED  volume_label;
+  }  GRUB_PACKED type_specific;
+} GRUB_PACKED;
 
 struct grub_fat_dir_node
 {
@@ -142,7 +142,7 @@ struct grub_fat_dir_entry
   grub_uint16_t w_date;
   grub_uint16_t first_cluster_low;
   grub_uint32_t file_size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_fat_long_name_entry
 {
@@ -154,7 +154,7 @@ struct grub_fat_long_name_entry
   grub_uint16_t name2[6];
   grub_uint16_t first_cluster;
   grub_uint16_t name3[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 typedef struct grub_fat_dir_entry grub_fat_dir_node_t;
 
index 25414a5c5ba787f3205082b46be074064f5e44c2..ee6f6f955442db4571cb678de5bc83a9b6e15ea1 100644 (file)
@@ -65,7 +65,7 @@ struct grub_hfs_node
   grub_uint8_t level;
   grub_uint16_t reccnt;
   grub_uint16_t unused;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The head of the B*-Tree.  */
 struct grub_hfs_treeheader
@@ -81,7 +81,7 @@ struct grub_hfs_treeheader
   grub_uint32_t nodes;
   grub_uint32_t free_nodes;
   grub_uint8_t unused[76];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The state of a mounted HFS filesystem.  */
 struct grub_hfs_data
@@ -112,7 +112,7 @@ struct grub_hfs_catalog_key
 
   /* Filename.  */
   grub_uint8_t str[31];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The key as used on disk in a extent overflow tree.  Using this key
    the extents can be looked up using a fileid and logical start block
@@ -125,7 +125,7 @@ struct grub_hfs_extent_key
   grub_uint8_t forktype;
   grub_uint32_t fileid;
   grub_uint16_t first_block;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* A directory record.  This is used to find out the directory ID.  */
 struct grub_hfs_dirrec
@@ -136,7 +136,7 @@ struct grub_hfs_dirrec
   grub_uint32_t dirid;
   grub_uint32_t ctime;
   grub_uint32_t mtime;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Information about a file.  */
 struct grub_hfs_filerec
@@ -154,7 +154,7 @@ struct grub_hfs_filerec
   /* The first 3 extents of the file.  The other extents can be found
      in the extent overflow file.  */
   grub_hfs_datarecord_t extents;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* A record descriptor, both key and data, used to pass to call back
    functions.  */
@@ -712,7 +712,7 @@ grub_hfs_iterate_records (struct grub_hfs_data *data, int type, int idx,
          {
            grub_uint8_t keylen;
            grub_uint8_t key;
-         } __attribute__ ((packed)) *pnt;
+         } GRUB_PACKED *pnt;
          pnt = (struct pointer *) (grub_be_to_cpu16 (node->offsets[pos])
                                    + node->rawnode);
 
index a119c7ace2d6717b19c2f7e2798b54009ccedb05..a5d7bc8f73bd4f5a55e262c15b894b9022d3198c 100644 (file)
@@ -65,7 +65,7 @@ struct grub_hfsplus_btheader
   grub_uint8_t btree_type;
   grub_uint8_t key_compare;
   grub_uint32_t attributes;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_hfsplus_catfile
 {
@@ -80,7 +80,7 @@ struct grub_hfsplus_catfile
   grub_uint8_t unused3[44];
   struct grub_hfsplus_forkdata data;
   struct grub_hfsplus_forkdata resource;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Filetype information as used in inodes.  */
 #define GRUB_HFSPLUS_FILEMODE_MASK     0170000
index 59cb8cbc0cac64f3a43c46b7ddeba5064107f442..461b4678fe4d6db0aff7446d671786d4644c0a36 100644 (file)
@@ -35,19 +35,19 @@ struct grub_hfsplus_compress_header1
   grub_uint32_t total_compressed_size_including_seek_blocks_and_header2;
   grub_uint32_t value_0x32;
   grub_uint8_t unused[0xf0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* big-endian.  */
 struct grub_hfsplus_compress_header2
 {
   grub_uint32_t total_compressed_size_including_seek_blocks;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* little-endian.  */
 struct grub_hfsplus_compress_header3
 {
   grub_uint32_t num_chunks;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* little-endian.  */
 struct grub_hfsplus_compress_block_descriptor
@@ -59,7 +59,7 @@ struct grub_hfsplus_compress_block_descriptor
 struct grub_hfsplus_compress_end_descriptor
 {
   grub_uint8_t always_the_same[50];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_hfsplus_attr_header
 {
@@ -67,7 +67,7 @@ struct grub_hfsplus_attr_header
   grub_uint8_t type;
   grub_uint32_t unknown[1];
   grub_uint64_t size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_hfsplus_compress_attr
 {
@@ -75,7 +75,7 @@ struct grub_hfsplus_compress_attr
   grub_uint32_t type;
   grub_uint32_t uncompressed_inline_size;
   grub_uint32_t always_0;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
index 69e61ca023145ce491caa90ebaf0068e4b962168..6a6677337d70e164faa32b5ce63dbab50cb32377 100644 (file)
@@ -54,7 +54,7 @@ struct grub_iso9660_voldesc
   grub_uint8_t type;
   grub_uint8_t magic[5];
   grub_uint8_t version;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_iso9660_date2
 {
@@ -65,7 +65,7 @@ struct grub_iso9660_date2
   grub_uint8_t minute;
   grub_uint8_t second;
   grub_uint8_t offset;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* A directory entry.  */
 struct grub_iso9660_dir
@@ -81,7 +81,7 @@ struct grub_iso9660_dir
   grub_uint8_t unused2[6];
 #define MAX_NAMELEN 255
   grub_uint8_t namelen;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_iso9660_date
 {
@@ -93,7 +93,7 @@ struct grub_iso9660_date
   grub_uint8_t second[2];
   grub_uint8_t hundredth[2];
   grub_uint8_t offset;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The primary volume descriptor.  Only little endian is used.  */
 struct grub_iso9660_primary_voldesc
@@ -112,7 +112,7 @@ struct grub_iso9660_primary_voldesc
   grub_uint8_t unused6[624];
   struct grub_iso9660_date created;
   struct grub_iso9660_date modified;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* A single entry in the path table.  */
 struct grub_iso9660_path
@@ -122,7 +122,7 @@ struct grub_iso9660_path
   grub_uint32_t first_sector;
   grub_uint16_t parentdir;
   grub_uint8_t name[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* An entry in the System Usage area of the directory entry.  */
 struct grub_iso9660_susp_entry
@@ -131,7 +131,7 @@ struct grub_iso9660_susp_entry
   grub_uint8_t len;
   grub_uint8_t version;
   grub_uint8_t data[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The CE entry.  This is used to describe the next block where data
    can be found.  */
@@ -144,7 +144,7 @@ struct grub_iso9660_susp_ce
   grub_uint32_t off_be;
   grub_uint32_t len;
   grub_uint32_t len_be;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_iso9660_data
 {
index 3251baa6e8f12ab4cbbe8f802786609391c91f7f..aab3e8c7b7daf786434ecf352dfe6a9420ab5394 100644 (file)
@@ -70,7 +70,7 @@ struct grub_jfs_extent
   /* The physical offset of the first block on the disk.  */
   grub_uint8_t blk1;
   grub_uint32_t blk2;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_JFS_IAG_INODES_OFFSET 3072
 #define GRUB_JFS_IAG_INODES_COUNT 128
@@ -79,7 +79,7 @@ struct grub_jfs_iag
 {
   grub_uint8_t unused[GRUB_JFS_IAG_INODES_OFFSET];
   struct grub_jfs_extent inodes[GRUB_JFS_IAG_INODES_COUNT];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 /* The head of the tree used to find extents.  */
@@ -94,7 +94,7 @@ struct grub_jfs_treehead
   grub_uint16_t count;
   grub_uint16_t max;
   grub_uint8_t unused2[10];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* A node in the extent tree.  */
 struct grub_jfs_tree_extent
@@ -107,7 +107,7 @@ struct grub_jfs_tree_extent
   grub_uint32_t offset2;
 
   struct grub_jfs_extent extent;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The tree of directory entries.  */
 struct grub_jfs_tree_dir
@@ -128,7 +128,7 @@ struct grub_jfs_tree_dir
   /* The location of the sorted array of pointers to dirents.  */
   grub_uint8_t sindex;
   grub_uint8_t unused[10];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* An internal node in the dirents tree.  */
 struct grub_jfs_internal_dirent
@@ -137,7 +137,7 @@ struct grub_jfs_internal_dirent
   grub_uint8_t next;
   grub_uint8_t len;
   grub_uint16_t namepart[11];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* A leaf node in the dirents tree.  */
 struct grub_jfs_leaf_dirent
@@ -150,7 +150,7 @@ struct grub_jfs_leaf_dirent
   grub_uint8_t len;
   grub_uint16_t namepart[11];
   grub_uint32_t index;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* A leaf in the dirents tree.  This one is used if the previously
    dirent was not big enough to store the name.  */
@@ -159,13 +159,13 @@ struct grub_jfs_leaf_next_dirent
   grub_uint8_t next;
   grub_uint8_t len;
   grub_uint16_t namepart[15];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_jfs_time
 {
   grub_int32_t sec;
   grub_int32_t nanosec;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_jfs_inode
 {
@@ -185,7 +185,7 @@ struct grub_jfs_inode
   union
   {
     /* The tree describing the extents of the file.  */
-    struct __attribute__ ((packed))
+    struct GRUB_PACKED
     {
       struct grub_jfs_treehead tree;
       struct grub_jfs_tree_extent extents[16];
@@ -206,15 +206,15 @@ struct grub_jfs_inode
        grub_uint8_t sorted[8];
       } header;
       struct grub_jfs_leaf_dirent dirents[8];
-    } dir __attribute__ ((packed));
+    } GRUB_PACKED dir;
     /* Fast symlink.  */
     struct
     {
       grub_uint8_t unused[32];
       grub_uint8_t path[256];
     } symlink;
-  } __attribute__ ((packed));
-} __attribute__ ((packed));
+  } GRUB_PACKED;
+} GRUB_PACKED;
 
 struct grub_jfs_data
 {
@@ -226,7 +226,7 @@ struct grub_jfs_data
   int pos;
   int linknest;
   int namecomponentlen;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_jfs_diropen
 {
@@ -237,7 +237,7 @@ struct grub_jfs_diropen
     struct grub_jfs_leaf_dirent dirent[0];
     struct grub_jfs_leaf_next_dirent next_dirent[0];
     grub_uint8_t sorted[0];
-  } *dirpage __attribute__ ((packed));
+  } GRUB_PACKED *dirpage;
   struct grub_jfs_data *data;
   struct grub_jfs_inode *inode;
   int count;
@@ -251,7 +251,7 @@ struct grub_jfs_diropen
    */
   char name[256 * GRUB_MAX_UTF8_PER_UTF16 + 1];
   grub_uint32_t ino;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 static grub_dl_t my_mod;
index c7767ed3be59adfd37234b070ddd8846091b2fd7..4fb8b2e3d21a937ff8bcccd6f08c7b7a7f0a9b6c 100644 (file)
@@ -38,7 +38,7 @@ struct head
   char rdevminor[8];
   char namesize[8];
   char check[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static inline unsigned long long
 read_number (const char *str, grub_size_t size)
index 1318f214076d941525a475d678847ba49a4d42d9..388ee188edcee33a5c883f876d05f0dc9bdd9cbe 100644 (file)
@@ -143,7 +143,7 @@ struct grub_nilfs2_dir_entry
   char name[NILFS_NAME_LEN];
   char pad;
 #endif
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
 {
index 83ba5698c0187094a0b001dd86418443d80cbb90..d3a91f5d791ec9bbb10a506d0a761e23498b0857 100644 (file)
@@ -643,7 +643,7 @@ struct symlink_descriptor
   grub_uint16_t len1;
   grub_uint16_t off2;
   grub_uint16_t len2;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static char *
 grub_ntfs_read_symlink (grub_fshelp_node_t node)
index 7b8a7220edd99f446b24c6729c705607886f1e4f..790000622db620b0d289937a0646af49be10ca5b 100644 (file)
@@ -35,7 +35,7 @@ struct head
   char mtime[11];
   char namesize[6];
   char filesize[11];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static inline unsigned long long
 read_number (const char *str, grub_size_t size)
index 6537377ba300f61adbf015ed537c2a8200b0debf..ac65054d363c145448a76c0222f4ec684bc647f1 100644 (file)
@@ -109,14 +109,14 @@ struct grub_reiserfs_superblock
   grub_uint8_t unused[4];
   grub_uint16_t uuid[8];
   char label[16];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_journal_header
 {
   grub_uint32_t last_flush_uid;
   grub_uint32_t unflushed_offset;
   grub_uint32_t mount_id;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_description_block
 {
@@ -124,14 +124,14 @@ struct grub_reiserfs_description_block
   grub_uint32_t len;
   grub_uint32_t mount_id;
   grub_uint32_t real_blocks[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_commit_block
 {
   grub_uint32_t id;
   grub_uint32_t len;
   grub_uint32_t real_blocks[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_stat_item_v1
 {
@@ -145,7 +145,7 @@ struct grub_reiserfs_stat_item_v1
   grub_uint32_t ctime;
   grub_uint32_t rdev;
   grub_uint32_t first_direct_byte;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_stat_item_v2
 {
@@ -160,7 +160,7 @@ struct grub_reiserfs_stat_item_v2
   grub_uint32_t ctime;
   grub_uint32_t blocks;
   grub_uint32_t first_direct_byte;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_key
 {
@@ -172,13 +172,13 @@ struct grub_reiserfs_key
     {
       grub_uint32_t offset;
       grub_uint32_t type;
-    } v1 __attribute__ ((packed));
+    } GRUB_PACKED v1;
     struct
     {
       grub_uint64_t offset_type;
-    } v2 __attribute__ ((packed));
+    } GRUB_PACKED v2;
   } u;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_item_header
 {
@@ -187,11 +187,11 @@ struct grub_reiserfs_item_header
   {
     grub_uint16_t free_space;
     grub_uint16_t entry_count;
-  } u __attribute__ ((packed));
+  } GRUB_PACKED u;
   grub_uint16_t item_size;
   grub_uint16_t item_location;
   grub_uint16_t version;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_block_header
 {
@@ -200,14 +200,14 @@ struct grub_reiserfs_block_header
   grub_uint16_t free_space;
   grub_uint16_t reserved;
   struct grub_reiserfs_key block_right_delimiting_key;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_disk_child
 {
   grub_uint32_t block_number;
   grub_uint16_t size;
   grub_uint16_t reserved;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_reiserfs_directory_header
 {
@@ -216,7 +216,7 @@ struct grub_reiserfs_directory_header
   grub_uint32_t object_id;
   grub_uint16_t location;
   grub_uint16_t state;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_fshelp_node
 {
index e7d2f72f3eef167f841643d5d903a41fb4d07d80..6c8215048769735a13ebfbd48e5558bb82c5d314 100644 (file)
@@ -35,7 +35,7 @@ struct grub_sfs_bheader
   grub_uint8_t magic[4];
   grub_uint32_t chksum;
   grub_uint32_t ipointtomyself;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The sfs rootblock.  */
 struct grub_sfs_rblock
@@ -50,7 +50,7 @@ struct grub_sfs_rblock
   grub_uint8_t unused3[8];
   grub_uint32_t rootobject;
   grub_uint32_t btree;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
@@ -69,18 +69,18 @@ struct grub_sfs_obj
     {
       grub_uint32_t first_block;
       grub_uint32_t size;
-    } file __attribute__ ((packed));
+    } GRUB_PACKED file;
     struct
     {
       grub_uint32_t hashtable;
       grub_uint32_t dir_objc;
-    } dir __attribute__ ((packed));
+    } GRUB_PACKED dir;
   } file_dir;
   grub_uint32_t mtime;
   grub_uint8_t type;
   grub_uint8_t filename[1];
   grub_uint8_t comment[1];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define        GRUB_SFS_TYPE_DELETED   32
 #define        GRUB_SFS_TYPE_SYMLINK   64
@@ -95,13 +95,13 @@ struct grub_sfs_objc
   grub_uint32_t prev;
   /* The amount of objects depends on the blocksize.  */
   struct grub_sfs_obj objects[1];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_sfs_btree_node
 {
   grub_uint32_t key;
   grub_uint32_t data;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_sfs_btree_extent
 {
@@ -109,7 +109,7 @@ struct grub_sfs_btree_extent
   grub_uint32_t next;
   grub_uint32_t prev;
   grub_uint16_t size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_sfs_btree
 {
@@ -120,7 +120,7 @@ struct grub_sfs_btree
   /* Normally this can be kind of node, but just extents are
      supported.  */
   struct grub_sfs_btree_node node[1];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 \f
 
index cb3cc3a6eab480a58898d0992d9663517ab932aa..b97b34440ed10d93eab511a2f6613eb1ed8f3d2f 100644 (file)
@@ -71,7 +71,7 @@ struct grub_squash_super
   grub_uint64_t diroffset;
   grub_uint64_t unk1offset;
   grub_uint64_t unk2offset;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Chunk-based */
 struct grub_squash_inode
@@ -89,7 +89,7 @@ struct grub_squash_inode
       grub_uint32_t offset;
       grub_uint32_t size;
       grub_uint32_t block_size[0];
-    }  __attribute__ ((packed)) file;
+    }  GRUB_PACKED file;
     struct {
       grub_uint64_t chunk;
       grub_uint64_t size;
@@ -98,13 +98,13 @@ struct grub_squash_inode
       grub_uint32_t offset;
       grub_uint32_t dummy3;
       grub_uint32_t block_size[0];
-    }  __attribute__ ((packed)) long_file;
+    }  GRUB_PACKED long_file;
     struct {
       grub_uint32_t chunk;
       grub_uint32_t dummy;
       grub_uint16_t size;
       grub_uint16_t offset;
-    } __attribute__ ((packed)) dir;
+    } GRUB_PACKED dir;
     struct {
       grub_uint32_t dummy1;
       grub_uint32_t size;
@@ -112,14 +112,14 @@ struct grub_squash_inode
       grub_uint32_t dummy2;
       grub_uint16_t dummy3;
       grub_uint16_t offset;
-    } __attribute__ ((packed)) long_dir;
+    } GRUB_PACKED long_dir;
     struct {
       grub_uint32_t dummy;
       grub_uint32_t namelen;
       char name[0];
-    } __attribute__ ((packed)) symlink;
-  }  __attribute__ ((packed));
-} __attribute__ ((packed));
+    } GRUB_PACKED symlink;
+  }  GRUB_PACKED;
+} GRUB_PACKED;
 
 struct grub_squash_cache_inode
 {
@@ -137,7 +137,7 @@ struct grub_squash_dirent_header
   grub_uint32_t nelems;
   grub_uint32_t ino_chunk;
   grub_uint32_t dummy;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_squash_dirent
 {
@@ -147,7 +147,7 @@ struct grub_squash_dirent
   /* Actually the value is the length of name - 1.  */
   grub_uint16_t namelen;
   char name[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
@@ -164,7 +164,7 @@ struct grub_squash_frag_desc
   grub_uint64_t offset;
   grub_uint32_t size;
   grub_uint32_t dummy;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
index 7d25791e82a4651461445f057907955dadcd0272..39bf197aabe225217ea7cd0f2b6f39165034a8f1 100644 (file)
@@ -48,7 +48,7 @@ struct head
   char devmajor[8];
   char devminor[8];
   char prefix[155];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static inline unsigned long long
 read_number (const char *str, grub_size_t size)
index 60ce928306093d32b2857a53e4356132fc4dd55f..fd412830c2bcc9e905833f351aa65ebf0ce91be4 100644 (file)
@@ -117,32 +117,32 @@ struct grub_udf_lb_addr
 {
   grub_uint32_t block_num;
   grub_uint16_t part_ref;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_short_ad
 {
   grub_uint32_t length;
   grub_uint32_t position;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_long_ad
 {
   grub_uint32_t length;
   struct grub_udf_lb_addr block;
   grub_uint8_t imp_use[6];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_extent_ad
 {
   grub_uint32_t length;
   grub_uint32_t start;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_charspec
 {
   grub_uint8_t charset_type;
   grub_uint8_t charset_info[63];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_timestamp
 {
@@ -156,14 +156,14 @@ struct grub_udf_timestamp
   grub_uint8_t centi_seconds;
   grub_uint8_t hundreds_of_micro_seconds;
   grub_uint8_t micro_seconds;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_regid
 {
   grub_uint8_t flags;
   grub_uint8_t ident[23];
   grub_uint8_t ident_suffix[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_tag
 {
@@ -175,7 +175,7 @@ struct grub_udf_tag
   grub_uint16_t desc_crc;
   grub_uint16_t desc_crc_length;
   grub_uint32_t tag_location;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_fileset
 {
@@ -197,7 +197,7 @@ struct grub_udf_fileset
   struct grub_udf_regid domain_ident;
   struct grub_udf_long_ad next_ext;
   struct grub_udf_long_ad streamdir_icb;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_icbtag
 {
@@ -209,7 +209,7 @@ struct grub_udf_icbtag
   grub_uint8_t file_type;
   struct grub_udf_lb_addr parent_idb;
   grub_uint16_t flags;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_file_ident
 {
@@ -220,7 +220,7 @@ struct grub_udf_file_ident
   grub_uint8_t file_ident_length;
   struct grub_udf_long_ad icb;
   grub_uint16_t imp_use_length;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_file_entry
 {
@@ -245,7 +245,7 @@ struct grub_udf_file_entry
   grub_uint32_t ext_attr_length;
   grub_uint32_t alloc_descs_length;
   grub_uint8_t ext_attr[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_extended_file_entry
 {
@@ -274,20 +274,20 @@ struct grub_udf_extended_file_entry
   grub_uint32_t ext_attr_length;
   grub_uint32_t alloc_descs_length;
   grub_uint8_t ext_attr[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_vrs
 {
   grub_uint8_t type;
   grub_uint8_t magic[5];
   grub_uint8_t version;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_avdp
 {
   struct grub_udf_tag tag;
   struct grub_udf_extent_ad vds;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_pd
 {
@@ -300,7 +300,7 @@ struct grub_udf_pd
   grub_uint32_t access_type;
   grub_uint32_t start;
   grub_uint32_t length;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_partmap
 {
@@ -319,7 +319,7 @@ struct grub_udf_partmap
       grub_uint8_t ident[62];
     } type2;
   };
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_lvd
 {
@@ -336,14 +336,14 @@ struct grub_udf_lvd
   grub_uint8_t imp_use[128];
   struct grub_udf_extent_ad integrity_seq_ext;
   grub_uint8_t part_maps[1608];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_aed
 {
   struct grub_udf_tag tag;
   grub_uint32_t prev_ae;
   grub_uint32_t ae_len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_udf_data
 {
index c9c2556d12926a3b4117c961649bb74cfbd498e5..4a2161cc784e26574fc7c7eb5a9e25ab41df13eb 100644 (file)
@@ -187,7 +187,7 @@ struct grub_ufs_inode
   };
 
   grub_uint8_t unused[24];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #else
 /* UFS inode.  */
 struct grub_ufs_inode
@@ -217,7 +217,7 @@ struct grub_ufs_inode
   grub_uint32_t gen;
   grub_uint32_t unused;
   grub_uint8_t pad[12];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #endif
 
 /* Directory entry.  */
@@ -234,7 +234,7 @@ struct grub_ufs_dirent
       grub_uint8_t namelen_bsd;
     };
   };
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Information about a "mounted" ufs filesystem.  */
 struct grub_ufs_data
index 7cd3e07bf7bad1a290a172d5c3576b11e8d7c048..16ffd3f1ebd97f3fe6bd4b93fc1ec97d0c06f216 100644 (file)
@@ -54,7 +54,7 @@ struct grub_xfs_sblock
   grub_uint8_t log2_agblk;
   grub_uint8_t unused6[67];
   grub_uint8_t log2_dirblk;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_xfs_dir_header
 {
@@ -64,8 +64,8 @@ struct grub_xfs_dir_header
   {
     grub_uint32_t i4;
     grub_uint64_t i8;
-  } parent __attribute__ ((packed));
-} __attribute__ ((packed));
+  } GRUB_PACKED parent;
+} GRUB_PACKED;
 
 struct grub_xfs_dir_entry
 {
@@ -73,13 +73,13 @@ struct grub_xfs_dir_entry
   grub_uint16_t offset;
   char name[1];
   /* Inode number follows, 32 bits.  */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_xfs_dir2_entry
 {
   grub_uint64_t inode;
   grub_uint8_t len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 typedef grub_uint32_t grub_xfs_extent[4];
 
@@ -91,20 +91,20 @@ struct grub_xfs_btree_node
   grub_uint64_t left;
   grub_uint64_t right;
   grub_uint64_t keys[1];
-}  __attribute__ ((packed));
+}  GRUB_PACKED;
 
 struct grub_xfs_btree_root
 {
   grub_uint16_t level;
   grub_uint16_t numrecs;
   grub_uint64_t keys[1];
-}  __attribute__ ((packed));
+}  GRUB_PACKED;
 
 struct grub_xfs_time
 {
   grub_uint32_t sec;
   grub_uint32_t nanosec;
-}  __attribute__ ((packed));
+}  GRUB_PACKED;
 
 struct grub_xfs_inode
 {
@@ -133,14 +133,14 @@ struct grub_xfs_inode
     } dir;
     grub_xfs_extent extents[XFS_INODE_EXTENTS];
     struct grub_xfs_btree_root btree;
-  } data __attribute__ ((packed));
-} __attribute__ ((packed));
+  } GRUB_PACKED data;
+} GRUB_PACKED;
 
 struct grub_xfs_dirblock_tail
 {
   grub_uint32_t leaf_count;
   grub_uint32_t leaf_stale;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_fshelp_node
 {
index dde2c7195372927eb128fc41a4cfff2b293a196e..1212a8986cae23d455d08a7051c9571d1422ccb1 100644 (file)
@@ -77,13 +77,13 @@ typedef grub_size_t size_t;
 
 typedef struct _U16_S {
        U16 v;
-} __attribute__ ((packed)) U16_S;
+} GRUB_PACKED U16_S;
 typedef struct _U32_S {
        U32 v;
-} __attribute__ ((packed)) U32_S;
+} GRUB_PACKED U32_S;
 typedef struct _U64_S {
        U64 v;
-} __attribute__ ((packed)) U64_S;
+} GRUB_PACKED U64_S;
 
 #define        A64(x)  (((U64_S *)(x))->v)
 #define        A32(x)  (((U32_S *)(x))->v)
index 2895e2102a67947666377d145e4733e747ff81b9..b1ce26029ecef83987b40ee7fa06af3dbf37eccc 100644 (file)
@@ -290,7 +290,7 @@ struct lzop_header
   grub_uint32_t mtime_lo;
   grub_uint32_t mtime_hi;
   grub_uint8_t name_len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static int
 test_header (grub_file_t file)
index b34cbad03797dda2bb8ab8b70e52d82e8deb1ee8..8009e833c1ae3e0258e238bb8e58abe90e8ec5a6 100644 (file)
@@ -33,7 +33,7 @@ struct grub_machine_mmap_entry
 #define GRUB_MACHINE_MEMORY_NVS        4
 #define GRUB_MACHINE_MEMORY_BADRAM     5
   grub_uint32_t type;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 
 /*
index 006632e56d0681f31ec9f368ab6cb62445771928..ea0edfafe57adbb05295267997ec4b9d1ec1a7af 100644 (file)
@@ -276,7 +276,7 @@ struct grub_e820_mmap
   grub_uint64_t addr;
   grub_uint64_t size;
   grub_uint32_t type;
-} __attribute__((packed));
+} GRUB_PACKED;
 #define GRUB_E820_RAM        1
 #define GRUB_E820_RESERVED   2
 #define GRUB_E820_ACPI       3
index 7b63e257994171fde5cec03345fc3ceed4bd2a10..a37eecf0401f24fbc635b0acb0dd65243dee5411 100644 (file)
@@ -87,7 +87,7 @@ struct idt_descriptor
 {
   grub_uint16_t limit;
   void *base;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct idt_descriptor idt_desc =
   {
index af067a5a4a64e542e95aeced7e1993c0083c634b..117232f0c951bd1b24685acc4df107a96d6b2704 100644 (file)
@@ -21,7 +21,7 @@ struct newc_head
   char rdevminor[8];
   char namesize[8];
   char check[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_linux_initrd_component
 {
index 983e220be1bb99b9116e6b874fae10026eef018a..6099945160aee25f6b5a42d0b29efef9ed711d48 100644 (file)
@@ -47,7 +47,7 @@ struct grub_e820_mmap_entry
   grub_uint64_t addr;
   grub_uint64_t len;
   grub_uint32_t type;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 
 /* Helper for preboot.  */
index 81ce9c3f2dea81a419704c0533844d935fbb1c8c..e92c7e7daecc1a9e34c240372cebbd90ada63d11 100644 (file)
@@ -43,7 +43,7 @@ struct arphdr {
   grub_uint8_t hln;
   grub_uint8_t pln;
   grub_uint16_t op;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static int have_pending;
 static grub_uint32_t pending_req;
index 5524af9369909913ff17ce53f4378f07e87f25eb..32ee4fd3da6e173133f7424213c469b6416796f8 100644 (file)
@@ -86,7 +86,7 @@ struct dns_header
   grub_uint16_t ancount;
   grub_uint16_t nscount;
   grub_uint16_t arcount;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
index 3e75b2e1352d27233380381649b7c1d42685d874..e8c0b22e29403aac46cb956e6d732718e584868d 100644 (file)
@@ -45,7 +45,7 @@ struct grub_pxe_undi_open
   grub_uint16_t pkt_filter;
   grub_uint16_t mcast_count;
   grub_uint8_t mcast[8][6];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxe_undi_info
 {
@@ -60,7 +60,7 @@ struct grub_pxe_undi_info
   grub_uint32_t romaddr;
   grub_uint16_t rxbufct;
   grub_uint16_t txbufct;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 struct grub_pxe_undi_isr
@@ -73,7 +73,7 @@ struct grub_pxe_undi_isr
   grub_uint32_t buffer;
   grub_uint8_t prot_type;
   grub_uint8_t pkt_type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
@@ -104,7 +104,7 @@ struct grub_pxe_undi_transmit
   grub_uint32_t dest;
   grub_uint32_t tbd;
   grub_uint32_t reserved[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxe_undi_tbd
 {
@@ -118,7 +118,7 @@ struct grub_pxe_undi_tbd
     grub_uint16_t len;
     grub_uint32_t ptr;
   } blocks[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxe_bangpxe *grub_pxe_pxenv;
 static grub_uint32_t pxe_rm_entry = 0;
index b38e2c83ee63c6620c77edd46a6b778d6ceec03a..c397b1b348ce559070cabe1e0b6e28e4dbf254d8 100644 (file)
@@ -33,20 +33,20 @@ struct etherhdr
   grub_uint8_t dst[6];
   grub_uint8_t src[6];
   grub_uint16_t type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct llchdr
 {
   grub_uint8_t dsap;
   grub_uint8_t ssap;
   grub_uint8_t ctrl;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct snaphdr
 {
   grub_uint8_t oui[3]; 
   grub_uint16_t type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 grub_err_t
 send_ethernet_packet (struct grub_net_network_level_interface *inf,
index e55a0d86a52a3ab4248ad4eab89dbea4b11f0358..28d825ba04c7f443eccdc7b56de4679d40c03d39 100644 (file)
@@ -25,13 +25,13 @@ struct icmp_header
   grub_uint8_t type;
   grub_uint8_t code;
   grub_uint16_t checksum;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct ping_header
 {
   grub_uint16_t id;
   grub_uint16_t seq;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
index a1bd0782c4c64f4ef3384d6476afaa5d2f532e7e..2741e6f11fb0d3d8ec01ee2b6021247a26f37454 100644 (file)
@@ -25,13 +25,13 @@ struct icmp_header
   grub_uint8_t type;
   grub_uint8_t code;
   grub_uint16_t checksum;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct ping_header
 {
   grub_uint16_t id;
   grub_uint16_t seq;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct router_adv
 {
@@ -41,13 +41,13 @@ struct router_adv
   grub_uint32_t reachable_time;
   grub_uint32_t retrans_timer;
   grub_uint8_t options[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct option_header
 {
   grub_uint8_t type;
   grub_uint8_t len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct prefix_option
 {
@@ -58,19 +58,19 @@ struct prefix_option
   grub_uint32_t preferred_lifetime;
   grub_uint32_t reserved;
   grub_uint64_t prefix[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct neighbour_solicit
 {
   grub_uint32_t reserved;
   grub_uint64_t target[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct neighbour_advertise
 {
   grub_uint32_t flags;
   grub_uint64_t target[2];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
index 08f22551536586460036add59f41af7ef474d8e0..c6971f9fcd2c44e2f43d2cfdf0e5ea7f812b7443 100644 (file)
@@ -38,7 +38,7 @@ struct iphdr {
   grub_uint16_t chksum;
   grub_uint32_t src;
   grub_uint32_t dest;
-} __attribute__ ((packed)) ;
+} GRUB_PACKED ;
 
 enum
 {
@@ -56,7 +56,7 @@ struct ip6hdr {
   grub_uint8_t ttl;
   ip6addr src;
   ip6addr dest;
-} __attribute__ ((packed)) ;
+} GRUB_PACKED ;
 
 static int
 cmp (const void *a__, const void *b__)
index 89bc4cc726417ae7e6d322f2ebee39e5fe51c921..2077f5519b278b5fcb1e35b13ec30a14c29d7720 100644 (file)
@@ -104,7 +104,7 @@ struct tcphdr
   grub_uint16_t window;
   grub_uint16_t checksum;
   grub_uint16_t urgent;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct tcp_pseudohdr
 {
@@ -113,7 +113,7 @@ struct tcp_pseudohdr
   grub_uint8_t zero;
   grub_uint8_t proto;
   grub_uint16_t tcp_length;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct tcp6_pseudohdr
 {
@@ -122,7 +122,7 @@ struct tcp6_pseudohdr
   grub_uint32_t tcp_length;
   grub_uint8_t zero[3];
   grub_uint8_t proto;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_net_tcp_socket *tcp_sockets;
 static struct grub_net_tcp_listen *tcp_listens;
index 97217d23daffeaa0c3c347f2cb4951ef791952e8..9c489f1fc946507ef6adf894ea9bf93dd15f6633 100644 (file)
@@ -94,7 +94,7 @@ struct tftphdr {
       grub_int8_t data[TFTP_DEFAULTSIZE_PACKET+2];
     } oack;
   } u;
-} __attribute__ ((packed)) ;
+} GRUB_PACKED ;
 
 
 typedef struct tftp_data
index 4d7f5008bcfe5b038db0f090cb3ad73c02f2e61a..7bb93d9bec999a408d9f8c044822823fcefa7a01 100644 (file)
@@ -43,10 +43,10 @@ struct grub_acorn_boot_block
       grub_uint8_t flags;
       grub_uint16_t start_cylinder;
       grub_uint8_t checksum;
-    } __attribute__ ((packed, aligned));
+    } GRUB_PACKED;
     grub_uint8_t bin[0x200];
   };
-} __attribute__ ((packed, aligned));
+} GRUB_PACKED;
 
 struct linux_part
 {
index 97f71600f86a1c45028f651a895efe1fa902d1cd..13034f15c007314c1dc6fb71f118310f89899a4d 100644 (file)
@@ -42,7 +42,7 @@ struct grub_amiga_rdsk
   grub_uint32_t fslst;
 
   grub_uint32_t unused[AMIGA_CHECKSUM_WORDS - 9];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_amiga_partition
 {
@@ -70,7 +70,7 @@ struct grub_amiga_partition
 
   grub_uint32_t firstcyl;
   grub_uint32_t unused[AMIGA_CHECKSUM_WORDS - 44];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_partition_map grub_amiga_partition_map;
 
index 5b464dae74d15f2e9195ada4841e2d8d0cfa51fe..95c96186c3c1a0067019502f0f3862ca6bc39497 100644 (file)
@@ -34,7 +34,7 @@ struct grub_dvh_partition_descriptor
   grub_uint32_t length;
   grub_uint32_t start;
   grub_uint32_t type;  
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_dvh_block
 {
@@ -43,7 +43,7 @@ struct grub_dvh_block
   struct grub_dvh_partition_descriptor parts[16];
   grub_uint32_t checksum;
   grub_uint32_t unused2;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_partition_map grub_dvh_partition_map;
 
index cff09ae254dada7c239e6dc3a54ecedb8639ed0b..dae36026995abf88d235440776758b231dbbd10a 100644 (file)
@@ -38,13 +38,13 @@ struct grub_sun_partition_info
   grub_uint8_t id;
   grub_uint8_t spare2;
   grub_uint8_t flags;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_sun_partition_descriptor
 {
   grub_uint32_t start_cylinder;
   grub_uint32_t num_sectors;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_sun_block
 {
@@ -65,7 +65,7 @@ struct grub_sun_block
   struct grub_sun_partition_descriptor partitions[8];
   grub_uint16_t  magic;         /* Magic number.  */
   grub_uint16_t  csum;          /* Label xor'd checksum.  */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_partition_map grub_sun_partition_map;
 
index 7034272c7484d26d2aee2de31d91438b28bc4dab..442763ee55985fafa9a6111bbfbde6f845d77ea8 100644 (file)
@@ -38,7 +38,7 @@ struct grub_sun_pc_partition_descriptor
   grub_uint16_t unused;
   grub_uint32_t start_sector;
   grub_uint32_t num_sectors;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_sun_pc_block
 {
@@ -47,7 +47,7 @@ struct grub_sun_pc_block
   grub_uint8_t unused2[244];
   grub_uint16_t  magic;         /* Magic number.  */
   grub_uint16_t  csum;          /* Label xor'd checksum.  */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_partition_map grub_sun_pc_partition_map;
 
index f8927555f933cdeafaec0522516bd6d175da4f93..491bc55731c3390e3877b375696506be7e3d6b9a 100644 (file)
@@ -264,7 +264,7 @@ struct bmp_header
   grub_uint16_t height;
   grub_uint16_t planes;
   grub_uint16_t bpp;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static void
 grub_video_capture_write_bmp (const char *fname,
index 6295a5d2a773026005ef7e64f099b3f476782576..c7a16fa9cc473baef9ba480d7de8fc948e71f493 100644 (file)
@@ -75,7 +75,7 @@ struct grub_tga_header
   grub_uint16_t image_height;
   grub_uint8_t image_bpp;
   grub_uint8_t image_descriptor;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct tga_data
 {
index 32bb95ca813d5e3cbcc19a1724af08bcdcc35d17..2ac2bd6fdace64c80658f025d170cb20f8cd22fb 100644 (file)
@@ -34,7 +34,7 @@ struct grub_acpi_rsdp_v10
   grub_uint8_t oemid[6];
   grub_uint8_t revision;
   grub_uint32_t rsdt_addr;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_acpi_rsdp_v20
 {
@@ -43,7 +43,7 @@ struct grub_acpi_rsdp_v20
   grub_uint64_t xsdt_addr;
   grub_uint8_t checksum;
   grub_uint8_t reserved[3];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_acpi_table_header
 {
@@ -56,7 +56,7 @@ struct grub_acpi_table_header
   grub_uint32_t oemrev;
   grub_uint8_t creator_id[4];
   grub_uint32_t creator_rev;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_ACPI_FADT_SIGNATURE "FACP"
 
@@ -71,7 +71,7 @@ struct grub_acpi_fadt
   grub_uint64_t facs_xaddr;
   grub_uint64_t dsdt_xaddr;
   grub_uint8_t somefields3[96];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_ACPI_MADT_SIGNATURE "APIC"
 
@@ -124,7 +124,7 @@ struct grub_acpi_madt_entry_interrupt_override
   grub_uint8_t source;
   grub_uint32_t global_sys_interrupt;
   grub_uint16_t flags;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 struct grub_acpi_madt_entry_lapic_nmi
@@ -133,7 +133,7 @@ struct grub_acpi_madt_entry_lapic_nmi
   grub_uint8_t acpiid;
   grub_uint16_t flags;
   grub_uint8_t lint;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_acpi_madt_entry_sapic
 {
index 8f241dfd84ed18c847a12b6d07db1f3f938730a8..83e7b8b5a81807d39f3017a9e6cbcd5eb513c6fa 100644 (file)
@@ -86,7 +86,7 @@ struct grub_partition_bsd_entry
   grub_uint8_t fs_type;
   grub_uint8_t fs_fragments;
   grub_uint16_t fs_cylinders;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The BSD disk label. Only define members useful for GRUB.  */
 struct grub_partition_bsd_disk_label
@@ -101,6 +101,6 @@ struct grub_partition_bsd_disk_label
   grub_uint16_t num_partitions;
   grub_uint32_t boot_size;
   grub_uint32_t superblock_size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #endif /* ! GRUB_PC_PARTITION_HEADER */
index 77531d10583bc1dc879927580026829e8595ad2f..9d93fb6c1826561e4ab15d0a4ce4d2d2368cc9f9 100644 (file)
@@ -50,7 +50,7 @@ struct grub_btrfs_key
   grub_uint64_t object_id;
   grub_uint8_t type;
   grub_uint64_t offset;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 struct grub_btrfs_root_backref
index 5067b6ef7d1bff2b2b66c048ada805fd8d91b095..98112fb6790840715aed4038d3da3763a9451c8e 100644 (file)
@@ -98,7 +98,7 @@ struct cbfs_header {
        grub_uint32_t offset;
        grub_uint32_t architecture;
        grub_uint32_t pad[1];
-} __attribute__((packed));
+} GRUB_PACKED;
 
 /* "Unknown" refers to CBFS headers version 1,
  * before the architecture was defined (i.e., x86 only).
@@ -130,7 +130,7 @@ struct cbfs_file {
        grub_uint32_t type;
        grub_uint32_t checksum;
        grub_uint32_t offset;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 /*** Component sub-headers ***/
 
@@ -146,7 +146,7 @@ struct cbfs_stage {
        grub_uint64_t load;   /** Where to load in memory */
        grub_uint32_t len;          /** length of data to load */
        grub_uint32_t memlen;      /** total length of object in memory */
-} __attribute__((packed));
+} GRUB_PACKED;
 
 /** this is the sub-header for payload components.  Payloads
     are loaded by coreboot at the end of the boot process */
@@ -158,7 +158,7 @@ struct cbfs_payload_segment {
        grub_uint64_t load_addr;
        grub_uint32_t len;
        grub_uint32_t mem_len;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct cbfs_payload {
        struct cbfs_payload_segment segments;
@@ -173,6 +173,6 @@ struct cbfs_payload {
 struct cbfs_optionrom {
        grub_uint32_t compression;
        grub_uint32_t len;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 #endif
index 7b46259f72689f2b897bc13e4497f77cf8485ea5..68fc90ffb7b2ab7205f41fed2a06eb88c563570d 100644 (file)
@@ -532,7 +532,7 @@ struct grub_efi_packed_guid
   grub_uint16_t data2;
   grub_uint16_t data3;
   grub_uint8_t data4[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_packed_guid grub_efi_packed_guid_t;
 
 /* XXX although the spec does not specify the padding, this actually
@@ -545,7 +545,7 @@ struct grub_efi_memory_descriptor
   grub_efi_virtual_address_t virtual_start;
   grub_efi_uint64_t num_pages;
   grub_efi_uint64_t attribute;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_memory_descriptor grub_efi_memory_descriptor_t;
 
 /* Device Path definitions.  */
@@ -554,7 +554,7 @@ struct grub_efi_device_path
   grub_efi_uint8_t type;
   grub_efi_uint8_t subtype;
   grub_efi_uint16_t length;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_device_path grub_efi_device_path_t;
 /* XXX EFI does not define EFI_DEVICE_PATH_PROTOCOL but uses it.
    It seems to be identical to EFI_DEVICE_PATH.  */
@@ -589,7 +589,7 @@ struct grub_efi_pci_device_path
   grub_efi_device_path_t header;
   grub_efi_uint8_t function;
   grub_efi_uint8_t device;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_pci_device_path grub_efi_pci_device_path_t;
 
 #define GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE            2
@@ -598,7 +598,7 @@ struct grub_efi_pccard_device_path
 {
   grub_efi_device_path_t header;
   grub_efi_uint8_t function;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_pccard_device_path grub_efi_pccard_device_path_t;
 
 #define GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE     3
@@ -609,7 +609,7 @@ struct grub_efi_memory_mapped_device_path
   grub_efi_uint32_t memory_type;
   grub_efi_physical_address_t start_address;
   grub_efi_physical_address_t end_address;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_memory_mapped_device_path grub_efi_memory_mapped_device_path_t;
 
 #define GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE            4
@@ -619,7 +619,7 @@ struct grub_efi_vendor_device_path
   grub_efi_device_path_t header;
   grub_efi_packed_guid_t vendor_guid;
   grub_efi_uint8_t vendor_defined_data[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_vendor_device_path grub_efi_vendor_device_path_t;
 
 #define GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE                5
@@ -628,7 +628,7 @@ struct grub_efi_controller_device_path
 {
   grub_efi_device_path_t header;
   grub_efi_uint32_t controller_number;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_controller_device_path grub_efi_controller_device_path_t;
 
 /* ACPI Device Path.  */
@@ -641,7 +641,7 @@ struct grub_efi_acpi_device_path
   grub_efi_device_path_t header;
   grub_efi_uint32_t hid;
   grub_efi_uint32_t uid;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_acpi_device_path grub_efi_acpi_device_path_t;
 
 #define GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE     2
@@ -653,7 +653,7 @@ struct grub_efi_expanded_acpi_device_path
   grub_efi_uint32_t uid;
   grub_efi_uint32_t cid;
   char hidstr[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_expanded_acpi_device_path grub_efi_expanded_acpi_device_path_t;
 
 #define GRUB_EFI_EXPANDED_ACPI_HIDSTR(dp)      \
@@ -676,7 +676,7 @@ struct grub_efi_atapi_device_path
   grub_efi_uint8_t primary_secondary;
   grub_efi_uint8_t slave_master;
   grub_efi_uint16_t lun;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_atapi_device_path grub_efi_atapi_device_path_t;
 
 #define GRUB_EFI_SCSI_DEVICE_PATH_SUBTYPE              2
@@ -686,7 +686,7 @@ struct grub_efi_scsi_device_path
   grub_efi_device_path_t header;
   grub_efi_uint16_t pun;
   grub_efi_uint16_t lun;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_scsi_device_path grub_efi_scsi_device_path_t;
 
 #define GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE     3
@@ -697,7 +697,7 @@ struct grub_efi_fibre_channel_device_path
   grub_efi_uint32_t reserved;
   grub_efi_uint64_t wwn;
   grub_efi_uint64_t lun;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_fibre_channel_device_path grub_efi_fibre_channel_device_path_t;
 
 #define GRUB_EFI_1394_DEVICE_PATH_SUBTYPE              4
@@ -707,7 +707,7 @@ struct grub_efi_1394_device_path
   grub_efi_device_path_t header;
   grub_efi_uint32_t reserved;
   grub_efi_uint64_t guid;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_1394_device_path grub_efi_1394_device_path_t;
 
 #define GRUB_EFI_USB_DEVICE_PATH_SUBTYPE               5
@@ -717,7 +717,7 @@ struct grub_efi_usb_device_path
   grub_efi_device_path_t header;
   grub_efi_uint8_t parent_port_number;
   grub_efi_uint8_t usb_interface;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_usb_device_path grub_efi_usb_device_path_t;
 
 #define GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE         15
@@ -730,7 +730,7 @@ struct grub_efi_usb_class_device_path
   grub_efi_uint8_t device_class;
   grub_efi_uint8_t device_subclass;
   grub_efi_uint8_t device_protocol;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_usb_class_device_path grub_efi_usb_class_device_path_t;
 
 #define GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE               6
@@ -739,7 +739,7 @@ struct grub_efi_i2o_device_path
 {
   grub_efi_device_path_t header;
   grub_efi_uint32_t tid;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_i2o_device_path grub_efi_i2o_device_path_t;
 
 #define GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE       11
@@ -749,7 +749,7 @@ struct grub_efi_mac_address_device_path
   grub_efi_device_path_t header;
   grub_efi_mac_address_t mac_address;
   grub_efi_uint8_t if_type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_mac_address_device_path grub_efi_mac_address_device_path_t;
 
 #define GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE              12
@@ -763,7 +763,7 @@ struct grub_efi_ipv4_device_path
   grub_efi_uint16_t remote_port;
   grub_efi_uint16_t protocol;
   grub_efi_uint8_t static_ip_address;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_ipv4_device_path grub_efi_ipv4_device_path_t;
 
 #define GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE              13
@@ -777,7 +777,7 @@ struct grub_efi_ipv6_device_path
   grub_efi_uint16_t remote_port;
   grub_efi_uint16_t protocol;
   grub_efi_uint8_t static_ip_address;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_ipv6_device_path grub_efi_ipv6_device_path_t;
 
 #define GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE                9
@@ -790,7 +790,7 @@ struct grub_efi_infiniband_device_path
   grub_efi_uint64_t remote_id;
   grub_efi_uint64_t target_port_id;
   grub_efi_uint64_t device_id;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_infiniband_device_path grub_efi_infiniband_device_path_t;
 
 #define GRUB_EFI_UART_DEVICE_PATH_SUBTYPE              14
@@ -803,7 +803,7 @@ struct grub_efi_uart_device_path
   grub_efi_uint8_t data_bits;
   grub_efi_uint8_t parity;
   grub_efi_uint8_t stop_bits;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_uart_device_path grub_efi_uart_device_path_t;
 
 #define GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE  10
@@ -813,7 +813,7 @@ struct grub_efi_vendor_messaging_device_path
   grub_efi_device_path_t header;
   grub_efi_packed_guid_t vendor_guid;
   grub_efi_uint8_t vendor_defined_data[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_vendor_messaging_device_path grub_efi_vendor_messaging_device_path_t;
 
 /* Media Device Path.  */
@@ -830,7 +830,7 @@ struct grub_efi_hard_drive_device_path
   grub_efi_uint8_t partition_signature[16];
   grub_efi_uint8_t partmap_type;
   grub_efi_uint8_t signature_type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_hard_drive_device_path grub_efi_hard_drive_device_path_t;
 
 #define GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE             2
@@ -841,7 +841,7 @@ struct grub_efi_cdrom_device_path
   grub_efi_uint32_t boot_entry;
   grub_efi_lba_t partition_start;
   grub_efi_lba_t partition_size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_cdrom_device_path grub_efi_cdrom_device_path_t;
 
 #define GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE      3
@@ -851,7 +851,7 @@ struct grub_efi_vendor_media_device_path
   grub_efi_device_path_t header;
   grub_efi_packed_guid_t vendor_guid;
   grub_efi_uint8_t vendor_defined_data[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_vendor_media_device_path grub_efi_vendor_media_device_path_t;
 
 #define GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE         4
@@ -860,7 +860,7 @@ struct grub_efi_file_path_device_path
 {
   grub_efi_device_path_t header;
   grub_efi_char16_t path_name[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_file_path_device_path grub_efi_file_path_device_path_t;
 
 #define GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE          5
@@ -869,7 +869,7 @@ struct grub_efi_protocol_device_path
 {
   grub_efi_device_path_t header;
   grub_efi_packed_guid_t guid;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_protocol_device_path grub_efi_protocol_device_path_t;
 
 #define GRUB_EFI_PIWG_DEVICE_PATH_SUBTYPE              6
@@ -878,7 +878,7 @@ struct grub_efi_piwg_device_path
 {
   grub_efi_device_path_t header;
   grub_efi_packed_guid_t guid;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_piwg_device_path grub_efi_piwg_device_path_t;
 
 
@@ -893,7 +893,7 @@ struct grub_efi_bios_device_path
   grub_efi_uint16_t device_type;
   grub_efi_uint16_t status_flags;
   char description[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_bios_device_path grub_efi_bios_device_path_t;
 
 struct grub_efi_open_protocol_information_entry
@@ -918,7 +918,7 @@ struct grub_efi_time
   grub_efi_int16_t time_zone;
   grub_efi_uint8_t daylight;
   grub_efi_uint8_t pad2;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_time grub_efi_time_t;
 
 struct grub_efi_time_capabilities
@@ -1236,7 +1236,7 @@ struct grub_efi_configuration_table
 {
   grub_efi_packed_guid_t vendor_guid;
   void *vendor_table;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_configuration_table grub_efi_configuration_table_t;
 
 #define GRUB_EFIEMU_SYSTEM_TABLE_SIGNATURE 0x5453595320494249LL
index 4adea603b526306d19fed26443a038e084307852..f79c36c026e0a518b3f9edaca36251d6d4943757 100644 (file)
@@ -299,7 +299,7 @@ struct grub_pe32_symbol
   grub_uint16_t type;
   grub_uint8_t storage_class;
   grub_uint8_t num_aux;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_PE32_SYM_CLASS_EXTERNAL   2
 #define GRUB_PE32_SYM_CLASS_STATIC     3
@@ -312,7 +312,7 @@ struct grub_pe32_reloc
   grub_uint32_t offset;
   grub_uint32_t symtab_index;
   grub_uint16_t type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_PE32_REL_I386_DIR32       0x6
 #define GRUB_PE32_REL_I386_REL32       0x14
index 5c87662a4db5e68b319827e62eaf92fb0d44db3a..5325e5839e3c2a7ac3043ab228ceb019f0ed6f5c 100644 (file)
@@ -41,7 +41,7 @@ struct grub_efi_system_table32
   grub_efi_uint32_t boot_services;
   grub_efi_uint32_t num_table_entries;
   grub_efi_uint32_t configuration_table;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_system_table32  grub_efi_system_table32_t;
 
 struct grub_efi_system_table64
@@ -60,7 +60,7 @@ struct grub_efi_system_table64
   grub_efi_uint64_t boot_services;
   grub_efi_uint64_t num_table_entries;
   grub_efi_uint64_t configuration_table;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efi_system_table64  grub_efi_system_table64_t;
 
 struct grub_efiemu_runtime_services32
@@ -77,7 +77,7 @@ struct grub_efiemu_runtime_services32
   grub_efi_uint32_t set_variable;
   grub_efi_uint32_t get_next_high_monotonic_count;
   grub_efi_uint32_t reset_system;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efiemu_runtime_services32 grub_efiemu_runtime_services32_t;
 
 struct grub_efiemu_runtime_services64
@@ -94,7 +94,7 @@ struct grub_efiemu_runtime_services64
   grub_efi_uint64_t set_variable;
   grub_efi_uint64_t get_next_high_monotonic_count;
   grub_efi_uint64_t reset_system;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efiemu_runtime_services64 grub_efiemu_runtime_services64_t;
 
 extern grub_efi_system_table32_t *grub_efiemu_system_table32;
@@ -185,13 +185,13 @@ struct grub_efiemu_configuration_table32
 {
   grub_efi_packed_guid_t vendor_guid;
   grub_efi_uint32_t vendor_table;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efiemu_configuration_table32 grub_efiemu_configuration_table32_t;
 struct grub_efiemu_configuration_table64
 {
   grub_efi_packed_guid_t vendor_guid;
   grub_efi_uint64_t vendor_table;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_efiemu_configuration_table64 grub_efiemu_configuration_table64_t;
 grub_err_t grub_efiemu_unregister_configuration_table (grub_efi_guid_t guid);
 grub_err_t
index 1eb474a5d123765109d13b23a557757c44872f8f..9b6b729f4ccde7274678b1324c16c9f6854477a2 100644 (file)
@@ -25,7 +25,7 @@ struct grub_efiemu_ptv_rel
   grub_efi_memory_type_t plustype;
   grub_efi_memory_type_t minustype;
   grub_uint32_t size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct efi_variable
 {
@@ -33,5 +33,5 @@ struct efi_variable
   grub_uint32_t namelen;
   grub_uint32_t size;
   grub_efi_uint32_t attributes;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #endif /* ! GRUB_EFI_EMU_RUNTIME_HEADER */
index e5cb82d7980856a09b1974dddce1369248a55d65..2b8009ceec6c947708de4756c71d1e46b66c0053 100644 (file)
@@ -41,7 +41,7 @@ struct grub_exfat_bpb
   grub_uint8_t num_fats;
   grub_uint8_t num_ph_drive;
   grub_uint8_t reserved[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #ifdef GRUB_UTIL
 #include <grub/disk.h>
index ae352c6d6ec94131b6456b6bfdad69b6c59071b3..4a5aab7934652cfde20c6fb291e00c29170b8753 100644 (file)
@@ -52,7 +52,7 @@ struct grub_fat_bpb
       grub_uint32_t num_serial;
       grub_uint8_t label[11];
       grub_uint8_t fstype[8];
-    } __attribute__ ((packed)) fat12_or_fat16;
+    } GRUB_PACKED fat12_or_fat16;
     struct
     {
       grub_uint32_t sectors_per_fat_32;
@@ -68,9 +68,9 @@ struct grub_fat_bpb
       grub_uint32_t num_serial;
       grub_uint8_t label[11];
       grub_uint8_t fstype[8];
-    } __attribute__ ((packed)) fat32;
-  } __attribute__ ((packed)) version_specific;
-} __attribute__ ((packed));
+    } GRUB_PACKED fat32;
+  } GRUB_PACKED version_specific;
+} GRUB_PACKED;
 
 #ifdef GRUB_UTIL
 #include <grub/disk.h>
index 4aaf1c4e71b9e558fa95af81b8a1c1f19baf1367..1b32f6725a498f16941991771efe6a7a04ed6f5e 100644 (file)
@@ -66,7 +66,7 @@ struct grub_gpt_header
   grub_uint32_t maxpart;
   grub_uint32_t partentry_size;
   grub_uint32_t partentry_crc32;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_gpt_partentry
 {
@@ -76,7 +76,7 @@ struct grub_gpt_partentry
   grub_uint64_t end;
   grub_uint64_t attrib;
   char name[72];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 grub_err_t
 grub_gpt_partition_map_iterate (grub_disk_t disk,
index bf98610d9830f1fcc7edaf5ad60dea1e9ae0fa62..bb8ec051782bc82201169013c202a9d861ca1c47 100644 (file)
@@ -58,6 +58,6 @@ struct grub_hfs_sblock
   grub_hfs_datarecord_t extent_recs;
   grub_uint32_t catalog_size;
   grub_hfs_datarecord_t catalog_recs;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #endif /* ! GRUB_HFS_HEADER */
index 842554e04b83b5da6c27ab6a84d0b6b1240e1598..fedf37d3dc7659da6a8b512a4109ee6337025ffc 100644 (file)
@@ -9,7 +9,7 @@ struct grub_hfsplus_extent
   grub_uint32_t start;
   /* The amount of blocks described by this extent.  */
   grub_uint32_t count;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The descriptor of a fork.  */
 struct grub_hfsplus_forkdata
@@ -18,7 +18,7 @@ struct grub_hfsplus_forkdata
   grub_uint32_t clumpsize;
   grub_uint32_t blocks;
   struct grub_hfsplus_extent extents[8];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The HFS+ Volume Header.  */
 struct grub_hfsplus_volheader
@@ -37,7 +37,7 @@ struct grub_hfsplus_volheader
   struct grub_hfsplus_forkdata catalog_file;
   struct grub_hfsplus_forkdata attr_file;
   struct grub_hfsplus_forkdata startup_file;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_hfsplus_compress_index
 {
@@ -116,7 +116,7 @@ struct grub_hfsplus_attrkey
   grub_uint16_t unknown2[2];
   grub_uint16_t namelen;
   grub_uint16_t name[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_hfsplus_attrkey_internal
 {
@@ -142,7 +142,7 @@ struct grub_hfsplus_catkey
   grub_uint32_t parent;
   grub_uint16_t namelen;
   grub_uint16_t name[30];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The on disk layout of an extent overflow file key.  */
 struct grub_hfsplus_extkey
@@ -152,7 +152,7 @@ struct grub_hfsplus_extkey
   grub_uint8_t unused;
   grub_uint32_t fileid;
   grub_uint32_t start;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_hfsplus_key
 {
@@ -163,7 +163,7 @@ struct grub_hfsplus_key
     struct grub_hfsplus_attrkey attrkey;
     grub_uint16_t keylen;
   };
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_hfsplus_btnode
 {
@@ -173,7 +173,7 @@ struct grub_hfsplus_btnode
   grub_uint8_t height;
   grub_uint16_t count;
   grub_uint16_t unused;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Return the offset of the record with the index INDEX, in the node
    NODE which is part of the B+ tree BTREE.  */
index 665248d038713204ca6cd04e2d67f3617f7fd438..524d47a1f58e3a079a09d6b9c85de370f11f61e8 100644 (file)
@@ -64,7 +64,7 @@ struct grub_freebsd_bootinfo
   grub_uint32_t kern_end;
   grub_uint32_t environment;
   grub_uint32_t tags;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct freebsd_tag_header
 {
index dc9cead0c1e77b5a2bfcbda09bd45716dcf4acc0..1c3fa6f1953c3a6b41ea3644c30f000c98524224 100644 (file)
@@ -35,7 +35,7 @@ struct grub_linuxbios_timestamp_entry
 {
   grub_uint32_t id;
   grub_uint64_t tsc;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_linuxbios_timestamp_table
 {
@@ -43,7 +43,7 @@ struct grub_linuxbios_timestamp_table
   grub_uint32_t capacity;
   grub_uint32_t used;
   struct grub_linuxbios_timestamp_entry entries[0];
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_linuxbios_mainboard
 {
@@ -86,7 +86,7 @@ struct grub_linuxbios_table_framebuffer {
   grub_uint8_t blue_mask_size;
   grub_uint8_t reserved_field_pos;
   grub_uint8_t reserved_mask_size;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_linuxbios_mem_region
 {
@@ -94,7 +94,7 @@ struct grub_linuxbios_mem_region
   grub_uint64_t size;
 #define GRUB_MACHINE_MEMORY_AVAILABLE          1
   grub_uint32_t type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 typedef struct grub_linuxbios_mem_region *mem_region_t;
 
 grub_err_t
index 070bb82da530a812fa395ef8de6a2db7be5d11b8..92d2dacda4ee85d3c4755ca2821ed1cd64d12b1a 100644 (file)
@@ -60,13 +60,13 @@ struct grub_cpu_interrupt_gate
   grub_uint8_t unused;
   grub_uint8_t gate;
   grub_uint16_t offset_hi;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_cpu_idt_descriptor
 {
   grub_uint16_t limit;
   grub_uint32_t base;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 extern void (*grub_gdb_trapvec[]) (void);
 void grub_gdb_idtinit (void);
index 9d064c852f66ac9784d2a34012257e4c425c6a5c..da0ca3b83cdc7355fc5b9815415ad7fc8732d153 100644 (file)
@@ -74,7 +74,7 @@ struct grub_e820_mmap
   grub_uint64_t addr;
   grub_uint64_t size;
   grub_uint32_t type;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 enum
   {
@@ -139,7 +139,7 @@ struct linux_kernel_header
   grub_uint64_t setup_data;
   grub_uint64_t pref_address;
   grub_uint32_t init_size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Boot parameters for Linux based on 2.6.12. This is used by the setup
    sectors of Linux, and must be simulated by GRUB on EFI, because
@@ -309,7 +309,7 @@ struct linux_kernel_params
   grub_uint8_t pad2[120];              /* 258 */
   struct grub_e820_mmap e820_map[(0x400 - 0x2d0) / 20];        /* 2d0 */
 
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #endif /* ! ASM_FILE */
 
 #endif /* ! GRUB_LINUX_MACHINE_HEADER */
index 437fa038f27bb9fc49584b508c61d18fd1a59f86..5bdf9b2132f99fddec6718d93befe0df9232bee2 100644 (file)
@@ -36,7 +36,7 @@ struct grub_macho_thread32
   grub_uint8_t unknown1[48];
   grub_uint32_t entry_point;
   grub_uint8_t unknown2[20];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 struct grub_macho_thread64
@@ -46,6 +46,6 @@ struct grub_macho_thread64
   grub_uint8_t unknown1[0x88];
   grub_uint64_t entry_point;
   grub_uint8_t unknown2[0x20];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #endif
index 24e145b0120ee598b9e38400463435f9133a69c6..e48c19b408997d06c3cb71d8464c9e63bce514ef 100644 (file)
@@ -92,7 +92,7 @@ struct grub_netbsd_btinfo_bootwedge {
   grub_disk_addr_t matchblk;
   grub_uint64_t matchnblks;
   grub_uint8_t matchhash[16];  /* MD5 hash */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_netbsd_btinfo_symtab
 {
index 75bb9fb8826e3a9f110ba7155eb30aa1a216a49f..01ca4868b2590fecff7ca5cc57d7805c00027be9 100644 (file)
@@ -69,7 +69,7 @@ struct grub_openbsd_bootargs
   grub_uint32_t ba_type;
   grub_uint32_t ba_size;
   grub_uint32_t ba_next;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_openbsd_bootarg_console
 {
index 71748cebd5591f9ea257294a45b9426909164f0f..3d80716845af8e486ca57ff744f655c001f6053a 100644 (file)
@@ -77,7 +77,7 @@ struct grub_biosdisk_drp
      writes a garbage to the tail of drive parameters,
      regardless of a size specified in a caller.  */
   grub_uint8_t dummy[16];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_biosdisk_cdrp
 {
@@ -94,7 +94,7 @@ struct grub_biosdisk_cdrp
   grub_uint8_t sectors;
   grub_uint8_t heads;
   grub_uint8_t dummy[16];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Disk Address Packet.  */
 struct grub_biosdisk_dap
@@ -104,6 +104,6 @@ struct grub_biosdisk_dap
   grub_uint16_t blocks;
   grub_uint32_t buffer;
   grub_uint64_t block;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #endif /* ! GRUB_BIOSDISK_MACHINE_HEADER */
index fae2e877c8fb730eec492f3df6327d171404b404..16a53e4fe46f98c457763af272feb662a411354e 100644 (file)
@@ -58,7 +58,7 @@ struct grub_i386_idt
 {
   grub_uint16_t limit;
   grub_uint32_t base;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #ifdef GRUB_MACHINE_PCBIOS
 extern struct grub_i386_idt *EXPORT_VAR(grub_realidt);
index 7794379ee936d10b4bb3ded15cabb798d341716c..66002bcd279dc302634905c17e79811b672584d5 100644 (file)
@@ -185,7 +185,7 @@ struct grub_pxenv
   grub_uint16_t        undi_code_seg;  /* UNDI Code segment address.  */
   grub_uint16_t        undi_code_size; /* UNDI Code segment size (bytes).  */
   grub_uint32_t pxe_ptr;       /* SEG:OFF to !PXE struct.  */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxe_bangpxe
 {
@@ -198,7 +198,7 @@ struct grub_pxe_bangpxe
   grub_uint32_t undiromid;
   grub_uint32_t baseromid;
   grub_uint32_t rm_entry;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_get_cached_info
 {
@@ -207,7 +207,7 @@ struct grub_pxenv_get_cached_info
   grub_uint16_t buffer_size;
   grub_uint32_t buffer;
   grub_uint16_t buffer_limit;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_tftp_open
 {
@@ -217,12 +217,12 @@ struct grub_pxenv_tftp_open
   grub_uint8_t filename[128];
   grub_uint16_t tftp_port;
   grub_uint16_t packet_size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_tftp_close
 {
   grub_uint16_t status;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_tftp_read
 {
@@ -230,7 +230,7 @@ struct grub_pxenv_tftp_read
   grub_uint16_t packet_number;
   grub_uint16_t buffer_size;
   grub_uint32_t buffer;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_tftp_get_fsize
 {
@@ -239,18 +239,18 @@ struct grub_pxenv_tftp_get_fsize
   grub_uint32_t gateway_ip;
   grub_uint8_t filename[128];
   grub_uint32_t file_size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_udp_open
 {
   grub_uint16_t status;
   grub_uint32_t src_ip;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_udp_close
 {
   grub_uint16_t status;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_udp_write
 {
@@ -261,7 +261,7 @@ struct grub_pxenv_udp_write
   grub_uint16_t dst_port;
   grub_uint16_t buffer_size;
   grub_uint32_t buffer;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_udp_read
 {
@@ -272,13 +272,13 @@ struct grub_pxenv_udp_read
   grub_uint16_t dst_port;
   grub_uint16_t buffer_size;
   grub_uint32_t buffer;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_pxenv_unload_stack
 {
   grub_uint16_t status;
   grub_uint8_t reserved[10];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 int EXPORT_FUNC(grub_pxe_call) (int func, void * data, grub_uint32_t pxe_rm_entry) __attribute__ ((regparm(3)));
 
index 570bb0fa6c669f69ae811b9b1285b18a60ee62f4..f349b5c2b4af48df24121dd77e31d89e0284a83b 100644 (file)
@@ -84,7 +84,7 @@ struct grub_vbe_info_block
   grub_uint8_t reserved[222];
 
   grub_uint8_t oem_data[256];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_vbe_mode_info_block
 {
@@ -147,7 +147,7 @@ struct grub_vbe_mode_info_block
      that doesn't make structure to be 256 bytes.  So additional one is
      added here.  */
   grub_uint8_t reserved4[189 + 1];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_vbe_crtc_info_block
 {
@@ -161,7 +161,7 @@ struct grub_vbe_crtc_info_block
   grub_uint32_t pixel_clock;
   grub_uint16_t refresh_rate;
   grub_uint8_t reserved[40];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_vbe_palette_data
 {
@@ -169,7 +169,7 @@ struct grub_vbe_palette_data
   grub_uint8_t green;
   grub_uint8_t red;
   grub_uint8_t alignment;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_vbe_flat_panel_info
 {
@@ -184,7 +184,7 @@ struct grub_vbe_flat_panel_info
   grub_vbe_farptr_t reserved_offscreen_mem_ptr;
 
   grub_uint8_t reserved[14];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Prototypes for helper functions.  */
 /* Call VESA BIOS 0x4f00 to get VBE Controller Information, return status.  */
index 12b1e60bc8735f928c145dd33fd64d88d709e31f..a076b8a97c5dbfa1e9edda2d2b0022df900053f2 100644 (file)
@@ -61,7 +61,7 @@ struct grub_xnu_boot_params_common
   grub_uint32_t efi_runtime_first_page;
   /* First memory page containing runtime code or data minus previous value. */
   grub_uint32_t efi_runtime_npages;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_xnu_boot_params_v1
 {
@@ -72,7 +72,7 @@ struct grub_xnu_boot_params_v1
   grub_uint32_t efi_system_table;
   /* Size of grub_efi_uintn_t in bits. */
   grub_uint8_t efi_uintnbits;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #define GRUB_XNU_BOOTARGSV1_VERMINOR 5
 #define GRUB_XNU_BOOTARGSV1_VERMAJOR 1
 
@@ -92,7 +92,7 @@ struct grub_xnu_boot_params_v2
   grub_uint32_t unused2[11];
   grub_uint64_t fsbfreq;
   grub_uint32_t unused3[734];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #define GRUB_XNU_BOOTARGSV2_VERMINOR 0
 #define GRUB_XNU_BOOTARGSV2_VERMAJOR 2
 
index 2d4ab6ff394b1a059c9a005123a2d8693050a47e..30a609c20b5de2997e2b96f86ae7654ce1ad14df 100644 (file)
@@ -41,13 +41,13 @@ struct grub_lvm_label_header {
   grub_uint32_t crc_xl;                /* From next field to end of sector */
   grub_uint32_t offset_xl;     /* Offset from start of struct to contents */
   grub_int8_t type[8];         /* LVM2 001 */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* On disk */
 struct grub_lvm_disk_locn {
   grub_uint64_t offset;                /* Offset in bytes to start sector */
   grub_uint64_t size;          /* Bytes */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Fields with the suffix _xl should be xlate'd wherever they appear */
 /* On disk */
@@ -60,7 +60,7 @@ struct grub_lvm_pv_header {
   /* NULL-terminated list of data areas followed by */
   /* NULL-terminated list of metadata area headers */
   struct grub_lvm_disk_locn disk_areas_xl[0];  /* Two lists */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_LVM_FMTT_MAGIC "\040\114\126\115\062\040\170\133\065\101\045\162\060\116\052\076"
 #define GRUB_LVM_FMTT_VERSION 1
@@ -72,7 +72,7 @@ struct grub_lvm_raw_locn {
   grub_uint64_t size;          /* Bytes */
   grub_uint32_t checksum;
   grub_uint32_t filler;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* On disk */
 /* Structure size limited to one sector */
@@ -84,7 +84,7 @@ struct grub_lvm_mda_header {
   grub_uint64_t size;          /* Size of metadata area */
 
   struct grub_lvm_raw_locn raw_locns[0];       /* NULL-terminated list */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 
 #endif /* ! GRUB_LVM_H */
index 2bfc30f1a79e1258ee6bbd2175f54d0ec0eef25b..3c88e71ca40efd8ce09f087e6497bec5cb36bbe8 100644 (file)
@@ -25,7 +25,7 @@ struct grub_macho_fat_header
 {
   grub_uint32_t magic;
   grub_uint32_t nfat_arch;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 enum
   {
@@ -47,7 +47,7 @@ struct grub_macho_fat_arch
   grub_uint32_t offset;
   grub_uint32_t size;
   grub_uint32_t align;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* File header for 32-bit. Always in native-endian. */
 struct grub_macho_header32
@@ -60,7 +60,7 @@ struct grub_macho_header32
   grub_uint32_t ncmds;
   grub_uint32_t sizeofcmds;
   grub_uint32_t flags;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* File header for 64-bit. Always in native-endian. */
 struct grub_macho_header64
@@ -74,14 +74,14 @@ struct grub_macho_header64
   grub_uint32_t sizeofcmds;
   grub_uint32_t flags;
   grub_uint32_t reserved;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Common header of Mach-O commands. */
 struct grub_macho_cmd
 {
   grub_uint32_t cmd;
   grub_uint32_t cmdsize;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 typedef grub_uint32_t grub_macho_vmprot_t;
 
@@ -100,7 +100,7 @@ struct grub_macho_segment32
   grub_macho_vmprot_t initprot;
   grub_uint32_t nsects;
   grub_uint32_t flags;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* 64-bit segment command. */
 struct grub_macho_segment64
@@ -117,7 +117,7 @@ struct grub_macho_segment64
   grub_macho_vmprot_t initprot;
   grub_uint32_t nsects;
   grub_uint32_t flags;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_MACHO_CMD_THREAD     5
 
@@ -137,7 +137,7 @@ union grub_macho_filestart
   struct grub_macho_header32 thin32;
   struct grub_macho_header64 thin64;
   struct grub_macho_lzss_header lzss;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define GRUB_MACHO_LZSS_OFFSET 0x180
 
index 92f8539828ed197237db3a1163eafd068c5c947f..fdc2904d3fe99122fbd911b13ab946abeb4472fb 100644 (file)
@@ -88,7 +88,7 @@ struct grub_msdos_partition_entry
 
   /* The length in sector units.  */
   grub_uint32_t length;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* The structure of MBR.  */
 struct grub_msdos_partition_mbr
@@ -101,7 +101,7 @@ struct grub_msdos_partition_mbr
 
   /* The signature 0xaa55.  */
   grub_uint16_t signature;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 \f
 
index 788516a2d25bcf9e907454007098cad984a403b6..de6259ee1a004644b27de3fc666ffd1af7f2b717 100644 (file)
@@ -416,7 +416,7 @@ struct grub_net_bootp_packet
   char server_name[64];
   char boot_file[128];
   grub_uint8_t vendor[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #define        GRUB_NET_BOOTP_RFC1048_MAGIC_0  0x63
 #define        GRUB_NET_BOOTP_RFC1048_MAGIC_1  0x82
index 1a7efa7773fc022fb2643ed3919cb795630a8b76..17f38cfa0b0d7038739c251671870f4e9e7fecf1 100644 (file)
@@ -27,7 +27,7 @@ struct udphdr
   grub_uint16_t dst;
   grub_uint16_t len;
   grub_uint16_t chksum;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_net_udp_socket;
 typedef struct grub_net_udp_socket *grub_net_udp_socket_t;
index af3f4b05df5044d64c776ce9dd51436ceddaddef..d1a6af6967fe256d331ed0b99635536aa41035ca 100644 (file)
@@ -125,7 +125,7 @@ struct grub_ntfs_bpb
   grub_int8_t reserved_6[3];
   grub_uint64_t num_serial;
   grub_uint32_t checksum;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_ntfs_attr
 {
index a666e898ba82754b3136f0886ee601aff0b0f9ae..85e7401aea3e8ebb4cc2db596c9779f2f7a76cfb 100644 (file)
@@ -153,7 +153,7 @@ struct grub_pc_bios_boot_blocklist
   grub_uint64_t start;
   grub_uint16_t len;
   grub_uint16_t segment;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #endif
 
 #endif
index a3e79888a6cdef03c565bac105b3a0e8a2cab35a..3f1e6d28ccfa2d5da7af1c5b73ef876b87bbc81f 100644 (file)
@@ -34,7 +34,7 @@ struct grub_scsi_test_unit_ready
   grub_uint8_t reserved3;
   grub_uint8_t control;
   grub_uint8_t pad[6]; /* To be ATAPI compatible */
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_inquiry
 {
@@ -45,7 +45,7 @@ struct grub_scsi_inquiry
   grub_uint8_t alloc_length;
   grub_uint8_t control;
   grub_uint8_t pad[6]; /* To be ATAPI compatible */
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_inquiry_data
 {
@@ -57,7 +57,7 @@ struct grub_scsi_inquiry_data
   char vendor[8];
   char prodid[16];
   char prodrev[4];
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_request_sense
 {
@@ -68,7 +68,7 @@ struct grub_scsi_request_sense
   grub_uint8_t alloc_length;
   grub_uint8_t control;
   grub_uint8_t pad[6]; /* To be ATAPI compatible */
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_request_sense_data
 {
@@ -83,7 +83,7 @@ struct grub_scsi_request_sense_data
   grub_uint8_t field_replaceable_unit_code;
   grub_uint8_t sense_key_specific[3];
   /* there can be additional sense field */
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_read_capacity10
 {
@@ -95,13 +95,13 @@ struct grub_scsi_read_capacity10
   grub_uint8_t PMI;
   grub_uint8_t control;
   grub_uint16_t pad; /* To be ATAPI compatible */
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_read_capacity10_data
 {
   grub_uint32_t last_block;
   grub_uint32_t blocksize;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_read_capacity16
 {
@@ -111,14 +111,14 @@ struct grub_scsi_read_capacity16
   grub_uint32_t alloc_len;
   grub_uint8_t PMI;
   grub_uint8_t control;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_read_capacity16_data
 {
   grub_uint64_t last_block;
   grub_uint32_t blocksize;
   grub_uint8_t pad[20];
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_read10
 {
@@ -129,7 +129,7 @@ struct grub_scsi_read10
   grub_uint16_t size;
   grub_uint8_t reserved2;
   grub_uint16_t pad;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_read12
 {
@@ -139,7 +139,7 @@ struct grub_scsi_read12
   grub_uint32_t size;
   grub_uint8_t reserved;
   grub_uint8_t control;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_read16
 {
@@ -149,7 +149,7 @@ struct grub_scsi_read16
   grub_uint32_t size;
   grub_uint8_t reserved;
   grub_uint8_t control;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_write10
 {
@@ -160,7 +160,7 @@ struct grub_scsi_write10
   grub_uint16_t size;
   grub_uint8_t reserved2;
   grub_uint16_t pad;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_write12
 {
@@ -170,7 +170,7 @@ struct grub_scsi_write12
   grub_uint32_t size;
   grub_uint8_t reserved;
   grub_uint8_t control;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 struct grub_scsi_write16
 {
@@ -180,7 +180,7 @@ struct grub_scsi_write16
   grub_uint32_t size;
   grub_uint8_t reserved;
   grub_uint8_t control;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 typedef enum
   {
index a54e47566fa6245ddb8983143ee609db552cf853..02d53f28e1ad4db2993cd2858713879813a1cc26 100644 (file)
@@ -57,7 +57,7 @@ struct grub_boot_blocklist
 {
   grub_uint64_t start;
   grub_uint32_t len;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #endif
 
 #endif /* ! BOOT_MACHINE_HEADER */
index e8c2f68f9d3ce884c5746ec93a3bcb8f40305eb6..79f765c620d5d9371985e9da8e7fb8671ee2e39f 100644 (file)
 #include <grub/cpu/types.h>
 #endif
 
+#ifdef __MINGW32__
+#define GRUB_PACKED __attribute__ ((packed,gcc_struct))
+#else
+#define GRUB_PACKED __attribute__ ((packed))
+#endif
+
 #ifdef GRUB_BUILD
 # define GRUB_CPU_SIZEOF_VOID_P        BUILD_SIZEOF_VOID_P
 # define GRUB_CPU_SIZEOF_LONG  BUILD_SIZEOF_LONG
@@ -253,7 +259,7 @@ static inline grub_uint16_t grub_get_unaligned16 (const void *ptr)
   struct grub_unaligned_uint16_t
   {
     grub_uint16_t d;
-  } __attribute__ ((packed));
+  } GRUB_PACKED;
   const struct grub_unaligned_uint16_t *dd
     = (const struct grub_unaligned_uint16_t *) ptr;
   return dd->d;
@@ -264,7 +270,7 @@ static inline void grub_set_unaligned16 (void *ptr, grub_uint16_t val)
   struct grub_unaligned_uint16_t
   {
     grub_uint16_t d;
-  } __attribute__ ((packed));
+  } GRUB_PACKED;
   struct grub_unaligned_uint16_t *dd = (struct grub_unaligned_uint16_t *) ptr;
   dd->d = val;
 }
@@ -274,7 +280,7 @@ static inline grub_uint32_t grub_get_unaligned32 (const void *ptr)
   struct grub_unaligned_uint32_t
   {
     grub_uint32_t d;
-  } __attribute__ ((packed));
+  } GRUB_PACKED;
   const struct grub_unaligned_uint32_t *dd
     = (const struct grub_unaligned_uint32_t *) ptr;
   return dd->d;
@@ -285,7 +291,7 @@ static inline void grub_set_unaligned32 (void *ptr, grub_uint32_t val)
   struct grub_unaligned_uint32_t
   {
     grub_uint32_t d;
-  } __attribute__ ((packed));
+  } GRUB_PACKED;
   struct grub_unaligned_uint32_t *dd = (struct grub_unaligned_uint32_t *) ptr;
   dd->d = val;
 }
@@ -293,7 +299,7 @@ static inline void grub_set_unaligned32 (void *ptr, grub_uint32_t val)
 struct grub_unaligned_uint64
 {
   grub_uint64_t val;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 typedef struct grub_unaligned_uint64 grub_unaligned_uint64_t;
 
@@ -309,7 +315,7 @@ static inline void grub_set_unaligned64 (void *ptr, grub_uint64_t val)
   struct grub_unaligned_uint64_t
   {
     grub_uint64_t d;
-  } __attribute__ ((packed));
+  } GRUB_PACKED;
   struct grub_unaligned_uint64_t *dd = (struct grub_unaligned_uint64_t *) ptr;
   dd->d = val;
 }
index 17b6ca684155e4ea84c833006cf6bd0bd4990f8d..a0403e91f9af8f9e463f1fd1e873acf3212276ae 100644 (file)
@@ -37,7 +37,7 @@ struct grub_unicode_compact_range
   unsigned comb_type:8;
   unsigned bidi_mirror:1;
   unsigned join_type:3;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Old-style Arabic shaping. Used for "visual UTF-8" and
    in grub-mkfont to find variant glyphs in absence of GPOS tables.  */
index 7d141524820423d438bd4f74d3e2e52da4139fe9..aac5ab05a042f0c44df5aef6ec7da690e2f23f2a 100644 (file)
@@ -36,7 +36,7 @@ struct grub_usb_desc
 {
   grub_uint8_t length;
   grub_uint8_t type;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usb_desc_device
 {
@@ -54,7 +54,7 @@ struct grub_usb_desc_device
   grub_uint8_t strprod;
   grub_uint8_t strserial;
   grub_uint8_t configcnt;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usb_desc_config
 {
@@ -66,7 +66,7 @@ struct grub_usb_desc_config
   grub_uint8_t strconfig;
   grub_uint8_t attrib;
   grub_uint8_t maxpower;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #if 0
 struct grub_usb_desc_if_association
@@ -79,7 +79,7 @@ struct grub_usb_desc_if_association
   grub_uint8_t subclass;
   grub_uint8_t protocol;
   grub_uint8_t function;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 #endif
 
 struct grub_usb_desc_if
@@ -93,7 +93,7 @@ struct grub_usb_desc_if
   grub_uint8_t subclass;
   grub_uint8_t protocol;
   grub_uint8_t strif;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usb_desc_endp
 {
@@ -103,14 +103,14 @@ struct grub_usb_desc_endp
   grub_uint8_t attrib;
   grub_uint16_t maxpacket;
   grub_uint8_t interval;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usb_desc_str
 {
   grub_uint8_t length;
   grub_uint8_t type;
   grub_uint16_t str[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usb_desc_debug
 {
@@ -118,7 +118,7 @@ struct grub_usb_desc_debug
   grub_uint8_t type;
   grub_uint8_t in_endp;
   grub_uint8_t out_endp;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_usb_usb_hubdesc
 {
@@ -129,6 +129,6 @@ struct grub_usb_usb_hubdesc
   grub_uint8_t pwdgood;
   grub_uint8_t current;
   /* Removable and power control bits follow.  */
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 #endif /* GRUB_USBDESC_H */
index 5429007d04ff10ee296e948553d91cd6ad1c68a0..aef482cb9f322c5ea9988729b61dcbf80e413bd8 100644 (file)
@@ -149,7 +149,7 @@ struct grub_usb_packet_setup
   grub_uint16_t value;
   grub_uint16_t index;
   grub_uint16_t length;
-} __attribute__((packed));
+} GRUB_PACKED;
 
 
 #endif /* GRUB_USBTRANS_H */
index 601261e15c52f9003c5f518879ac7a3042168386..bca677789fa02bd2c9266de75e82dc04ddf5360e 100644 (file)
@@ -273,7 +273,7 @@ struct grub_video_edid_info
 
   grub_uint8_t extension_flag;
   grub_uint8_t checksum;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 typedef enum grub_video_driver_id
   {
index 9b17717a9fc9c396683c2023c61e796f3623c679..b7a7f450cbcf0ed21fb190463432fe5db79c386c 100644 (file)
@@ -46,7 +46,7 @@ struct grub_xnu_hibernate_header
      Used only to skip it.
    */
   grub_uint32_t extmapsize;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* In-memory structure for temporary keeping device tree. */
 struct grub_xnu_devtree_key
@@ -67,7 +67,7 @@ grub_xnu_extdesc
 {
   grub_uint32_t addr;
   grub_uint32_t size;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 /* Header describing extension in the memory. */
 struct grub_xnu_extheader
@@ -78,7 +78,7 @@ struct grub_xnu_extheader
   grub_uint32_t binarysize;
   grub_uint32_t nameaddr;
   grub_uint32_t namesize;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct grub_xnu_devtree_key *grub_xnu_create_key (struct grub_xnu_devtree_key **parent,
                                                  const char *name);
index f2b7cb1da091d0b56b14761341fd5687c0309732..95c67dcbaabd5101b484fcb34f9b5319a4d68c43 100644 (file)
@@ -91,7 +91,7 @@ typedef union zap_leaf_chunk {
                {
                        grub_uint8_t la_array[ZAP_LEAF_ARRAY_BYTES];
                        grub_uint64_t la_array64;
-               } __attribute__ ((packed));
+               } GRUB_PACKED;
                grub_uint16_t la_next;          /* next blk or CHAIN_END */
        } l_array;
        struct zap_leaf_free {
index 8fad2cc09b780e549c911b28dde4376e246b4437..19ce136bb9bd4ed5046be3afbddd557a2cbbf43d 100644 (file)
@@ -30,7 +30,7 @@
 typedef struct zio_eck {
        grub_uint64_t   zec_magic;      /* for validation, endianness   */
        zio_cksum_t     zec_cksum;      /* 256-bit checksum             */
-} __attribute__ ((packed)) zio_eck_t;
+} GRUB_PACKED zio_eck_t;
 
 /*
  * Gang block headers are self-checksumming and contain an array
index bd133ba1f7208731f05bfd2be2bdeee02a9508c7..7e5ac69ba4855eca5e4bf4d3da7e88d9f31a8ed6 100644 (file)
@@ -238,7 +238,7 @@ struct multiboot_mmap_entry
 #define MULTIBOOT_MEMORY_NVS                    4
 #define MULTIBOOT_MEMORY_BADRAM                 5
   multiboot_uint32_t type;
-} __attribute__((packed));
+} GRUB_PACKED;
 typedef struct multiboot_mmap_entry multiboot_memory_map_t;
 
 struct multiboot_mod_list
index 2e33cbf8d20902fe55a2a2dea868808fb65c380b..3ccff15fc4a5f9ac1c6884f653792243874c4ad5 100644 (file)
@@ -179,7 +179,7 @@ struct multiboot_mmap_entry
 #define MULTIBOOT_MEMORY_BADRAM                 5
   multiboot_uint32_t type;
   multiboot_uint32_t zero;
-} __attribute__((packed));
+} GRUB_PACKED;
 typedef struct multiboot_mmap_entry multiboot_memory_map_t;
 
 struct multiboot_tag
index d3a8af05c0b2408ea57288918519efd51076fba6..3cb02ad5c45669e1f5cb0015519727e28d37295e 100644 (file)
@@ -374,7 +374,7 @@ struct gsub_header
   grub_uint16_t scripts_off;
   grub_uint16_t features_off;
   grub_uint16_t lookups_off;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct gsub_features
 {
@@ -389,21 +389,21 @@ struct gsub_features
 #define FEATURE_RLIG 0x726c6967
     grub_uint32_t feature_tag;
     grub_uint16_t offset;
-  } __attribute__ ((packed)) features[0];
-} __attribute__ ((packed));
+  } GRUB_PACKED features[0];
+} GRUB_PACKED;
 
 struct gsub_feature
 {
   grub_uint16_t params;
   grub_uint16_t lookupcount;
   grub_uint16_t lookupindices[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct gsub_lookup_list
 {
   grub_uint16_t count;
   grub_uint16_t offsets[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct gsub_lookup
 {
@@ -411,7 +411,7 @@ struct gsub_lookup
   grub_uint16_t flag;
   grub_uint16_t subtablecount;
   grub_uint16_t subtables[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct gsub_substitution
 {
@@ -426,14 +426,14 @@ struct gsub_substitution
       grub_uint16_t repl[0];
     };
   };
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct gsub_coverage_list
 {
   grub_uint16_t type;
   grub_uint16_t count;
   grub_uint16_t glyphs[0];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 struct gsub_coverage_ranges
 {
@@ -444,8 +444,8 @@ struct gsub_coverage_ranges
     grub_uint16_t start;
     grub_uint16_t end;
     grub_uint16_t start_index;
-  } __attribute__ ((packed)) ranges[0];
-} __attribute__ ((packed));
+  } GRUB_PACKED ranges[0];
+} GRUB_PACKED;
 
 #define GSUB_SINGLE_SUBSTITUTION 1
 
index 6ee5e588a966879b34f65f6e65f771b4f7c566f2..4b0464cc28535cf1dfaf376ba9f45b4d087eee9f 100644 (file)
@@ -132,7 +132,7 @@ struct head
   char devminor[8];
   char prefix[155];
   char pad[12];
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static void
 write_zeros (unsigned rsz)
index 6bef638dab3c297453b72923be7909ebce5763be..73f877442004c03741077456928ca99c5d677a19 100644 (file)
@@ -41,7 +41,7 @@ struct header
   grub_uint8_t magic;
   grub_uint16_t width;
   grub_uint16_t height;
-} __attribute__ ((packed));
+} GRUB_PACKED;
 
 static struct grub_video_palette_data ieee1275_palette[256];