diff options
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 8138d1d88..ae3becc32 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -28,9 +28,10 @@ enum FH_SYMLINK = 0x00100000, /* is a symlink */ FH_EXECABL = 0x00200000, /* file looked like it would run: * ends in .exe or .bat or begins with #! */ - FH_W95LSBUG = 0x00400000, /* set when lseek is called as a flag that + FH_LSEEKED = 0x00400000, /* set when lseek is called as a flag that * _write should check if we've moved beyond - * EOF, zero filling if so. */ + * EOF, zero filling or making file sparse + if so. */ FH_NOHANDLE = 0x00800000, /* No handle associated with fhandler. */ FH_NOEINTR = 0x01000000, /* Set if I/O should be uninterruptible. */ FH_FFIXUP = 0x02000000, /* Set if need to fixup after fork. */ @@ -167,6 +168,7 @@ class fhandler_base const char *unix_path_name; const char *win32_path_name; DWORD open_status; + DWORD fs_flags; HANDLE read_state; public: @@ -234,8 +236,8 @@ class fhandler_base return get_close_on_exec () ? &sec_none_nih : &sec_none; } - void set_check_win95_lseek_bug (int b = 1) { FHCONDSETF (b, W95LSBUG); } - bool get_check_win95_lseek_bug () { return FHISSETF (W95LSBUG); } + void set_did_lseek (int b = 1) { FHCONDSETF (b, LSEEKED); } + bool get_did_lseek () { return FHISSETF (LSEEKED); } bool get_need_fork_fixup () { return FHISSETF (FFIXUP); } void set_need_fork_fixup () { FHSETF (FFIXUP); } @@ -268,6 +270,10 @@ class fhandler_base void set_append_p (int val) { FHCONDSETF (val, APPEND); } void set_append_p () { FHSETF (APPEND); } + void set_fs_flags (DWORD flags) { fs_flags = flags; } + bool get_fs_flags (DWORD flagval = 0xffffffffUL) + { return (fs_flags & (flagval)); } + bool get_query_open () { return FHISSETF (QUERYOPEN); } void set_query_open (bool val) { FHCONDSETF (val, QUERYOPEN); } |