This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

packed structures


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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]