[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] scandir() bug



On 04/28/13 22:39, Vincent Rivière wrote:
Hello.

It seems that the MiNTLib's scandir() function is buggy.

See the example at the bottom of the man page:
http://man7.org/linux/man-pages/man3/scandir.3.html
I also provide it as attachment, slightly cleaned up.

On Cygwin, it works fine.
On MiNT, it displays rubbish.

This scandir() bug is the cause of trouble in arc:
http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/mint/arc/

arc a archive.arc Makefile
Creating new archive: archive.arc
Cannot read file:
No files were added.

NB: The scandir() source is there:
http://sparemint.atariforge.net/cgi-bin/cvsweb/mintlib/dirent/scandir.c?rev=1.2&content-type=text/x-cvsweb-markup
I don't fully understand it.
I suspect some mess with malloc().


I don't fully understand the original code. But I've committed a fix for now that gets it working.

Alan.