Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-01-14 23:39:59 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-01-14 23:39:59 +0300
commit7eddac1bc503f29cd81bba336ad7e45a20ee0bef (patch)
tree90d754a285de2c960781a3e715c41680225aa1a9 /winsup/cygwin/fhandler_disk_file.cc
parent55409319defa10e37a95cf3e3d60b7491fc79729 (diff)
* dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1"
for file attributes throughout. * fhandler.cc: Ditto. * fhandler_disk_file.cc: Ditto. * path.cc: Ditto. * path.h: Ditto. * syscalls.cc: Ditto. * times.cc (utimes): Use path_conv::isdir() instead of explicit GetFileAttributes() call.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 1ce4893d2..18887844e 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1,6 +1,6 @@
/* fhandler_disk_file.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin.
@@ -382,7 +382,7 @@ fhandler_disk_file::open (path_conv *real_path, int flags, mode_t mode)
which returns a valid handle when trying to open a file in a nonexistent
directory. */
if (real_path->has_buggy_open ()
- && GetFileAttributes (win32_path_name) == (DWORD) -1)
+ && GetFileAttributes (win32_path_name) == INVALID_FILE_ATTRIBUTES)
{
debug_printf ("Buggy open detected.");
close ();
@@ -804,7 +804,7 @@ fhandler_cygdrive::readdir (DIR *dir)
set_errno (ENMFILE);
return NULL;
}
- if (GetFileAttributes (pdrive) == (DWORD) -1)
+ if (GetFileAttributes (pdrive) == INVALID_FILE_ATTRIBUTES)
{
pdrive += DRVSZ;
return readdir (dir);