summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-05-09 10:29:33 (GMT)
committersebres <sebres@users.sourceforge.net>2018-05-09 10:29:33 (GMT)
commitf5e87513071af9794d48e1b5c1b106343f4bca1f (patch)
tree5edaaf34fde5ff260c8884e3f238f064205619c4
parent78ee8c697e423a5b4718fabb53eef1c5f6a2a2b1 (diff)
downloadtcl-f5e87513071af9794d48e1b5c1b106343f4bca1f.zip
tcl-f5e87513071af9794d48e1b5c1b106343f4bca1f.tar.gz
tcl-f5e87513071af9794d48e1b5c1b106343f4bca1f.tar.bz2
amend to [85bcf84100]: replaces DIR with Tcl_Dir (DIR/DIR64 regarding HAVE_STRUCT_DIRENT64)
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclIntPlatDecls.h13
-rw-r--r--unix/tclUnixFCmd.c4
-rw-r--r--unix/tclUnixFile.c2
-rw-r--r--unix/tclUnixPort.h2
-rw-r--r--unix/tclUnixThrd.c2
6 files changed, 15 insertions, 12 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 920116c..69e695e 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -995,7 +995,7 @@ declare 9 win {
}
# new for 8.4.20+/8.5.12+ Cygwin only
declare 10 win {
- Tcl_DirEntry *TclpReaddir(DIR *dir)
+ Tcl_DirEntry *TclpReaddir(Tcl_Dir *dir)
}
# Removed in 8.3.1 (for Win32s only)
#declare 10 win {
@@ -1135,7 +1135,7 @@ declare 9 unix {
# Added in 8.4:
declare 10 unix {
- Tcl_DirEntry *TclpReaddir(DIR *dir)
+ Tcl_DirEntry *TclpReaddir(Tcl_Dir *dir)
}
# Slots 11 and 12 are forwarders for functions that were promoted to
# generic Stubs
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index fc20d09..d792a54 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
@@ -101,7 +102,7 @@ EXTERN TclFile TclpCreateTempFile(CONST char *contents);
#ifndef TclpReaddir_TCL_DECLARED
#define TclpReaddir_TCL_DECLARED
/* 10 */
-EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir);
+EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir);
#endif
#ifndef TclpLocaltime_unix_TCL_DECLARED
#define TclpLocaltime_unix_TCL_DECLARED
@@ -202,7 +203,7 @@ EXTERN int TclWinGetPlatformId(void);
#ifndef TclpReaddir_TCL_DECLARED
#define TclpReaddir_TCL_DECLARED
/* 10 */
-EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir);
+EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir);
#endif
#ifndef TclGetAndDetachPids_TCL_DECLARED
#define TclGetAndDetachPids_TCL_DECLARED
@@ -360,7 +361,7 @@ EXTERN TclFile TclpCreateTempFile(CONST char *contents);
#ifndef TclpReaddir_TCL_DECLARED
#define TclpReaddir_TCL_DECLARED
/* 10 */
-EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir);
+EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir);
#endif
#ifndef TclpLocaltime_unix_TCL_DECLARED
#define TclpLocaltime_unix_TCL_DECLARED
@@ -450,7 +451,7 @@ typedef struct TclIntPlatStubs {
TclFile (*tclpOpenFile) (CONST char *fname, int mode); /* 7 */
int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
TclFile (*tclpCreateTempFile) (CONST char *contents); /* 9 */
- Tcl_DirEntry * (*tclpReaddir) (DIR *dir); /* 10 */
+ Tcl_DirEntry * (*tclpReaddir) (Tcl_Dir *dir); /* 10 */
struct tm * (*tclpLocaltime_unix) (CONST time_t *clock); /* 11 */
struct tm * (*tclpGmtime_unix) (CONST time_t *clock); /* 12 */
char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */
@@ -482,7 +483,7 @@ typedef struct TclIntPlatStubs {
int (*tclWinSetSockOpt) (SOCKET s, int level, int optname, CONST char *optval, int optlen); /* 7 */
int (*tclpGetPid) (Tcl_Pid pid); /* 8 */
int (*tclWinGetPlatformId) (void); /* 9 */
- Tcl_DirEntry * (*tclpReaddir) (DIR *dir); /* 10 */
+ Tcl_DirEntry * (*tclpReaddir) (Tcl_Dir *dir); /* 10 */
void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */
int (*tclpCloseFile) (TclFile file); /* 12 */
Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 13 */
@@ -514,7 +515,7 @@ typedef struct TclIntPlatStubs {
TclFile (*tclpOpenFile) (CONST char *fname, int mode); /* 7 */
int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
TclFile (*tclpCreateTempFile) (CONST char *contents); /* 9 */
- Tcl_DirEntry * (*tclpReaddir) (DIR *dir); /* 10 */
+ Tcl_DirEntry * (*tclpReaddir) (Tcl_Dir *dir); /* 10 */
struct tm * (*tclpLocaltime_unix) (CONST time_t *clock); /* 11 */
struct tm * (*tclpGmtime_unix) (CONST time_t *clock); /* 12 */
char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 4377b77..f4a35af 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -327,7 +327,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. */
@@ -920,7 +920,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 1dc73ae..95642b1 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;
int dirLength;
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index cc31bf9..58509b0 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -58,12 +58,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
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 1841242..9401c77 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -742,7 +742,7 @@ TclpFinalizeCondition(
Tcl_DirEntry *
TclpReaddir(
- DIR * dir)
+ Tcl_Dir * dir)
{
return TclOSreaddir(dir);
}