X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/5a830bf80878bd1521a71017ce19882caa755d80..50e82fdc62d1e7c0747bdc8c17d7ef7b863e1460:/du.c diff --git a/du.c b/du.c index 1a375bf..3c8d5ee 100644 --- a/du.c +++ b/du.c @@ -2,34 +2,31 @@ * du.c: implementation of du.h. */ -#include "agedu.h" /* for config.h */ - -#ifdef HAVE_FEATURES_H -#define _GNU_SOURCE -#include -#endif - -#include -#include -#include -#include - -#include -#include -#include - +#include "agedu.h" #include "du.h" #include "alloc.h" #if !defined __linux__ || defined HAVE_FDOPENDIR +#ifdef HAVE_DIRENT_H +# include +#endif +#ifdef HAVE_NDIR_H +# include +#endif +#ifdef HAVE_SYS_DIR_H +# include +#endif +#ifdef HAVE_SYS_NDIR_H +# include +#endif + /* * Wrappers around POSIX opendir, readdir and closedir, which * permit me to replace them with different wrappers in special * circumstances. */ -#include typedef DIR *dirhandle; int open_dir(const char *path, dirhandle *dh) @@ -106,8 +103,6 @@ void close_dir(dirhandle *dh) */ #define __KERNEL__ -#include -#include #include #include #include