From 70d0243ce9d627f9aa79b3eccbf0747347ba7b1a Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 8 Sep 2005 00:57:12 +0000 Subject: * hookapi.cc (rvadelta): Change argument to DWORD to eliminate a compiler warning. * path.h (path_conv::set_cygexec): New function. * spawn.cc (av::iscygwin): Eliminate. (av::av): Don't initialize iscygwin. (spawn_guts): Just use real_path.iscygexec for all tests. (av::fixup): Short circuit test if .exe extension and known cygexec. Set cygexec flag appropriately if we find that program uses cygwin1.dll. --- winsup/cygwin/path.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'winsup/cygwin/path.h') diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index a502e8629..14c23ebe5 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -151,6 +151,13 @@ class path_conv int is_lnk_special () const {return is_fs_device () || isfifo () || is_lnk_symlink ();} int issocket () const {return dev.devn == FH_UNIX;} int iscygexec () const {return path_flags & PATH_CYGWIN_EXEC;} + void set_cygexec (bool isset) + { + if (isset) + path_flags |= PATH_CYGWIN_EXEC; + else + path_flags &= ~PATH_CYGWIN_EXEC; + } bool isro () const {return !!(path_flags & PATH_RO);} bool exists () const {return fileattr != INVALID_FILE_ATTRIBUTES;} bool has_attribute (DWORD x) const {return exists () && (fileattr & x);} -- cgit v1.2.3