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