LibC: Add readdir_r for re-entrant directory reading (#648)

This is popular and in POSIX. Some duplicated code between readdir
is also unified into some static functions.
This commit is contained in:
Calvin Buckley 2019-10-12 17:35:23 -03:00 committed by Andreas Kling
commit 6d150df58a
Notes: sideshowbarker 2024-07-19 11:43:27 +09:00
2 changed files with 100 additions and 18 deletions

View file

@ -25,6 +25,7 @@ typedef struct __DIR DIR;
DIR* opendir(const char* name);
int closedir(DIR*);
struct dirent* readdir(DIR*);
int readdir_r(DIR*, struct dirent*, struct dirent**);
int dirfd(DIR*);
__END_DECLS