Date: Sun, 2 Nov 1997 16:31:07 +0100 (MET) From: Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE> To: freebsd-hackers@freefall.FreeBSD.org Subject: gcc and bitfields Message-ID: <199711021531.QAA04864@gil.physik.rwth-aachen.de>
next in thread | raw e-mail | index | archive | help
During porting a piece of a DOS program to make a driver
for FreeBSD of it for a certain device I'm stuck at the
point where there is a structure:
struct C_OPEN {
int a;
int b;
unsigned xdt:1;
unsigned reserved:15;
}
The sizeof this structure is 10 under DOS (borland C)
and evaluates to 12 under cc (gcc) on FreeBSD.
There are a lot of these definitions and it would be
tedious to find a workaround.
Does anyone know if I can pack the structure respectively
enforce the bitfield to a short int?
--
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711021531.QAA04864>
