diff options
author | dgp <dgp@users.sourceforge.net> | 2018-05-09 16:01:14 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2018-05-09 16:01:14 (GMT) |
commit | b25aceb078e19499e040c7c8d80ece4b995a46b8 (patch) | |
tree | 41fe95ff0bc571049e3204a89e9c01ccc1234b04 | |
parent | 56af8c1770e00895a8862d52563e3942dfb3b2df (diff) | |
parent | 35d6c2453ebc0785adfb56cf3d125090f967aa57 (diff) | |
download | tcl-b25aceb078e19499e040c7c8d80ece4b995a46b8.zip tcl-b25aceb078e19499e040c7c8d80ece4b995a46b8.tar.gz tcl-b25aceb078e19499e040c7c8d80ece4b995a46b8.tar.bz2 |
merge 8.7
-rw-r--r-- | generic/tclIntPlatDecls.h | 1 | ||||
-rw-r--r-- | unix/tclEpollNotfy.c | 4 | ||||
-rw-r--r-- | unix/tclUnixFCmd.c | 4 | ||||
-rw-r--r-- | unix/tclUnixFile.c | 2 | ||||
-rw-r--r-- | unix/tclUnixPort.h | 2 |
5 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 99d6753..e4caf72 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -16,6 +16,7 @@ #ifdef _WIN32 # define Tcl_DirEntry void # define DIR void +# define Tcl_Dir void #endif #undef TCL_STORAGE_CLASS diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 9d0053c..076e02b 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -88,6 +88,7 @@ typedef struct { LIST_HEAD(PlatformReadyFileHandlerList, FileHandler); typedef struct ThreadSpecificData { + FileHandler *triggerFilePtr; FileHandler *firstFileHandlerPtr; /* Pointer to head of file handler list. */ struct PlatformReadyFileHandlerList firstReadyFileHandlerPtr; @@ -306,6 +307,8 @@ PlatformEventsFinalize( tsdPtr->triggerPipe[1] = -1; } #endif /* HAVE_EVENTFD */ + ckfree(tsdPtr->triggerFilePtr->pedPtr); + ckfree(tsdPtr->triggerFilePtr); if (tsdPtr->eventsFd > 0) { close(tsdPtr->eventsFd); tsdPtr->eventsFd = 0; @@ -368,6 +371,7 @@ PlatformEventsInit( } filePtr->fd = tsdPtr->triggerPipe[0]; #endif + tsdPtr->triggerFilePtr = filePtr; if ((tsdPtr->eventsFd = epoll_create1(EPOLL_CLOEXEC)) == -1) { Tcl_Panic("epoll_create1: %s", strerror(errno)); } diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 7250e87..d4bb376 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -369,7 +369,7 @@ DoRenameFile( if (errno == EINVAL && haveRealpath) { char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN]; - DIR *dirPtr; + Tcl_Dir *dirPtr; Tcl_DirEntry *dirEntPtr; if ((Realpath((char *) src, srcPath) != NULL) /* INTL: Native. */ @@ -965,7 +965,7 @@ TraverseUnixTree( #ifndef HAVE_FTS int numProcessed = 0; Tcl_DirEntry *dirEntPtr; - DIR *dirPtr; + Tcl_Dir *dirPtr; #else const char *paths[2] = {NULL, NULL}; FTS *fts = NULL; diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 5215bdf..9772867 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -259,7 +259,7 @@ TclpMatchInDirectory( Tcl_DecrRefCount(tailPtr); Tcl_DecrRefCount(fileNamePtr); } else { - DIR *d; + Tcl_Dir *d; Tcl_DirEntry *entryPtr; const char *dirName; size_t dirLength, nativeDirLen; diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 8e71b3a..6cc6836 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -57,12 +57,14 @@ */ #ifdef HAVE_STRUCT_DIRENT64 +typedef DIR64 Tcl_Dir; typedef struct dirent64 Tcl_DirEntry; # define TclOSreaddir readdir64 # define TclOSopendir opendir64 # define TclOSrewinddir rewinddir64 # define TclOSclosedir closedir64 #else +typedef DIR Tcl_Dir; typedef struct dirent Tcl_DirEntry; # define TclOSreaddir readdir # define TclOSopendir opendir |