diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-01-14 20:39:59 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-01-14 20:39:59 +0000 |
commit | 7eddac1bc503f29cd81bba336ad7e45a20ee0bef (patch) | |
tree | 90d754a285de2c960781a3e715c41680225aa1a9 /winsup/cygwin/path.h | |
parent | 55409319defa10e37a95cf3e3d60b7491fc79729 (diff) | |
download | cygnal-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.tar.gz cygnal-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.tar.bz2 cygnal-7eddac1bc503f29cd81bba336ad7e45a20ee0bef.zip |
* 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/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 766c2a261..ea3a6545a 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -1,6 +1,6 @@ /* path.h: path data structures - Copyright 1996, 1997, 1998, 2000 Red Hat, Inc. + Copyright 1996, 1997, 1998, 2000, 2001, 2002 Red Hat, Inc. This file is part of Cygwin. @@ -86,7 +86,7 @@ class path_conv int issymlink () const {return path_flags & PATH_SYMLINK;} int issocket () const {return path_flags & PATH_SOCKET;} int iscygexec () const {return path_flags & PATH_CYGWIN_EXEC;} - bool exists () const {return fileattr != (DWORD) -1;} + bool exists () const {return fileattr != INVALID_FILE_ATTRIBUTES;} bool has_attribute (DWORD x) const {return exists () && (fileattr & x);} int isdir () const {return has_attribute (FILE_ATTRIBUTE_DIRECTORY);} executable_states exec_state () @@ -124,7 +124,7 @@ class path_conv check (src, opt | PC_NULLEMPTY, suffixes); } - path_conv (): path_flags (0), known_suffix (NULL), error (0), devn (0), unit (0), fileattr (0xffffffff) {path[0] = '\0';} + path_conv (): path_flags (0), known_suffix (NULL), error (0), devn (0), unit (0), fileattr (INVALID_FILE_ATTRIBUTES) {path[0] = '\0';} inline char *get_win32 () { return path; } operator char *() {return path; } |