diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | unix/tclUnixThrd.c | 6 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2003-02-18 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tclIO.c (HaveVersion): correctly decl static + + * unix/tclUnixThrd.c (TclpReaddir): reduce size of name string in + tsd to NAME_MAX instead of PATH_MAX. [Bug #689100] (waters) + 2003-02-18 Mo DeJong <mdejong@users.sourceforge.net> * unix/configure: Regen. @@ -9,7 +16,7 @@ * generic/tclTest.c: cleanup of new 'simplefs' test code, and better documentation. - + 2003-02-17 Miguel Sofer <msofer@users.sf.net> * generic/tclBasic.c (TclRenameCommand): fixing error in previous diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 1dd2d99..28267f4 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -25,7 +25,9 @@ typedef struct ThreadSpecificData { struct tm ltbuf; struct { Tcl_DirEntry ent; - char name[PATH_MAX+1]; +#ifdef NAME_MAX /* if not, dirent *better* have room for name */ + char name[NAME_MAX+1]; +#endif } rdbuf; } ThreadSpecificData; @@ -819,7 +821,7 @@ TclpReaddir(DIR * dir) # endif /* HAVE_STRUCT_DIRENT64 */ if (ent != NULL) { memcpy((VOID *) &tsdPtr->rdbuf.ent, (VOID *) ent, - sizeof(Tcl_DirEntry) + sizeof(char) * (PATH_MAX+1)); + sizeof(&tsdPtr->rdbuf)); ent = &tsdPtr->rdbuf.ent; } Tcl_MutexUnlock(&rdMutex); |