summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2006-10-01 21:30:03 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2006-10-01 21:30:03 (GMT)
commitca023ffad4367c58694216799a3984ade30e5ca5 (patch)
tree66c3b83c11918221c33058a868a727f7bede748b /win/tclWinFile.c
parent8d48f83e10fc5715983619a0194cc1f0ffcc0260 (diff)
downloadtcl-ca023ffad4367c58694216799a3984ade30e5ca5.zip
tcl-ca023ffad4367c58694216799a3984ade30e5ca5.tar.gz
tcl-ca023ffad4367c58694216799a3984ade30e5ca5.tar.bz2
Handle possible missing define
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index ce4dae4..1e84315 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.87 2006/10/01 13:03:56 patthoyts Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.88 2006/10/01 21:30:04 patthoyts Exp $
*/
/* #define _WIN32_WINNT 0x0500 */
@@ -89,6 +89,9 @@
# 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 data is
@@ -2116,7 +2119,7 @@ NativeStat(
*/
attr = (*tclWinProcs->getFileAttributesProc)(nativePath);
- if (attr == 0xffffffff) {
+ if (attr == INVALID_FILE_ATTRIBUTES) {
Tcl_SetErrno(ENOENT);
return -1;
}
@@ -2659,7 +2662,7 @@ TclpObjNormalizePath(
*/
if (isDrive) {
- if (GetFileAttributesA(nativePath) == 0xffffffff) {
+ if (GetFileAttributesA(nativePath) == INVALID_FILE_ATTRIBUTES) {
/*
* File doesn't exist.
*/
@@ -2726,7 +2729,7 @@ TclpObjNormalizePath(
handle = FindFirstFileA(nativePath, &fData);
if (handle == INVALID_HANDLE_VALUE) {
- if (GetFileAttributesA(nativePath) == 0xffffffff) {
+ if (GetFileAttributesA(nativePath) == INVALID_FILE_ATTRIBUTES) {
/*
* File doesn't exist.
*/