Message-Id: <199605090709.DAA29191@delorie.com> Date: Thu, 09 May 96 09:58:29 LIT From: Martynas Kunigelis Subject: Re: Structure size To: Gert-Jan Schoenmakers , DJGPP mailing list In-Reply-To: Your message of Wed, 08 May 1996 13:45:32 +0200 just put #pragma pack(1) and #pragma pack() around your structure like this: #pragma pack(1) struct foo { ... }; #pragma pack() or use 2 or 3 or whatever as an argument for the 1st pragma if you want 2 or 3 or whatever byte alignment of structure fields. Martynas P.S. you could use __attribute__ ((packed)), but it currently doesn't work with GNU C++. Allthough GNU guys claim using #pragmas is wrong, #pragma pack is quite portable, at least Watcom and Microsoft compilers support it AFAIK.