diff options
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r-- | win/tclWinFile.c | 11 |
1 files changed, 7 insertions, 4 deletions
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; |