diff options
author | Christopher Faylor <me@cgf.cx> | 2001-03-05 06:28:25 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-03-05 06:28:25 +0000 |
commit | 95a8465ba0fb3ea0fb9033e4823b1f65c4554f27 (patch) | |
tree | 1d9cd02f71759975598d27cf3728af23592c90b0 /winsup/cygwin/path.h | |
parent | 658b5db941bcace10daa2d17e8c1158030a4fc8c (diff) | |
download | newlib-95a8465ba0fb3ea0fb9033e4823b1f65c4554f27.zip newlib-95a8465ba0fb3ea0fb9033e4823b1f65c4554f27.tar.gz newlib-95a8465ba0fb3ea0fb9033e4823b1f65c4554f27.tar.bz2 |
* dlopen.c (dlopen): Return NULL when name is NULL (suggested by
chrisiasci@aol.com).
* cygwin.din: Add a new, internally used export - _check_for_executable.
* dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries. Pass
user_data to premain functions.
* fhandler.cc (fhandler_disk_file::open): Only check for executable if the
linked program is intereested in the executable bit.
(fhandler_disk_file::check_execable_p): Delete.
* fhandler.h (executable_states): New enumeration of various states of
executable bit caring.
(fhandler_base::set_execable_p): New method.
* fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal has
been sent to the tty. Return -1 when this is so.
* fhandler_console.cc (fhandler_console::read): Return -1 when signal sending
character encountered.
* path.cc (path_conv::check): Record when path refers to a disk device. Move
executable extension check here.
(check_sysfile): Accomodate new EXEC path states.
(has_suffix): Remove.
(next_suffix): Remove.
(class suffix_scan): New clas.
(suffix_scan::has): New method.
(suffix_scan:next): New method.
(symlink_info::check): Use suffix_scan method to control for scanning for
suffixes.
* path.h (path_conv::exec_state): New method.
* perprocess.h: Make "C" friendly.
* include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC. Bump
CYGWIN_VERSION_API_MINOR.
* include/sys/cygwin.h: Change premain declarations.
* winsup.h: Move __cplusplus test to after builtin defines.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 6d0a195..40b8eec 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -37,6 +37,8 @@ enum path_types PATH_EXEC = MOUNT_EXEC, PATH_CYGWIN_EXEC = MOUNT_CYGWIN_EXEC, PATH_ALL_EXEC = PATH_CYGWIN_EXEC | PATH_EXEC, + PATH_ISDISK = 0x04000000, + PATH_NOTEXEC = 0x08000000, PATH_HAS_SYMLINKS = 0x10000000, PATH_HASBUGGYOPEN = 0x20000000, PATH_SOCKET = 0x40000000, @@ -50,6 +52,7 @@ class path_conv unsigned path_flags; + int isdisk () {return path_flags & PATH_ISDISK;} int has_acls () {return path_flags & PATH_HASACLS;} int has_symlinks () {return path_flags & PATH_HAS_SYMLINKS;} int hasgood_inode () {return path_flags & PATH_HASACLS;} // Not strictly correct @@ -57,13 +60,24 @@ class path_conv int isbinary () {return path_flags & PATH_BINARY;} int issymlink () {return path_flags & PATH_SYMLINK;} int issocket () {return path_flags & PATH_SOCKET;} - int isexec () {return path_flags & PATH_ALL_EXEC;} int iscygexec () {return path_flags & PATH_CYGWIN_EXEC;} + executable_states exec_state () + { + extern int _check_for_executable; + if (path_flags & PATH_ALL_EXEC) + return is_executable; + if (path_flags & PATH_NOTEXEC) + return not_executable; + if (!_check_for_executable) + return dont_care_if_executable; + return dont_know_if_executable; + } void set_binary () {path_flags |= PATH_BINARY;} void set_symlink () {path_flags |= PATH_SYMLINK;} void set_has_symlinks () {path_flags |= PATH_HAS_SYMLINKS;} - void set_exec (int x = 1) {path_flags |= x ? PATH_EXEC : PATH_NOTHING;} + void set_isdisk () {path_flags |= PATH_ISDISK;} + void set_exec (int x = 1) {path_flags |= x ? PATH_EXEC : PATH_NOTEXEC;} void set_has_acls (int x = 1) {path_flags |= x ? PATH_HASACLS : PATH_NOTHING;} void set_has_buggy_open (int x = 1) {path_flags |= x ? PATH_HASBUGGYOPEN : PATH_NOTHING;} |