# ifdef HAVE_DIRENT_H # include # define DIR_BUF struct dirent # define D_NAMLEN(p) (p)->d_reclen # else # ifdef HAVE_SYS_DIR_H # include # endif # ifdef HAVE_SYS_NDIR_H # include # endif # define DIR_BUF struct direct # define D_NAMLEN(p) (p)->d_namlen # endif