Feature test macros overhaul: dirent.h

MAXNAMLEN is a BSDism.

Use the proper internal macros instead of !_POSIX_SOURCE.  telldir and
seekdir are XSI, scandir and alphasort are POSIX.1-2008, and scandirat
is GNU.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
Yaakov Selkowitz
2016-03-14 16:17:38 -05:00
parent 575608b202
commit d2937299fa
2 changed files with 12 additions and 4 deletions

View File

@ -3,9 +3,10 @@
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/cdefs.h>
#include <sys/dirent.h>
#if !defined(MAXNAMLEN) && !defined(_POSIX_SOURCE)
#if !defined(MAXNAMLEN) && __BSD_VISIBLE
#define MAXNAMLEN 1024
#endif