mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Add _D_EXACT_NAMLEN and _D_ALLOC_NAMLEN macros to dirent.h.
This commit is contained in:
parent
cab9f561ea
commit
7bec450367
1 changed files with 3 additions and 0 deletions
|
@ -45,6 +45,9 @@ struct dirent
|
||||||
#define _DIRENT_HAVE_D_OFF
|
#define _DIRENT_HAVE_D_OFF
|
||||||
#undef _DIRENT_HAVE_D_TYPE
|
#undef _DIRENT_HAVE_D_TYPE
|
||||||
|
|
||||||
|
#define _D_EXACT_NAMLEN(d) ((d)->d_reclen - __builtin_offsetof(struct dirent, d_name) - 1)
|
||||||
|
#define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN(d) + 1)
|
||||||
|
|
||||||
int alphasort(const struct dirent**, const struct dirent**);
|
int alphasort(const struct dirent**, const struct dirent**);
|
||||||
int closedir(DIR* dir);
|
int closedir(DIR* dir);
|
||||||
int dirfd(DIR* dir);
|
int dirfd(DIR* dir);
|
||||||
|
|
Loading…
Add table
Reference in a new issue