From deeebfdecab56729fa898271ae53d01c8e156302 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Fri, 20 Jun 2025 13:10:23 +0200 Subject: libc: Add fscandir(), fscandir_b(), scandirat_b(). While here, clean up scandir() a bit and improve the documentation. MFC after: never Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50935 --- include/dirent.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/dirent.h b/include/dirent.h index 460be40c1064..00319c0a8bd0 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -130,9 +130,22 @@ int scandir_b(const char *, struct dirent ***, #endif #endif #if __BSD_VISIBLE +int fscandir(int, struct dirent ***, + int (*)(const struct dirent *), int (*)(const struct dirent **, + const struct dirent **)); +#ifdef __BLOCKS__ +int fscandir_b(int, struct dirent ***, + int (^)(const struct dirent *), + int (^)(const struct dirent **, const struct dirent **)); +#endif int scandirat(int, const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)); +#ifdef __BLOCKS__ +int scandirat_b(int, const char *, struct dirent ***, + int (^)(const struct dirent *), + int (^)(const struct dirent **, const struct dirent **)); +#endif #endif #if __XSI_VISIBLE void seekdir(DIR *, long); -- cgit v1.3