www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/21/10:17:57

Newsgroups: comp.os.msdos.djgpp
From: Jan Baumgart <jan AT gonzo DOT schwaben DOT de>
Subject: Packed structs ?
Sender: news AT ikarus DOT schwaben DOT de
Lines: 11
Organization: private linux site
Message-ID: <EGrB3B.3HA@ikarus.schwaben.de>
Date: Fri, 19 Sep 1997 13:06:46 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Is there a keyword to tell DJGPP to pack one _single_ struct, this means
non-alignment of the variables, thus leaving no "holes" between them ?
I need this for writing/reading a header easily from a files into a struct,
using fread/frwite.
(Watcom C/C++ has a _PACKED keyword, for example)

I'm aware of the compiler option "-fpack-struct", but this will pack
_every_ struct, which will cause unnecessary problems.

Thanks for you help,
Jan Baumgart

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019