1 /* $NetBSD: ksh_dir.h,v 1.2 1997/01/12 19:11:59 tls Exp $ */ 2 3 /* Wrapper around the ugly dir includes/ifdefs */ 4 /* $NetBSD: ksh_dir.h,v 1.2 1997/01/12 19:11:59 tls Exp $ */ 5 6 #if defined(HAVE_DIRENT_H) 7 # include <dirent.h> 8 # define NLENGTH(dirent) (strlen(dirent->d_name)) 9 #else 10 # define dirent direct 11 # define NLENGTH(dirent) (dirent->d_namlen) 12 # ifdef HAVE_SYS_NDIR_H 13 # include <sys/ndir.h> 14 # endif /* HAVE_SYS_NDIR_H */ 15 # ifdef HAVE_SYS_DIR_H 16 # include <sys/dir.h> 17 # endif /* HAVE_SYSDIR_H */ 18 # ifdef HAVE_NDIR_H 19 # include <ndir.h> 20 # endif /* HAVE_NDIR_H */ 21 #endif /* HAVE_DIRENT_H */ 22 23 #ifdef OPENDIR_DOES_NONDIR 24 extern DIR *ksh_opendir ARGS((const char *d)); 25 #else /* OPENDIR_DOES_NONDIR */ 26 # define ksh_opendir(d) opendir(d) 27 #endif /* OPENDIR_DOES_NONDIR */ 28