summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorewt <devnull@localhost>1996-09-25 19:17:15 +0000
committerewt <devnull@localhost>1996-09-25 19:17:15 +0000
commitca40e9d0a8be7552278774bc03000329d1724c66 (patch)
tree11cdf5e679762ed7c8260a6cca82886a4493e50f /build
parentd9aea8c24422bc7eb9001c7f3eda8162d25cc2ec (diff)
downloadrpm-ca40e9d0a8be7552278774bc03000329d1724c66.tar.gz
rpm-ca40e9d0a8be7552278774bc03000329d1724c66.tar.bz2
rpm-ca40e9d0a8be7552278774bc03000329d1724c66.zip
use alloca(), not __allocaa()
use NAMLEN (and define it if it doesn't exist) CVS patchset: 1057 CVS date: 1996/09/25 19:17:15
Diffstat (limited to 'build')
-rw-r--r--build/myftw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/build/myftw.c b/build/myftw.c
index fc8a3aab2..4189fb80f 100644
--- a/build/myftw.c
+++ b/build/myftw.c
@@ -27,6 +27,11 @@ Cambridge, MA 02139, USA. */
#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. */
@@ -61,7 +66,7 @@ myftw_dir (DIR **dirs, int level, int descriptors,
continue;
}
- d_namlen = strlen (entry->d_name) + 1;
+ d_namlen = NAMLEN(entry) + 1;
if (d_namlen + len > PATH_MAX)
{
#ifdef ENAMETOOLONG
@@ -168,7 +173,7 @@ int myftw (const char *dir,
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;