delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2013/05/01/08:24:35

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:x-received:in-reply-to:references:date:message-id
:subject:from:to:content-type;
bh=rVMxWG00rtH5BtL4/ytd0VBbeNFLaWW58rgz7lQX9KE=;
b=gb93RjNAYZ8aR0YIf7tHghzJH3p0HytFhRV1tqBuCwMWwC0dgvgHzrztShIs8yXDf8
uH/Y2jaNZoN4rVNyMPnOGJqbt+cA8h9cnRLxkUq9giI2N3XY0EoRbCAA0lGAN6CWYrFC
trzq1sBn+reIqZXDUFoM95sqhliGMyRjQFB27Crg6CW9NOexE3pbICWx3hR134cQSt89
QGgQwu7JlP+mSk6zDC6i5n+8C4sn8w6/Ci+bBEmog6E4jK0s7g2FeQLrBMXP6actV9fs
2/lQt67Mkt0AXdDgo/u116OrGrmH6JYDpu+1NvOYVgLcbtt/z0UOKz4OQMqzpPSTIYdu
Uv1A==
MIME-Version: 1.0
X-Received: by 10.60.45.133 with SMTP id n5mr632676oem.0.1367411064341; Wed,
01 May 2013 05:24:24 -0700 (PDT)
In-Reply-To: <5180E8C7.4010609@gmx.de>
References: <5180E8C7 DOT 4010609 AT gmx DOT de>
Date: Wed, 1 May 2013 07:24:24 -0500
Message-ID: <CAA-ihx_khHjqOC2gf68Hc51uNBojH+zipTBwK1SBGVrS9q_uAg@mail.gmail.com>
Subject: Re: The encoding of S_IFREG
From: Rugxulo <rugxulo AT gmail DOT com>
To: djgpp-workers AT delorie DOT com
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Hi,

On Wed, May 1, 2013 at 5:04 AM, Juan Manuel Guerrero
<juan DOT guerrero AT gmx DOT de> wrote:
>
> While I was trying to port patch 2.7.1, besides a lot of issues, I
> encountered
> the following problem:  DJGPP file mode encodes S_IFREG with 0x0000.
> Unfortunately the patch code checks if the file mode is valid at all by
> checking against zero.
>
> We could replace 0x0000 by 0x6000.  I am aware that this may introduce
> backward
> incompatibilities, but the benefits when a porting job is done are evident.

At risk of stating the obvious, just #undef it locally and (re)
#define it with non-zero value.

While it's possible that something would break if you changed this
globally, I'd be mighty surprised. AFAIK, the whole point of such
named constants is to avoid relying on hidden values.

(Though we never did fix memalign nor various other oddities that
conflict with others. Too much to do, I guess. And I'm afraid I'm not
useful enough to be much help overall.)

- Raw text -


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