diff options
author | dgp <dgp@users.sourceforge.net> | 2021-01-08 21:07:57 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2021-01-08 21:07:57 (GMT) |
commit | 8229cd730444707ecef238b9678a5c8d779554f0 (patch) | |
tree | 28dbb787f28e59d75da785125db09451de89b1ff /win/tclWinFile.c | |
parent | db51032d33e94c96859a874ec838558620720a09 (diff) | |
parent | 4e3cd053dbb7487dfdf2e93f5151d9bdd5f9865e (diff) | |
download | tcl-8229cd730444707ecef238b9678a5c8d779554f0.zip tcl-8229cd730444707ecef238b9678a5c8d779554f0.tar.gz tcl-8229cd730444707ecef238b9678a5c8d779554f0.tar.bz2 |
Merge 8.7 (resolve conflicts)
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r-- | win/tclWinFile.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index d843b51..fbd49dc 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -29,7 +29,7 @@ */ #define POSIX_EPOCH_AS_FILETIME \ - ((Tcl_WideInt) 116444736 * (Tcl_WideInt) 1000000000) + ((long long) 116444736 * (long long) 1000000000) /* * Declarations for 'link' related information. This information should come @@ -264,12 +264,7 @@ WinLink( TclWinConvertError(GetLastError()); } else if (linkAction & TCL_CREATE_SYMBOLIC_LINK) { - if (!tclWinProcs.createSymbolicLink) { - /* - * Can't symlink files. - */ - Tcl_SetErrno(EINVAL); - } else if (tclWinProcs.createSymbolicLink(linkSourcePath, linkTargetPath, + if (CreateSymbolicLinkW(linkSourcePath, linkTargetPath, 0x2 /* SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE */)) { /* * Success! @@ -2088,8 +2083,8 @@ NativeStat( statPtr->st_ctime = ToCTime(data.ftCreationTime); } attr = data.dwFileAttributes; - statPtr->st_size = ((Tcl_WideInt) data.nFileSizeLow) | - (((Tcl_WideInt) data.nFileSizeHigh) << 32); + statPtr->st_size = ((long long) data.nFileSizeLow) | + (((long long) data.nFileSizeHigh) << 32); /* * On Unix, for directories, nlink apparently depends on the number of @@ -2136,8 +2131,8 @@ NativeStat( attr = data.dwFileAttributes; - statPtr->st_size = ((Tcl_WideInt) data.nFileSizeLow) | - (((Tcl_WideInt) data.nFileSizeHigh) << 32); + statPtr->st_size = ((long long) data.nFileSizeLow) | + (((long long) data.nFileSizeHigh) << 32); statPtr->st_atime = ToCTime(data.ftLastAccessTime); statPtr->st_mtime = ToCTime(data.ftLastWriteTime); statPtr->st_ctime = ToCTime(data.ftCreationTime); @@ -2299,7 +2294,7 @@ ToCTime( convertedTime.HighPart = (LONG) fileTime.dwHighDateTime; return (__time64_t) ((convertedTime.QuadPart - - (Tcl_WideInt) POSIX_EPOCH_AS_FILETIME) / (Tcl_WideInt) 10000000); + (long long) POSIX_EPOCH_AS_FILETIME) / (long long) 10000000); } /* |