🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15610

Re: Structure and sizeof mis-behaving

#15610
From: Bob Gonder
Date: Sun, 22 Jun 2003 22:22
31 lines
1884 bytes
"Chris" <Chris8852@adelphia.net> wrote:

>#if ! (defined(lint) || defined(RC_INVOKED))
>is included in that file
>:(

Yes, that's what I said.
The point is, do YOU either in your app, or in your compilation
settings have either "lint"  defined/set?
If you do, then "pshpack2.h" is Not included, and your sizes will be
larger than otherwise.

In other words, this is essentially what the code says:

#if ! defined(lint)
	#if ! defined(RC_INVOKED)
		#pragma pack(2)
	#endif
#endif
typedef struct{
};
#if ! defined(lint)
	#if ! defined(RC_INVOKED)
		#pragma pack()
	#endif
#endif

So, you want to turn Off lint to get the smaller structures.
I don't know why they don't want to pack for lint.

I assume RC_INVOKED means the Resource Compiler.
Technical Details
Message-ID: <l6acfv45i8a0qtl1jitlt1bvdahca8siva@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3eed33f3$1@newsgroups.borland.com> <3eeda998@newsgroups.borland.com> <obtsev8l77n8ugm19f19vv5577gnm6mqs2@4ax.com> <3ef600c0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,316b0e1c5551c37a
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-22 15:29:11 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Structure and sizeof mis-behaving
Date: Sun, 22 Jun 2003 15:22:13 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <l6acfv45i8a0qtl1jitlt1bvdahca8siva@4ax.com>
References: <3eed33f3$1@newsgroups.borland.com> <3eeda998@newsgroups.borland.com> <obtsev8l77n8ugm19f19vv5577gnm6mqs2@4ax.com> <3ef600c0$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.164.108
X-Trace: newsgroups.borland.com 1056320507 67.31.164.108 (22 Jun 2003 15:21:47 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail