delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/07/23:32:58

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4C5D7682.5030402@monai.ca>
References: <AANLkTimghbyew2f+Q1fSTfpzv0cw7CrypX60vcW0Qgyb AT mail DOT gmail DOT com> <20100806134005 DOT GD22459 AT ednor DOT casa DOT cgf DOT cx> <20100806141140 DOT GC31783 AT calimero DOT vinschen DOT de> <AANLkTimnMASSuyv4mXtt3x8d=NZMg4y1DuCfT4Jr44Qt AT mail DOT gmail DOT com> <20100806163925 DOT GE31783 AT calimero DOT vinschen DOT de> <20100806173153 DOT GB23627 AT ednor DOT casa DOT cgf DOT cx> <20100806182832 DOT GH31783 AT calimero DOT vinschen DOT de> <AANLkTimEG2YeQfNBGNSp7DAS69wf9x+6W_WUQEwu0mE- AT mail DOT gmail DOT com> <4C5CA945 DOT 6070601 AT monai DOT ca> <AANLkTimoe7ZOMkymQK3BPmg2yvWXGkF2qf2C9JjUdxqn AT mail DOT gmail DOT com> <4C5D7682 DOT 5030402 AT monai DOT ca>
Date: Sat, 7 Aug 2010 23:32:46 -0400
Message-ID: <AANLkTin3ccFjjbzTwKci2D3yzRkqge3GBMKn-h4vAHSx@mail.gmail.com>
Subject: Re: The dirent struct
From: Chris Sutcliffe <ir0nh34d AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 7 August 2010 11:06, Steven Monai wrote:
> IMHO, this is an unsafe approach. If, in a future version, upstream
> decides to start using itr->d_reclen for its intended purpose, then the
> plausible-but-incorrect value you've put there could become the source
> of Cygwin-specific bugs. In principle, if you can't/won't put the
> correct value there (which I see Corinna has helpfully posted), then you
> ought to put an obviously incorrect value there instead, such as 0 or -1.
>
> Perhaps the safest approach, though, would be to remove (or comment-out)
> the d_reclen field from the itr struct. Then, if upstream *does* use
> that field in the future, you should get build errors to alert you of that.

I've actually went with Corinna's proposed itr->d_reclen
implementation, which I believe is the safest route for now.

Cheers!

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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