Opened 11 years ago

Closed 11 years ago

#9337 closed bug (fixed)

Implement ftw.h

Reported by: vibhavp Owned by: nobody
Priority: normal Milestone: R1
Component: - General Version: R1/alpha4.1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

It would be nice to have ftw.h support in haiku: http://pubs.opengroup.org/onlinepubs/7908799/xsh/ftw.h.html

Attachments (2)

ftw_fts.patch (55.9 KB ) - added by landonf 11 years ago.
ftw(3), nftw(3), and fts(3) implementation
ftw_fts-2.patch (56.9 KB ) - added by landonf 11 years ago.

Download all attachments as: .zip

Change History (9)

by landonf, 11 years ago

Attachment: ftw_fts.patch added

ftw(3), nftw(3), and fts(3) implementation

comment:1 by landonf, 11 years ago

patch: 01

comment:2 by landonf, 11 years ago

I was working on some portable code that required fts(3) directory traversal on Haiku, so I went ahead and integrated this. The patch is a direct port of FreeBSD's fts(3) (defacto standard), on top of which the POSIX ftw(3) and nftw(3) functions are implemented.

comment:3 by korli, 11 years ago

Why removing the flag FTS_WHITEOUT?

BTW I'm unsure we drop BSD headers (even POSIX) in headers/posix/

comment:4 by landonf, 11 years ago

Thanks for reviewing!

Why removing the flag FTS_WHITEOUT?

AFAIK it's FreeBSD-specific (eg, unionfs) and not supported anywhere else. Do you want me to leave the flag defined and just disable the FreeBSD-specific whiteout code? I believe that would match glibc's approach.

BTW I'm unsure we drop BSD headers (even POSIX) in headers/posix/

I wasn't sure about the correct directory, but it seemed in good company. Happy to move it there's a preferred location.

in reply to:  4 comment:5 by korli, 11 years ago

Replying to landonf:

AFAIK it's FreeBSD-specific (eg, unionfs) and not supported anywhere else. Do you want me to leave the flag defined and just disable the FreeBSD-specific whiteout code? I believe that would match glibc's approach.

No, just not defining FTS_WHITEOUT with a __HAIKU__ check would be fine.

I wasn't sure about the correct directory, but it seemed in good company. Happy to move it there's a preferred location.

Sure. It could be rewritten later anyway.

by landonf, 11 years ago

Attachment: ftw_fts-2.patch added

comment:6 by landonf, 11 years ago

Great, updated patch attached with FTS_WHITEOUT changes.

comment:7 by korli, 11 years ago

Resolution: fixed
Status: newclosed

Thanks, applied in hrev45148!

Note: See TracTickets for help on using tickets.