[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] HELP: __attribute__ ((packed)) confusion

From: Christopher Dobbs
Subject: Re: [Tinycc-devel] HELP: __attribute__ ((packed)) confusion
Date: Thu, 10 Feb 2005 15:21:11 -0800
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

This compiled to 512 for me, but when I put it in my header, it came out 516.
I just moved some structures arround, and made it all fit.

It would be nice to see packed structures in the future, thue.

Christopher Dobbs

Bastian Czerwinski wrote:

The following outputs 512 for me:

#define PACKED __attribute__ ((__packed__))

typedef struct {                        // 512 byte header
unsigned char bc[3];                  // Boot Code Signature
unsigned char signature[8];           // signature string "LIBV10"
PACKED unsigned long dir;                    // offset of first dir block
PACKED unsigned long freechain;              // offset of first block
PACKED unsigned long eof; // offset of end of freechain
unsigned char label[41];              // Volume Label
unsigned long attr;                   // Volume Attributes
char          passcode[16];           // Volume Password
unsigned char fill[428];              // Filler
} header;


Bastian Czerwinski

Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]