Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftw() please #327

Open
GReagle opened this issue Mar 21, 2020 · 6 comments
Open

ftw() please #327

GReagle opened this issue Mar 21, 2020 · 6 comments

Comments

@GReagle
Copy link

GReagle commented Mar 21, 2020

Hello. Would you consider adding ftw() or ntfw()? They are documented at https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftw.html
and https://pubs.opengroup.org/onlinepubs/9699919799/functions/nftw.html

@gvvaughan
Copy link
Contributor

Sure! Do you have a patch?

@GReagle
Copy link
Author

GReagle commented Mar 23, 2020

I do not. Which module would it belong in?

@gvvaughan
Copy link
Contributor

I would say it needs its own ftw module, to follow the established pattern of lua modules named after posix headers.

@gvvaughan
Copy link
Contributor

Actually, now that I read the SUSV3 I see that they have marked these APIs as obsolete. Maybe a better approach is to implement the fts.h API calls in Lua over the existing luaposix wrapped calls?

Or at the very least to have a Lua implementation for ftw/nftw to fall back on when the host C library decided not to implement the obsolete calls.

@GReagle
Copy link
Author

GReagle commented Mar 23, 2020

I think that nftw() is not obsolete.

@gvvaughan
Copy link
Contributor

You’re right, thanks for checking. Let’s just add a thin wrapper for ntfw in a new ftw module then, and avoid all the Lua backfill code that would have been required for either of my suggestions above :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants