1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2013-06-24 19:43:23 +02:00
parent cab9f561ea
commit 7bec450367

View file

@ -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);