Index: win/tclWinFile.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinFile.c,v
retrieving revision 1.9
diff -b -c -r1.9 tclWinFile.c
*** win/tclWinFile.c	2000/10/27 01:58:00	1.9
--- win/tclWinFile.c	2001/03/24 01:29:17
***************
*** 795,802 ****
--- 795,806 ----
  {
      Tcl_DString ds;
      TCHAR *nativePath;
+ #if OLD_API
      WIN32_FIND_DATAT data;
      HANDLE handle;
+ #else
+     WIN32_FILE_ATTRIBUTE_DATA data;
+ #endif
      DWORD attr;
      WCHAR nativeFullPath[MAX_PATH];
      TCHAR *nativePart;
***************
*** 808,813 ****
--- 812,819 ----
       * call to FindFirstFile() will expand them, matching some other file.
       */
  
+ 
+ #if OLD_API
      if (strpbrk(path, "?*") != NULL) {
  	Tcl_SetErrno(ENOENT);
  	return -1;
***************
*** 838,843 ****
--- 844,857 ----
      } else {
  	FindClose(handle);
      }
+ #else
+     nativePath = Tcl_WinUtfToTChar(path, -1, &ds);
+     if(GetFileAttributesExW((unsigned short *)nativePath,
+                           GetFileExInfoStandard,&data) != TRUE) {
+       Tcl_SetErrno(ENOENT);
+       return -1;
+     }
+ #endif
  
      (*tclWinProcs->getFullPathNameProc)(nativePath, MAX_PATH, nativeFullPath,
  	    &nativePart);
***************
*** 884,890 ****
--- 898,908 ----
      }
      Tcl_DStringFree(&ds);
  
+ #if OLD_API
      attr = data.a.dwFileAttributes;
+ #else
+     attr = data.dwFileAttributes;
+ #endif
      mode  = (attr & FILE_ATTRIBUTE_DIRECTORY) ? S_IFDIR | S_IEXEC : S_IFREG;
      mode |= (attr & FILE_ATTRIBUTE_READONLY) ? S_IREAD : S_IREAD | S_IWRITE;
      p = strrchr(path, '.');
***************
*** 912,921 ****
--- 930,946 ----
      statPtr->st_uid	= 0;
      statPtr->st_gid	= 0;
      statPtr->st_rdev	= (dev_t) dev;
+ #if OLD_API
      statPtr->st_size	= data.a.nFileSizeLow;
      statPtr->st_atime	= ToCTime(data.a.ftLastAccessTime);
      statPtr->st_mtime	= ToCTime(data.a.ftLastWriteTime);
      statPtr->st_ctime	= ToCTime(data.a.ftCreationTime);
+ #else
+     statPtr->st_size  = data.nFileSizeLow;
+     statPtr->st_atime = ToCTime(data.ftLastAccessTime);
+     statPtr->st_mtime = ToCTime(data.ftLastWriteTime);
+     statPtr->st_ctime = ToCTime(data.ftCreationTime);
+ #endif
      return 0;
  }
  
