use NAMLEN (and define it if it doesn't exist)
CVS patchset: 1057
CVS date: 1996/09/25 19:17:15
#include <sys/types.h>
#include <sys/stat.h>
#include <ftw.h>
+
+#ifndef NAMLEN
+#define NAMLEN(a) strlen((a)->d_name)
+#endif
+
#include "myftw.h"
/* Traverse one level of a directory tree. */
continue;
}
- d_namlen = strlen (entry->d_name) + 1;
+ d_namlen = NAMLEN(entry) + 1;
if (d_namlen + len > PATH_MAX)
{
#ifdef ENAMETOOLONG
if (descriptors <= 0)
descriptors = 1;
- dirs = (DIR **) __alloca (descriptors * sizeof (DIR *));
+ dirs = (DIR **) alloca (descriptors * sizeof (DIR *));
i = descriptors;
while (i-- > 0)
dirs[i] = NULL;