Re: The dirent struct

2010-08-07 Thread Chris Sutcliffe
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 principl

Re: The dirent struct

2010-08-07 Thread Steven Monai
On 2010/08/06 8:21 PM, Chris Sutcliffe wrote: > On 6 August 2010 20:31, Steven Monai wrote: >> On 2010/08/06 11:48 AM, Chris Sutcliffe wrote: >>> I've decided to take a different approach and decided to implement it >>> as follows: >>> >>> #ifdef __CYGWIN__ >>> itr->d_fileno = entry->d_ino; >>>

Re: The dirent struct

2010-08-07 Thread Corinna Vinschen
On Aug 6 23:21, Chris Sutcliffe wrote: > On 6 August 2010 20:31, Steven Monai wrote: > > On 2010/08/06 11:48 AM, Chris Sutcliffe wrote: > >> I've decided to take a different approach and decided to implement it > >> as follows: > >> > >> #ifdef __CYGWIN__ > >>     itr->d_fileno = entry->d_ino; > >

Re: The dirent struct

2010-08-06 Thread Chris Sutcliffe
On 6 August 2010 20:31, Steven Monai wrote: > On 2010/08/06 11:48 AM, Chris Sutcliffe wrote: >> I've decided to take a different approach and decided to implement it >> as follows: >> >> #ifdef __CYGWIN__ >>     itr->d_fileno = entry->d_ino; >>     itr->d_reclen = strlen(entry->d_name); >> #else >>

Re: The dirent struct

2010-08-06 Thread Steven Monai
On 2010/08/06 11:48 AM, Chris Sutcliffe wrote: > I've decided to take a different approach and decided to implement it > as follows: > > #ifdef __CYGWIN__ > itr->d_fileno = entry->d_ino; > itr->d_reclen = strlen(entry->d_name); > #else > itr->d_fileno = entry->d_fileno; > itr->d_re

Re: The dirent struct

2010-08-06 Thread Corinna Vinschen
On Aug 6 20:28, Corinna Vinschen wrote: > On Aug 6 13:31, Christopher Faylor wrote: > > On Fri, Aug 06, 2010 at 06:39:25PM +0200, Corinna Vinschen wrote: > > >On Aug 6 10:51, Chris Sutcliffe wrote: > > >> On 6 August 2010 10:11, Corinna Vinschen wrote: > > >> > On Aug ??6 09:40, Christopher Fayl

Re: The dirent struct

2010-08-06 Thread Chris Sutcliffe
On 6 August 2010 14:28, Corinna Vinschen wrote: > On Aug  6 13:31, Christopher Faylor wrote: >> On Fri, Aug 06, 2010 at 06:39:25PM +0200, Corinna Vinschen wrote: >> >Btw., d_fileno is just another old name for d_ino.  The Linux headers >> >defines it thus as `#define d_fileno d_ino'.  We can do the

Re: The dirent struct

2010-08-06 Thread Corinna Vinschen
On Aug 6 13:31, Christopher Faylor wrote: > On Fri, Aug 06, 2010 at 06:39:25PM +0200, Corinna Vinschen wrote: > >On Aug 6 10:51, Chris Sutcliffe wrote: > >> On 6 August 2010 10:11, Corinna Vinschen wrote: > >> > On Aug ??6 09:40, Christopher Faylor wrote: > >> >> On Fri, Aug 06, 2010 at 09:33:41A

Re: The dirent struct

2010-08-06 Thread Christopher Faylor
On Fri, Aug 06, 2010 at 06:39:25PM +0200, Corinna Vinschen wrote: >On Aug 6 10:51, Chris Sutcliffe wrote: >> On 6 August 2010 10:11, Corinna Vinschen wrote: >> > On Aug ??6 09:40, Christopher Faylor wrote: >> >> On Fri, Aug 06, 2010 at 09:33:41AM -0400, Chris Sutcliffe wrote: >> >> >I assume d_fil

Re: The dirent struct

2010-08-06 Thread Chris Sutcliffe
On 6 August 2010 12:39, Corinna Vinschen wrote: > On Aug  6 10:51, Chris Sutcliffe wrote: >> On 6 August 2010 10:11, Corinna Vinschen wrote: >> > And they don't have to.  Per POSIX, only d_ino and d_name can be >> > expected by a portable application(*). >> >> Fair enough, thankfully they are don't

Re: The dirent struct

2010-08-06 Thread Corinna Vinschen
On Aug 6 10:51, Chris Sutcliffe wrote: > On 6 August 2010 10:11, Corinna Vinschen wrote: > > On Aug  6 09:40, Christopher Faylor wrote: > >> On Fri, Aug 06, 2010 at 09:33:41AM -0400, Chris Sutcliffe wrote: > >> >I assume d_fileno and d_reclen may be part of __d_unused1 or > >> >__d_internal1?  I'd

Re: The dirent struct

2010-08-06 Thread Chris Sutcliffe
On 6 August 2010 10:11, Corinna Vinschen wrote: > On Aug  6 09:40, Christopher Faylor wrote: >> On Fri, Aug 06, 2010 at 09:33:41AM -0400, Chris Sutcliffe wrote: >> >I assume d_fileno and d_reclen may be part of __d_unused1 or >> >__d_internal1?  I'd appreciate some help here, since I'm not sure wha

Re: The dirent struct

2010-08-06 Thread Corinna Vinschen
On Aug 6 09:40, Christopher Faylor wrote: > On Fri, Aug 06, 2010 at 09:33:41AM -0400, Chris Sutcliffe wrote: > >I'm well in to the process of porting rtorrent to Cygwin but I've hit > >a bit of a snag with the dirent struct. Namely: > > > >/usr/src/rtorren

Re: The dirent struct

2010-08-06 Thread Christopher Faylor
On Fri, Aug 06, 2010 at 09:33:41AM -0400, Chris Sutcliffe wrote: >I'm well in to the process of porting rtorrent to Cygwin but I've hit >a bit of a snag with the dirent struct. Namely: > >/usr/src/rtorrent/rtorrent-0.8.6-1/src/rtorrent-0.8.6/src/utils/directory.cc:79: >e

The dirent struct

2010-08-06 Thread Chris Sutcliffe
I'm well in to the process of porting rtorrent to Cygwin but I've hit a bit of a snag with the dirent struct. Namely: /usr/src/rtorrent/rtorrent-0.8.6-1/src/rtorrent-0.8.6/src/utils/directory.cc:79: error: ‘struct dirent’ has no member named ‘d_fileno’ /usr/src/rtorrent/rtorrent-0