POSIX.1-2001 defines 'struct dirent' in <dirent.h>. It replaces
the old 'struct direct' found in BSDs. All of the systems that I
checked (including FreeBSD, NetBSD, and OpenBSD), now provide
<dirent.h> with 'struct dirent', as mandated by POSIX.
Since autoconf first checks <dirent.h> and only if it's missing it
checks other header files, it's clear that it will always find
<dirent.h>, so let's simplify.
GNU autoconf documentation declares this macro as obsolescent, and
acknowledges that all current systems with directory libraries
have <dirent.h>:
<https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Particular-Headers.html>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
AC_HEADER_STDBOOL
#define strzero(s) memzero(s, strlen(s)) /* warning: evaluates twice */
-#ifdef HAVE_DIRENT_H /* DIR_SYSV */
-# include <dirent.h>
-# define DIRECT dirent
-#else
-# ifdef HAVE_SYS_NDIR_H /* DIR_XENIX */
-# include <sys/ndir.h>
-# endif
-# ifdef HAVE_SYS_DIR_H /* DIR_??? */
-# include <sys/dir.h>
-# endif
-# ifdef HAVE_NDIR_H /* DIR_BSD */
-# include <ndir.h>
-# endif
-# define DIRECT direct
-#endif
+#include <dirent.h>
+#define DIRECT dirent
/*
* Possible cases: