diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-01 21:51:33 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-01 21:51:33 (GMT) |
commit | 4e20b55798ba3cb9b6bc3c9d02b3ba4790efa387 (patch) | |
tree | 9bc4b29527865ece18e559271ced174b9580c132 | |
parent | 323746151e57849e59cc1f7fd62b0a3bc1fd008a (diff) | |
download | tcl-4e20b55798ba3cb9b6bc3c9d02b3ba4790efa387.zip tcl-4e20b55798ba3cb9b6bc3c9d02b3ba4790efa387.tar.gz tcl-4e20b55798ba3cb9b6bc3c9d02b3ba4790efa387.tar.bz2 |
Handle possible missing define
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | win/tclWinFile.c | 11 |
2 files changed, 8 insertions, 4 deletions
@@ -1,5 +1,6 @@ 2006-10-01 Pat Thoyts <patthoyts@users.sourceforge.net> + * win/tclWinFile.c: Handle possible missing define. * win/tclWinFile.c: Backported fix for bug #1420432 (cannot set * tests/cmdAH.test: mtime for directories on windows). diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 7f1e12a..f0e07f2 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.44.2.16 2006/10/01 13:17:34 patthoyts Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.44.2.17 2006/10/01 21:51:34 patthoyts Exp $ */ //#define _WIN32_WINNT 0x0500 @@ -82,6 +82,9 @@ # define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) # define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) #endif +#ifndef INVALID_FILE_ATTRIBUTES +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) +#endif /* * Maximum reparse buffer info size. The max user defined reparse @@ -1851,7 +1854,7 @@ NativeStat(nativePath, statPtr, checkLinks) */ attr = (*tclWinProcs->getFileAttributesProc)(nativePath); - if (attr == 0xffffffff) { + if (attr == INVALID_FILE_ATTRIBUTES) { Tcl_SetErrno(ENOENT); return -1; } @@ -2355,7 +2358,7 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) * the current normalized path, if the file exists. */ if (isDrive) { - if (GetFileAttributesA(nativePath) == 0xffffffff) { + if (GetFileAttributesA(nativePath) == INVALID_FILE_ATTRIBUTES) { /* File doesn't exist */ if (isDrive) { int len = WinIsReserved(path); @@ -2385,7 +2388,7 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) handle = FindFirstFileA(nativePath, &fData); if (handle == INVALID_HANDLE_VALUE) { if (GetFileAttributesA(nativePath) - == 0xffffffff) { + == INVALID_FILE_ATTRIBUTES) { /* File doesn't exist */ Tcl_DStringFree(&ds); break; |