diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-06-28 09:56:53 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-06-28 09:56:53 (GMT) |
commit | 162d8a6442e7b0ff9c4e72433af6f403b6c61de8 (patch) | |
tree | b63c3be4e760bb55b6a54bd129b721c82b935145 /unix/tclUnixThrd.c | |
parent | 955c45431fce7b8b9490a2d5ae3132e4f21da0f6 (diff) | |
download | tcl-162d8a6442e7b0ff9c4e72433af6f403b6c61de8.zip tcl-162d8a6442e7b0ff9c4e72433af6f403b6c61de8.tar.gz tcl-162d8a6442e7b0ff9c4e72433af6f403b6c61de8.tar.bz2 |
Changed all the Tcl_Platform* symbols to TclOS*; they weren't public so their
names were really badly chosen. Also prevented a double-#def.
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r-- | unix/tclUnixThrd.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index daa49be..c0640cd 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -803,23 +803,26 @@ TclpReaddir(DIR * dir) #ifdef HAVE_READDIR_R ent = &tsdPtr->rdbuf.ent; - if (Tcl_PlatformReaddir_r(dir, ent, &ent) != 0) { + if (TclOSreaddir_r(dir, ent, &ent) != 0) { ent = NULL; } -#else - Tcl_MutexLock( &rdMutex ); -#ifdef HAVE_STRUCT_DIRENT64 + +#else /* !HAVE_READDIR_R */ + + Tcl_MutexLock(&rdMutex); +# ifdef HAVE_STRUCT_DIRENT64 ent = readdir64(dir); -#else +# else /* !HAVE_STRUCT_DIRENT64 */ ent = readdir(dir); -#endif - if(ent != NULL) { - memcpy( (VOID *) &tsdPtr->rdbuf.ent, (VOID *) ent, - sizeof (Tcl_DirEntry) + sizeof (char) * (PATH_MAX+1) ); - ent = &tsdPtr->rdbuf.ent; +# endif /* HAVE_STRUCT_DIRENT64 */ + if (ent != NULL) { + memcpy((VOID *) &tsdPtr->rdbuf.ent, (VOID *) ent, + sizeof(Tcl_DirEntry) + sizeof(char) * (PATH_MAX+1)); + ent = &tsdPtr->rdbuf.ent; } - Tcl_MutexUnlock( &rdMutex ); -#endif + Tcl_MutexUnlock(&rdMutex); + +#endif /* HAVE_READDIR_R */ return ent; } |