Home | History | Annotate | Line # | Download | only in ksh
ksh_dir.h revision 1.2.112.2
      1  1.2.112.1  martin /*	$NetBSD: ksh_dir.h,v 1.2.112.2 2020/04/21 19:37:32 martin Exp $	*/
      2        1.2     tls 
      3        1.1     jtc /* Wrapper around the ugly dir includes/ifdefs */
      4  1.2.112.1  martin /* $NetBSD: ksh_dir.h,v 1.2.112.2 2020/04/21 19:37:32 martin Exp $ */
      5        1.1     jtc 
      6        1.1     jtc #if defined(HAVE_DIRENT_H)
      7        1.1     jtc # include <dirent.h>
      8        1.1     jtc # define NLENGTH(dirent)	(strlen(dirent->d_name))
      9        1.1     jtc #else
     10        1.1     jtc # define dirent direct
     11        1.1     jtc # define NLENGTH(dirent)	(dirent->d_namlen)
     12        1.1     jtc # ifdef HAVE_SYS_NDIR_H
     13        1.1     jtc #  include <sys/ndir.h>
     14        1.1     jtc # endif /* HAVE_SYS_NDIR_H */
     15        1.1     jtc # ifdef HAVE_SYS_DIR_H
     16        1.1     jtc #  include <sys/dir.h>
     17        1.1     jtc # endif /* HAVE_SYSDIR_H */
     18        1.1     jtc # ifdef HAVE_NDIR_H
     19        1.1     jtc #  include <ndir.h>
     20        1.1     jtc # endif /* HAVE_NDIR_H */
     21        1.1     jtc #endif /* HAVE_DIRENT_H */
     22        1.1     jtc 
     23        1.1     jtc #ifdef OPENDIR_DOES_NONDIR
     24        1.1     jtc extern DIR *ksh_opendir ARGS((const char *d));
     25        1.1     jtc #else /* OPENDIR_DOES_NONDIR */
     26        1.1     jtc # define ksh_opendir(d)	opendir(d)
     27        1.1     jtc #endif /* OPENDIR_DOES_NONDIR */
     28