delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2015/05/13/14:56:07

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=pVRmcdS/zG6s3V/BHeN5Ev4xaiWelDIxTThfirLzxaA=;
b=tnx4TjJWLq+9jgyobVRtD+dExfCe1cOSfcARb4r6m6Hl2aqU7lBmDvlKdYBJW18eXI
/Ktc232pewThcKOMAJ+xiZoo9aG20Xdg2h5+b7wsuM/x6bvAwHBqA1fDn4Ig+DcLwiSX
u3tqhGvdtC9VZYxNQVHxcL4qCuYopPUYdck4cTIzHmJ7cMHdMDjFl5MQ35ROXkmcOeWo
apEer2VeHKkS61zgaU9MrE8cSJRfOa+SZyauUu6B/lxgWdOaItbcPwZyhA4J8/UST9aX
QR744AtUi4DxhAaifc8xrbvm6pl8bUMx6LSxvGHu54fa3/xuFS9bX2d8QuY5zvrJIs93
NI9g==
MIME-Version: 1.0
X-Received: by 10.42.81.201 with SMTP id a9mr10860991icl.9.1431543354085; Wed,
13 May 2015 11:55:54 -0700 (PDT)
In-Reply-To: <83k2wcjt8e.fsf@gnu.org>
References: <CAA2C=vCgLHdH3BJxastGzUsJzhiRddytiYwB1MP_aaiiVpC4nA AT mail DOT gmail DOT com>
<83k2wcjt8e DOT fsf AT gnu DOT org>
Date: Wed, 13 May 2015 21:55:53 +0300
Message-ID: <CAA2C=vB-YiGkyx5dJpa=hcBh0O4_NiEKh2tKm5OHyNX3vW7HsQ@mail.gmail.com>
Subject: Re: bad pragma in dir.h? (and our structrure packing)
From: "Ozkan Sezer (sezeroz AT gmail DOT com)" <djgpp AT delorie DOT com>
To: djgpp AT delorie DOT com
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 5/13/15, Eli Zaretskii (eliz AT gnu DOT org) <djgpp AT delorie DOT com> wrote:
>> Date: Wed, 13 May 2015 18:29:39 +0300
>> From: "Ozkan Sezer (sezeroz AT gmail DOT com)" <djgpp AT delorie DOT com>
>>
>> In dir.h, structs ffblk and ffblklfn are surrounded by #pragma pack(1)
>> and #pragma pack(4), obviously with purpose of having those two structs
>> at byte packing.  But the restoration of the original packing by that
>> #pragma pack(4) seems wrong: do we not need a #pragma pack() in there,
>> or am I missing something?
>
> Wasn't that already fixed in the past?

Well, obviously not. that pragma pack(4) is there in the cvs

>  I have vague recollections of
> having discussed that long ago, o maybe look in the archives (of this
> list or or djgpp-workers).
>
>> While I was there, I also noticed that for structure packing in coff.h,
>> dir.h and dos.h we are marking every member with __attribute__((packed)
>> instead of giving the attribute to the stucture itself. What is the
>> reason for it?
>
> See the DJGPP FAQ (node "Struct size"): it tells that the GNU C++
> compiler doesn't allow having that attribute on the entire struct.
> Perhaps that's changed nowadays, I don't know.  (Btw, which compiler
> versions should be supported by djdev205?  That is, which versions of
> GCC are supported to compile the library?)
>

If you are mentioning http://www.delorie.com/djgpp/v2faq/faq22_12.html
the text there says that it's a bug with gcc < 2.7.2.1, and the pragma I
referenced has a comment saying that it is needed for gcc2.7.x and earlier
You looked at the headers I mentioned, yes?

On 5/13/15, DJ Delorie <dj AT delorie DOT com> wrote:
>
> 20 years ago, that pragma might not have existed...
>

As I said above, that pragma was there for a 20 year old compiler..

- Raw text -


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