delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/07/04:12:02

Date: Mon, 7 Sep 1998 11:11:51 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: yonghlee <yonghlee AT keysoft DOT lgec DOT co DOT kr>
cc: djgpp AT delorie DOT com
Subject: Re: "word aligned structure" compiling option
In-Reply-To: <_ZJI1.392$XU4.1621018@news.bora.net>
Message-ID: <Pine.SUN.3.91.980907110728.23208K-100000@is>
MIME-Version: 1.0

On Mon, 7 Sep 1998, yonghlee wrote:

> I want to know the gcc compiler option for word aligned structure
> option

The FAQ mentions in section 22.10 the #pragma pack directive (pack(2) 
will do what you seem to need), but it also requires source-level change.

> And I don't want change my source code for target compatibility
> as described in DJGPP FAQ list.

Why not?  What's wrong with something like this:

	#ifdef __DJGPP__
	... put here the DJGPP version ...
	#else
	.... put the Borland version here ...
	#endif

You are in an area which is inherently non-portable, so some #ifdef'ing 
is unavoidable.

- Raw text -


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