Sources for adding ftw.h
Joel Sherrill
joel at rtems.org
Mon Mar 23 22:47:39 UTC 2020
On Mon, Mar 23, 2020 at 9:17 AM Eshan Dhawan <eshandhawan51 at gmail.com>
wrote:
> hello everyone,
> As @Vaibhav Gupta <vaibhav.varodek at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200323/c45708e2/attachment.html>
More information about the devel
mailing list