summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 b38dabd..ab86ab8 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -1075,7 +1075,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 {
@@ -1212,7 +1212,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 0e160ca..a798bbc 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
@@ -72,7 +73,7 @@ EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
/* 9 */
EXTERN TclFile TclpCreateTempFile(const char *contents);
/* 10 */
-EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir);
+EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir);
/* 11 */
EXTERN struct tm * TclpLocaltime_unix(const time_t *clock);
/* 12 */
@@ -129,7 +130,7 @@ EXTERN int TclpGetPid(Tcl_Pid pid);
/* 9 */
EXTERN int TclWinGetPlatformId(void);
/* 10 */
-EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir);
+EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir);
/* 11 */
EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
Tcl_Channel chan);
@@ -206,7 +207,7 @@ EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
/* 9 */
EXTERN TclFile TclpCreateTempFile(const char *contents);
/* 10 */
-EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir);
+EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir);
/* 11 */
EXTERN struct tm * TclpLocaltime_unix(const time_t *clock);
/* 12 */
@@ -269,7 +270,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 */
@@ -302,7 +303,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 */
@@ -335,7 +336,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 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
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 6fa837c..adef543 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -649,7 +649,7 @@ TclpFinalizeCondition(
#ifndef TCL_NO_DEPRECATED
Tcl_DirEntry *
TclpReaddir(
- DIR * dir)
+ Tcl_Dir * dir)
{
return TclOSreaddir(dir);
}