Subject: packed structures
From: [email-masked] (Tom Stokes)

11 Aug 1998 19:10:48 -0700
Message-ID: <000101bdc547$2b785c20$e645aace.cygnus.gnu-win32@TomStokes>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "CYGWIN32" <[email-masked]>

The size of this structure is 12 which is wrong. What am I missing?

typedef struct HeaderTag {
    ULONG          HeaderLength;
    CHAR             PackingType __attribute__ ((packed));
    USHORT         NumRows __attribute__ ((packed));
    USHORT         PackedSize __attribute__ ((packed));
    } HeaderType, *pHeaderType;

Also, I  have a lot of structures to pack. Is there nothing like a #pragma
pack(1) followed later by #pragma pack()?

        Tom Stokes

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".