I have an application that must retreive records from a file that is
read into a buffer.
the records consist of the following structure
struct {
short wordtype;
long engwordoff;
long phonoff;
} dictrec;
i have forced it to be packed by using
__attribute ((packed))
this is an array of these structures by the way.

 the problem comes when reading the records.
I can fetch engwordoff correct every other fetch.
the first time I get all 32 bits.
the next time I only get the lower 16 bits.
I assume this is because longs must be on a double word boundary.
is there a way to force gcc to compile with out the restriction?
this only happens on the netwinder by the way, not on an intel based
machine.

thanks
phil

unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++        Please use [EMAIL PROTECTED] for           ++
++                        kernel-related discussions.                      ++

Reply via email to