pkgsrc/editors/xemacs/patches/patch-ae
2007-02-15 14:27:48 +00:00

24 lines
718 B
Text

$NetBSD: patch-ae,v 1.3 2007/02/15 14:27:48 joerg Exp $
--- src/dired.c.orig 2007-02-13 18:38:12.000000000 +0000
+++ src/dired.c
@@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */
/* Synched up with: FSF 19.30. */
#include <config.h>
+#include <limits.h>
#include "lisp.h"
#include "sysfile.h"
@@ -97,7 +98,11 @@ If FILES-ONLY is the symbol t, then only
directory = Ffile_name_as_directory (directory);
directorylen = XSTRING_LENGTH (directory);
+#ifdef NAME_MAX
+ statbuf = (char *)alloca (directorylen + NAME_MAX + 1);
+#else
statbuf = (char *)alloca (directorylen + MAXNAMLEN + 1);
+#endif
memcpy (statbuf, XSTRING_DATA (directory), directorylen);
statbuf_tail = statbuf + directorylen;