summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2006-10-01 21:51:33 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2006-10-01 21:51:33 (GMT)
commit0c25b2705cdac01590054d0027ef57e71169004e (patch)
tree9bc4b29527865ece18e559271ced174b9580c132 /win
parent90cf19d1e8047062753c6dcb127807aec08760b7 (diff)
downloadtcl-0c25b2705cdac01590054d0027ef57e71169004e.zip
tcl-0c25b2705cdac01590054d0027ef57e71169004e.tar.gz
tcl-0c25b2705cdac01590054d0027ef57e71169004e.tar.bz2
Handle possible missing define
Diffstat (limited to 'win')
-rw-r--r--win/tclWinFile.c11
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;