From bd4ec49671b07f93883c7e0c9142125525731714 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 9 Jul 2000 05:29:51 +0000 Subject: * 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. --- winsup/cygwin/external.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'winsup/cygwin/external.cc') diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 6ebd8e36d..e626cf5ef 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -103,6 +103,10 @@ cygwin_internal (cygwin_getinfo_types t, ...) case CW_USER_DATA: return (DWORD) &__cygwin_user_data; + case CW_PERFILE: + perfile_table = va_arg (arg, struct __cygwin_perfile *); + return 0; + default: return (DWORD) -1; } -- cgit v1.2.3