From 7bf3f83abd5bc0e24dbd3f02765b7e86d7ba1fa7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 11 May 2018 07:53:20 +0000 Subject: Rename Tcl_Dir to TclDIR, making it clear that this macro is not part of the public API --- generic/tclInt.decls | 4 ++-- generic/tclIntPlatDecls.h | 15 +++++++-------- unix/tclUnixFCmd.c | 2 +- unix/tclUnixFile.c | 2 +- unix/tclUnixPort.h | 4 ++-- unix/tclUnixThrd.c | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 69e695e..8acd433 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(Tcl_Dir *dir) + Tcl_DirEntry *TclpReaddir(TclDIR *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(Tcl_Dir *dir) + Tcl_DirEntry *TclpReaddir(TclDIR *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 d792a54..5a3025a 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -15,8 +15,7 @@ #ifdef __WIN32__ # define Tcl_DirEntry void -# define DIR void -# define Tcl_Dir void +# define TclDIR void #endif #undef TCL_STORAGE_CLASS @@ -102,7 +101,7 @@ EXTERN TclFile TclpCreateTempFile(CONST char *contents); #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir); +EXTERN Tcl_DirEntry * TclpReaddir(TclDIR *dir); #endif #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED @@ -203,7 +202,7 @@ EXTERN int TclWinGetPlatformId(void); #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir); +EXTERN Tcl_DirEntry * TclpReaddir(TclDIR *dir); #endif #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED @@ -361,7 +360,7 @@ EXTERN TclFile TclpCreateTempFile(CONST char *contents); #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir); +EXTERN Tcl_DirEntry * TclpReaddir(TclDIR *dir); #endif #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED @@ -451,7 +450,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) (Tcl_Dir *dir); /* 10 */ + Tcl_DirEntry * (*tclpReaddir) (TclDIR *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 */ @@ -483,7 +482,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) (Tcl_Dir *dir); /* 10 */ + Tcl_DirEntry * (*tclpReaddir) (TclDIR *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 */ @@ -515,7 +514,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) (Tcl_Dir *dir); /* 10 */ + Tcl_DirEntry * (*tclpReaddir) (TclDIR *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 f4a35af..0b79fb6 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -327,7 +327,7 @@ DoRenameFile( if (errno == EINVAL && haveRealpath) { char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN]; - Tcl_Dir *dirPtr; + TclDIR *dirPtr; Tcl_DirEntry *dirEntPtr; if ((Realpath((char *) src, srcPath) != NULL) /* INTL: Native. */ diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 95642b1..65e144d 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -259,7 +259,7 @@ TclpMatchInDirectory( Tcl_DecrRefCount(tailPtr); Tcl_DecrRefCount(fileNamePtr); } else { - Tcl_Dir *d; + TclDIR *d; Tcl_DirEntry *entryPtr; CONST char *dirName; int dirLength; diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 58509b0..a248213 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -58,14 +58,14 @@ */ #ifdef HAVE_STRUCT_DIRENT64 -typedef DIR64 Tcl_Dir; +typedef DIR64 TclDIR; typedef struct dirent64 Tcl_DirEntry; # define TclOSreaddir readdir64 # define TclOSopendir opendir64 # define TclOSrewinddir rewinddir64 # define TclOSclosedir closedir64 #else -typedef DIR Tcl_Dir; +typedef DIR TclDIR; typedef struct dirent Tcl_DirEntry; # define TclOSreaddir readdir # define TclOSopendir opendir diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 9401c77..15d9d52 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -742,7 +742,7 @@ TclpFinalizeCondition( Tcl_DirEntry * TclpReaddir( - Tcl_Dir * dir) + TclDIR * dir) { return TclOSreaddir(dir); } -- cgit v0.12