From: Alejandro Colomar Date: Thu, 30 Dec 2021 13:09:29 +0000 (+0100) Subject: Remove AC_HEADER_DIRENT X-Git-Tag: 4.12~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79e28694efe68a7cac4e8e12293f8c81d53e5895;p=thirdparty%2Fshadow.git Remove AC_HEADER_DIRENT POSIX.1-2001 defines 'struct dirent' in . It replaces the old 'struct direct' found in BSDs. All of the systems that I checked (including FreeBSD, NetBSD, and OpenBSD), now provide with 'struct dirent', as mandated by POSIX. Since autoconf first checks and only if it's missing it checks other header files, it's clear that it will always find , so let's simplify. GNU autoconf documentation declares this macro as obsolescent, and acknowledges that all current systems with directory libraries have : Signed-off-by: Alejandro Colomar --- diff --git a/configure.ac b/configure.ac index 1aa914529..271d13531 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,6 @@ AM_PROG_LIBTOOL dnl Checks for libraries. dnl Checks for header files. -AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_HEADER_STDBOOL diff --git a/lib/defines.h b/lib/defines.h index 9790fdaba..c35f572d6 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -117,21 +117,8 @@ static inline void memzero(void *ptr, size_t size) #define strzero(s) memzero(s, strlen(s)) /* warning: evaluates twice */ -#ifdef HAVE_DIRENT_H /* DIR_SYSV */ -# include -# define DIRECT dirent -#else -# ifdef HAVE_SYS_NDIR_H /* DIR_XENIX */ -# include -# endif -# ifdef HAVE_SYS_DIR_H /* DIR_??? */ -# include -# endif -# ifdef HAVE_NDIR_H /* DIR_BSD */ -# include -# endif -# define DIRECT direct -#endif +#include +#define DIRECT dirent /* * Possible cases: