Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | amend to [85bcf84100]: replaces DIR with Tcl_Dir (DIR/DIR64 regarding HAVE_STRUCT_DIRENT64) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | core-8-5-branch |
Files: | files | file ages | folders |
SHA3-256: |
f80031df45e7d250099e146558e1f7af |
User & Date: | sebres 2018-05-09 10:29:33.737 |
Context
2018-05-11
| ||
07:53 | Rename Tcl_Dir to TclDIR, making it clear that this macro is not part of the public API check-in: 3257682387 user: jan.nijtmans tags: core-8-5-branch | |
2018-05-09
| ||
10:34 | merge 8.5 check-in: 210ccdf585 user: sebres tags: core-8-6-branch | |
10:29 | amend to [85bcf84100]: replaces DIR with Tcl_Dir (DIR/DIR64 regarding HAVE_STRUCT_DIRENT64) check-in: f80031df45 user: sebres tags: core-8-5-branch | |
2018-05-08
| ||
09:49 | fixes [92564326a98b5510]: wrong x64-aligned handle from readdir64 by opendir/rewinddir/closedir, if ... check-in: 85bcf84100 user: sebres tags: core-8-5-branch | |
Changes
Changes to generic/tclInt.decls.
︙ | ︙ | |||
991 992 993 994 995 996 997 | int TclpGetPid(Tcl_Pid pid) } declare 9 win { int TclWinGetPlatformId(void) } # new for 8.4.20+/8.5.12+ Cygwin only declare 10 win { | | | 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 | int TclpGetPid(Tcl_Pid pid) } declare 9 win { int TclWinGetPlatformId(void) } # new for 8.4.20+/8.5.12+ Cygwin only declare 10 win { Tcl_DirEntry *TclpReaddir(Tcl_Dir *dir) } # Removed in 8.3.1 (for Win32s only) #declare 10 win { # int TclWinSynchSpawn(void *args, int type, void **trans, Tcl_Pid *pidPtr) #} # Pipe channel functions |
︙ | ︙ | |||
1131 1132 1133 1134 1135 1136 1137 | declare 9 unix { TclFile TclpCreateTempFile(const char *contents) } # Added in 8.4: declare 10 unix { | | | 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 | declare 9 unix { TclFile TclpCreateTempFile(const char *contents) } # Added in 8.4: declare 10 unix { Tcl_DirEntry *TclpReaddir(Tcl_Dir *dir) } # Slots 11 and 12 are forwarders for functions that were promoted to # generic Stubs declare 11 unix { struct tm *TclpLocaltime_unix(const time_t *clock) } declare 12 unix { |
︙ | ︙ |
Changes to generic/tclIntPlatDecls.h.
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #ifndef _TCLINTPLATDECLS #define _TCLINTPLATDECLS #ifdef __WIN32__ # define Tcl_DirEntry void # define DIR void #endif #undef TCL_STORAGE_CLASS #ifdef BUILD_tcl # define TCL_STORAGE_CLASS DLLEXPORT #else # ifdef USE_TCL_STUBS | > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #ifndef _TCLINTPLATDECLS #define _TCLINTPLATDECLS #ifdef __WIN32__ # define Tcl_DirEntry void # define DIR void # define Tcl_Dir void #endif #undef TCL_STORAGE_CLASS #ifdef BUILD_tcl # define TCL_STORAGE_CLASS DLLEXPORT #else # ifdef USE_TCL_STUBS |
︙ | ︙ | |||
97 98 99 100 101 102 103 | #define TclpCreateTempFile_TCL_DECLARED /* 9 */ EXTERN TclFile TclpCreateTempFile(CONST char *contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ | | | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | #define TclpCreateTempFile_TCL_DECLARED /* 9 */ EXTERN TclFile TclpCreateTempFile(CONST char *contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir); #endif #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED /* 11 */ EXTERN struct tm * TclpLocaltime_unix(CONST time_t *clock); #endif #ifndef TclpGmtime_unix_TCL_DECLARED |
︙ | ︙ | |||
198 199 200 201 202 203 204 | #define TclWinGetPlatformId_TCL_DECLARED /* 9 */ EXTERN int TclWinGetPlatformId(void); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ | | | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | #define TclWinGetPlatformId_TCL_DECLARED /* 9 */ EXTERN int TclWinGetPlatformId(void); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir); #endif #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 11 */ EXTERN void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan); #endif |
︙ | ︙ | |||
356 357 358 359 360 361 362 | #define TclpCreateTempFile_TCL_DECLARED /* 9 */ EXTERN TclFile TclpCreateTempFile(CONST char *contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ | | | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | #define TclpCreateTempFile_TCL_DECLARED /* 9 */ EXTERN TclFile TclpCreateTempFile(CONST char *contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ EXTERN Tcl_DirEntry * TclpReaddir(Tcl_Dir *dir); #endif #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED /* 11 */ EXTERN struct tm * TclpLocaltime_unix(CONST time_t *clock); #endif #ifndef TclpGmtime_unix_TCL_DECLARED |
︙ | ︙ | |||
446 447 448 449 450 451 452 | int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */ int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */ VOID *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ TclFile (*tclpOpenFile) (CONST char *fname, int mode); /* 7 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ TclFile (*tclpCreateTempFile) (CONST char *contents); /* 9 */ | | | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */ int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */ VOID *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ 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 */ 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 */ int (*tclUnixCopyFile) (CONST char *src, CONST char *dst, CONST Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */ VOID *reserved15; VOID *reserved16; VOID *reserved17; |
︙ | ︙ | |||
478 479 480 481 482 483 484 | int (*tclWinGetSockOpt) (SOCKET s, int level, int optname, char *optval, int *optlen); /* 3 */ HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */ unsigned short (*tclWinNToHS) (unsigned short ns); /* 6 */ int (*tclWinSetSockOpt) (SOCKET s, int level, int optname, CONST char *optval, int optlen); /* 7 */ int (*tclpGetPid) (Tcl_Pid pid); /* 8 */ int (*tclWinGetPlatformId) (void); /* 9 */ | | | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | int (*tclWinGetSockOpt) (SOCKET s, int level, int optname, char *optval, int *optlen); /* 3 */ HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */ unsigned short (*tclWinNToHS) (unsigned short ns); /* 6 */ 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 */ 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 */ int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 14 */ int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 15 */ int (*tclpIsAtty) (int fd); /* 16 */ int (*tclUnixCopyFile) (CONST char *src, CONST char *dst, CONST Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 17 */ |
︙ | ︙ | |||
510 511 512 513 514 515 516 | int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */ int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */ VOID *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ TclFile (*tclpOpenFile) (CONST char *fname, int mode); /* 7 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ TclFile (*tclpCreateTempFile) (CONST char *contents); /* 9 */ | | | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */ int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */ VOID *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ 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 */ 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 */ int (*tclUnixCopyFile) (CONST char *src, CONST char *dst, CONST Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */ int (*tclMacOSXGetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); /* 15 */ int (*tclMacOSXSetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); /* 16 */ int (*tclMacOSXCopyFileAttributes) (CONST char *src, CONST char *dst, CONST Tcl_StatBuf *statBufPtr); /* 17 */ |
︙ | ︙ |
Changes to unix/tclUnixFCmd.c.
︙ | ︙ | |||
323 324 325 326 327 328 329 | * as EINVAL instead of EEXIST (first rule out the correct EINVAL result * code for moving a directory into itself). Must be conditionally * compiled because realpath() not defined on all systems. */ if (errno == EINVAL && haveRealpath) { char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN]; | | | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | * as EINVAL instead of EEXIST (first rule out the correct EINVAL result * code for moving a directory into itself). Must be conditionally * compiled because realpath() not defined on all systems. */ if (errno == EINVAL && haveRealpath) { char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN]; Tcl_Dir *dirPtr; Tcl_DirEntry *dirEntPtr; if ((Realpath((char *) src, srcPath) != NULL) /* INTL: Native. */ && (Realpath((char *) dst, dstPath) != NULL) /* INTL: Native */ && (strncmp(srcPath, dstPath, strlen(srcPath)) != 0)) { dirPtr = TclOSopendir(dst); /* INTL: Native. */ if (dirPtr != NULL) { |
︙ | ︙ | |||
916 917 918 919 920 921 922 | Tcl_StatBuf statBuf; CONST char *source, *errfile; int result, sourceLen; int targetLen; #ifndef HAVE_FTS int numProcessed = 0; Tcl_DirEntry *dirEntPtr; | | | 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 | Tcl_StatBuf statBuf; CONST char *source, *errfile; int result, sourceLen; int targetLen; #ifndef HAVE_FTS int numProcessed = 0; Tcl_DirEntry *dirEntPtr; Tcl_Dir *dirPtr; #else CONST char *paths[2] = {NULL, NULL}; FTS *fts = NULL; FTSENT *ent; #endif errfile = NULL; |
︙ | ︙ |
Changes to unix/tclUnixFile.c.
︙ | ︙ | |||
255 256 257 258 259 260 261 | matchResult = NativeMatchType(interp, native, nativeTail, types); if (matchResult == 1) { Tcl_ListObjAppendElement(interp, resultPtr, pathPtr); } Tcl_DecrRefCount(tailPtr); Tcl_DecrRefCount(fileNamePtr); } else { | | | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | matchResult = NativeMatchType(interp, native, nativeTail, types); if (matchResult == 1) { Tcl_ListObjAppendElement(interp, resultPtr, pathPtr); } Tcl_DecrRefCount(tailPtr); Tcl_DecrRefCount(fileNamePtr); } else { Tcl_Dir *d; Tcl_DirEntry *entryPtr; CONST char *dirName; int dirLength; int matchHidden, matchHiddenPat; int nativeDirLen; Tcl_StatBuf statBuf; Tcl_DString ds; /* native encoding of dir */ |
︙ | ︙ |
Changes to unix/tclUnixPort.h.
︙ | ︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | /* *--------------------------------------------------------------------------- * Parameterize for 64-bit filesystem support. *--------------------------------------------------------------------------- */ #ifdef HAVE_STRUCT_DIRENT64 typedef struct dirent64 Tcl_DirEntry; # define TclOSreaddir readdir64 # define TclOSopendir opendir64 # define TclOSrewinddir rewinddir64 # define TclOSclosedir closedir64 #else typedef struct dirent Tcl_DirEntry; # define TclOSreaddir readdir # define TclOSopendir opendir # define TclOSrewinddir rewinddir # define TclOSclosedir closedir #endif | > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | /* *--------------------------------------------------------------------------- * Parameterize for 64-bit filesystem support. *--------------------------------------------------------------------------- */ #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 # define TclOSrewinddir rewinddir # define TclOSclosedir closedir #endif |
︙ | ︙ |
Changes to unix/tclUnixThrd.c.
︙ | ︙ | |||
738 739 740 741 742 743 744 | * appears in the internal stubs table (see #589526). * *---------------------------------------------------------------------- */ Tcl_DirEntry * TclpReaddir( | | | 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | * appears in the internal stubs table (see #589526). * *---------------------------------------------------------------------- */ Tcl_DirEntry * TclpReaddir( Tcl_Dir * dir) { return TclOSreaddir(dir); } char * TclpInetNtoa( struct in_addr addr) |
︙ | ︙ |