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
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ struct dirent
#define _DIRENT_HAVE_D_OFF
#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 closedir(DIR* dir);
int dirfd(DIR* dir);