1 #include <sys/types.h> 2 #if HAVE_DIRENT_H 3 # include <dirent.h> 4 # define NAMLEN(dirent) strlen((dirent)->d_name) 5 #else 6 # define dirent direct 7 # define NAMLEN(dirent) (dirent)->d_namlen 8 # if HAVE_SYS_NDIR_H 9 # include <sys/ndir.h> 10 # endif 11 # if HAVE_SYS_DIR_H 12 # include <sys/dir.h> 13 # endif 14 # if HAVE_NDIR_H 15 # include <ndir.h> 16 # endif 17 #endif 18