Nuke directory processing conditionals; use dirent.h.
authormarkus schnalke <meillo@marmaro.de>
Mon, 26 Mar 2012 20:59:03 +0000 (22:59 +0200)
committermarkus schnalke <meillo@marmaro.de>
Mon, 26 Mar 2012 20:59:03 +0000 (22:59 +0200)
Merged from nmh. Thanks to Lyndon Nerenberg.

configure.ac
h/nmh.h

index 9fd84c8..d23079a 100644 (file)
@@ -334,7 +334,6 @@ case "$target_os" in
 esac
 AC_SUBST(OURDEFS)
 
-AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_TIME
 AC_HEADER_STAT
diff --git a/h/nmh.h b/h/nmh.h
index 19549e4..aa15d4c 100644 (file)
--- a/h/nmh.h
+++ b/h/nmh.h
@@ -9,22 +9,8 @@
 #include <ctype.h>
 #include <sys/stat.h>
 
-#if HAVE_DIRENT_H
-# include <dirent.h>
-# define NLENGTH(dirent) strlen((dirent)->d_name)
-#else
-# define dirent direct
-# define NLENGTH(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif
+#include <dirent.h>
+#define NLENGTH(dirent) strlen((dirent)->d_name)
 
 #include <stdlib.h>
 #include <stdarg.h>