[1.18.0] rewinddir operation
Tue Mar 16 15:08:00 GMT 2010
Indeed, I noticed your patch a few days ago.
Thank you for you kind answer.
Le 15 mars 2010 à 21:29, Jeff Johnston a écrit :
> Hi Xavier,
> I have just recently patched this in newlib. As you have noted, the code was in error. A special case is now added for 0 to mean rewind.
> -- Jeff J.
> On 03/08/2010 12:32 PM, Xavier Guérin wrote:
>> Dear list,
>> I just encountered a small issue with rewinddir. Although opendir and readdir works properly
>> on my operating system, I can't make rewinddir working.
>> After reading the code of _seekdir, I don't seem to understand how it could work anyway.
>> It looks like _seekdir relies on dd_hash to locate the the entry the user is looking for.
>> However, dd_hash is only used by telldir and seekdir. I know that seekdir should only be used
>> with values returned by telldir, but rewinddir bypasses this restriction and uses 0 as off_t parameter.
>> Consequently, the first few lines of _seekdir fail, since dd_hash[LOCHASH(0)] does not contain a vaild
>> ddloc entry.
>> Could you please tell me what I am missing ?
>> Thanks in advance,
>> Xavier Guérin - Doctoral student
>> TIMA Laboratory, SLS Group
>> 46, av. Félix Viallet, 38000 GRENOBLE, FR
>> Mail : firstname.lastname@example.org
>> Phone : +33(0)4 76 57 47 59
>> Ad Astra Per Aspera
>> Triste e' quel discepolo che non avanza il suo maestro
Xavier Guérin - Doctoral student
TIMA Laboratory, SLS Group
46, av. Félix Viallet, 38000 GRENOBLE, FR
Mail : email@example.com
Phone : +33(0)4 76 57 47 59
Ad Astra Per Aspera
Triste e' quel discepolo che non avanza il suo maestro
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3683 bytes
Desc: not available
More information about the Newlib