Nuke directory processing conditionals; use dirent.h.
authorLyndon Nerenberg <lyndon@orthanc.ca>
Sun, 25 Dec 2011 20:23:41 +0000 (12:23 -0800)
committerKen Hornstein <kenh@pobox.com>
Wed, 4 Jan 2012 03:11:35 +0000 (22:11 -0500)
configure.in
h/nmh.h

index a933613..060086c 100644 (file)
@@ -461,10 +461,8 @@ case "$target_os" in
 esac
 AC_SUBST(OURDEFS)
 
-AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_TIME
-AC_HEADER_SYS_WAIT
 AC_HEADER_STAT
 AC_HEADER_TIOCGWINSZ
 AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
diff --git a/h/nmh.h b/h/nmh.h
index c354482..8ff4ba8 100644 (file)
--- a/h/nmh.h
+++ b/h/nmh.h
 #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
+#define NLENGTH(dirent) strlen((dirent)->d_name)
 
 #include <stdlib.h>
 #include <stdarg.h>