On Mon, Mar 23, 2020 at 9:17 AM Eshan Dhawan <eshandhawa...@gmail.com>
wrote:

> hello everyone,
> As @Vaibhav Gupta <vaibhav.varo...@gmail.com>   told the FreeBSD and
> NetBSD implemenattio of ftw.h requirs fts.h which inturn requires
> sys/mount.h which requirs many other headres that are not yet implemented
> so creating a dependencies chain
> requiring to add 10-15 more headers just to add ftw.h
> So I started searching alternative sources to add ftw.h . So i found musl
> also has a implementation for ftw.h as well and it dosent require fts.h to
> be implemented
>
> I would request you all to look into it and see it the implementation is
> useful for RTEMS
> since they have used a different approach to the functions
>
> ftw.h : https://git.musl-libc.org/cgit/musl/tree/include/ftw.h
> ftw.c: https://git.musl-libc.org/cgit/musl/tree/src/legacy/ftw.c
> nftw.c: https://git.musl-libc.org/cgit/musl/tree/src/misc/nftw.c
>

This looks like a better implementation option.

At first glance, it has way fewer dependencies but does require pthread.h
around line 122. newlib may need an feature flag (sys/features.h)
added to know if the target supports pthreads.

This looks WAY WAY more appropriate for newlib. Good find!

--joel
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to