changeset 329:df51498dab54

.
author Jim Meyering <jim@meyering.net>
date Mon, 17 Oct 1994 14:01:44 +0000
parents 786829454471
children 394bcec9fa51
files lib/Makefile.in lib/savedir.c
diffstat 2 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/lib/Makefile.in	Mon Oct 17 13:24:35 1994 +0000
+++ b/lib/Makefile.in	Mon Oct 17 14:01:44 1994 +0000
@@ -80,11 +80,11 @@
 mostlyclean: clean
 
 distclean: clean
-	rm -f Makefile *.tab.c getdate.c *posixtm.c \
+	rm -f Makefile *.tab.c tposixtm.c \
 	  safe-stat.c safe-stat.h safe-lstat.c safe-lstat.h
 
 realclean: distclean
-	rm -f TAGS
+	rm -f TAGS getdate.c posixtm.c
 
 distdir = ../`cat ../distname`/$(subdir)
 dist: $(DISTFILES)
--- a/lib/savedir.c	Mon Oct 17 13:24:35 1994 +0000
+++ b/lib/savedir.c	Mon Oct 17 14:01:44 1994 +0000
@@ -27,22 +27,22 @@
 #include <unistd.h>
 #endif
 
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#define NLENGTH(direct) (strlen((direct)->d_name))
-#else /* not HAVE_DIRENT_H */
-#define dirent direct
-#define NLENGTH(direct) ((direct)->d_namlen)
-#ifdef HAVE_SYS_NDIR_H
-#include <sys/ndir.h>
-#endif /* HAVE_SYS_NDIR_H */
-#ifdef HAVE_SYS_DIR_H
-#include <sys/dir.h>
-#endif /* HAVE_SYS_DIR_H */
-#ifdef HAVE_NDIR_H
-#include <ndir.h>
-#endif /* HAVE_NDIR_H */
-#endif /* HAVE_DIRENT_H */
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(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
 
 #ifdef CLOSEDIR_VOID
 /* Fake a return value. */
@@ -100,7 +100,7 @@
 	  || (dp->d_name[1] != '\0'
 	      && (dp->d_name[1] != '.' || dp->d_name[2] != '\0')))
 	{
-	  unsigned size_needed = (namep - name_space) + NLENGTH (dp) + 2;
+	  unsigned size_needed = (namep - name_space) + NAMLEN (dp) + 2;
 
 	  if (size_needed > name_size)
 	    {