Index: unix/tclUnixPort.h
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixPort.h,v
retrieving revision 1.26
diff -b -u -r1.26 tclUnixPort.h
--- unix/tclUnixPort.h	28 Jun 2002 09:56:54 -0000	1.26
+++ unix/tclUnixPort.h	20 Feb 2003 00:31:56 -0000
@@ -386,7 +386,7 @@
 #endif /* !S_ISSOCK */
 
 /*
- * Make sure that MAXPATHLEN is defined.
+ * Make sure that MAXPATHLEN and MAXNAMLEN are defined.
  */
 
 #ifndef MAXPATHLEN
@@ -394,6 +394,14 @@
 #       define MAXPATHLEN PATH_MAX
 #   else
 #       define MAXPATHLEN 2048
+#   endif
+#endif
+
+#ifndef MAXNAMLEN
+#   ifdef NAME_MAX
+#	define MAXNAMLEN NAME_MAX
+#   else
+#	define MAXNAMLEN 255
 #   endif
 #endif
 
Index: unix/tclUnixThrd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixThrd.c,v
retrieving revision 1.22
diff -b -u -r1.22 tclUnixThrd.c
--- unix/tclUnixThrd.c	19 Feb 2003 01:05:33 -0000	1.22
+++ unix/tclUnixThrd.c	20 Feb 2003 00:31:56 -0000
@@ -25,9 +25,7 @@
     struct tm   	ltbuf;
     struct {
 	Tcl_DirEntry ent;
-#ifdef NAME_MAX	 /* if not, dirent *better* have room for name */
-	char name[NAME_MAX+1];
-#endif
+	char name[MAXNAMLEN+1];
     } rdbuf;
 } ThreadSpecificData;
 
