delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/23/09:03:01

Date: Tue, 23 Feb 1999 16:01:11 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Rafael García <rafael AT geninfor DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: struct fields padding
In-Reply-To: <7au5m1$13d$1@lola.ctv.es>
Message-ID: <Pine.SUN.3.91.990223155820.3867C-100000@is>
MIME-Version: 1.0
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id JAA24683
Reply-To: djgpp AT delorie DOT com

On Tue, 23 Feb 1999, Rafael García wrote:

> I can work with the data files from DJGPP and from BC well, but the format
> of structures seems to be different in both compilers because I cannot
> recognize it from the other.

See section 22.10 of the DJGPP FAQ list (v2/faq211b.zip from the same 
place you get DJGPP).  It discusses this problem and suggests several 
solutions.

> I have tried #pragma pack(1) to make format compatible, but it don't work.

Probably because you forgot that int is 32-bit in DJGPP, whereas it's 
16-bit in BC.  Otherwise, pragma pack works for me.

- Raw text -


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