From e2294b61e15781ca784a611e8ca7dabe132ebc6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 7 Jun 2021 14:12:11 +0200 Subject: First commit (NetBSD 9.1) --- ksh_dir.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ksh_dir.h (limited to 'ksh_dir.h') diff --git a/ksh_dir.h b/ksh_dir.h new file mode 100644 index 0000000..b0b3db6 --- /dev/null +++ b/ksh_dir.h @@ -0,0 +1,27 @@ +/* $NetBSD: ksh_dir.h,v 1.2 1997/01/12 19:11:59 tls Exp $ */ + +/* Wrapper around the ugly dir includes/ifdefs */ +/* $NetBSD: ksh_dir.h,v 1.2 1997/01/12 19:11:59 tls Exp $ */ + +#if defined(HAVE_DIRENT_H) +# include +# define NLENGTH(dirent) (strlen(dirent->d_name)) +#else +# define dirent direct +# define NLENGTH(dirent) (dirent->d_namlen) +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* HAVE_SYS_NDIR_H */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* HAVE_SYSDIR_H */ +# ifdef HAVE_NDIR_H +# include +# endif /* HAVE_NDIR_H */ +#endif /* HAVE_DIRENT_H */ + +#ifdef OPENDIR_DOES_NONDIR +extern DIR *ksh_opendir ARGS((const char *d)); +#else /* OPENDIR_DOES_NONDIR */ +# define ksh_opendir(d) opendir(d) +#endif /* OPENDIR_DOES_NONDIR */ -- cgit v1.2.3