diff options
author | Christopher Faylor <me@cgf.cx> | 2000-07-09 09:29:51 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-07-09 09:29:51 +0400 |
commit | bd4ec49671b07f93883c7e0c9142125525731714 (patch) | |
tree | 49c4d2e87d54048f97bea742896acb5b348ffda1 /winsup/cygwin/fhandler.h | |
parent | 85219b356e249702b845cf667462584945b1735b (diff) |
* cygwin.din: Export _getmode and getmode to allow querying of binary state of
an fd.
* external.cc (cygwin_internal): Add handling of perfile_table setting.
* fhandler.cc (perfile_table): New global.
(fhandler_base::get_default_fmode): New method to return a file's default mode
based on its name.
(fhandler_base::open): Use get_default_mode method to determine a file's mode.
Record file mode in file flags.
* fhandler.h (fhandler_base): Declare get_default_fmode
* syscalls.cc (getmode): New function.
* sys/cygwin.h (__cygwin_perfile): New structure.
(cygwin_getinfo_types): Move outside of WINVER conditional.
(per_process): Move inside of WINVER conditional.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 802fd2ac2..7ce116efd 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -107,6 +107,7 @@ enum #define FHSTATOFF 0 extern const char *windows_device_names[]; +extern struct __cygwin_perfile *perfile_table; #define __fmode (*(user_data->fmode_ptr)) class select_record; @@ -182,6 +183,8 @@ public: void set_w_binary (int b) { FHCONDSETF (b, WBINARY); FHSETF (WBINSET); } void set_r_binary (int b) { FHCONDSETF (b, RBINARY); FHSETF (RBINSET); } + int get_default_fmode (int flags); + int get_r_no_interrupt () { return FHISSETF (NOEINTR); } void set_r_no_interrupt (int b) { FHCONDSETF (b, NOEINTR); } |