* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
/* wincap.h: Header for OS capability class.
|
|
|
|
|
2002-06-13 19:28:11 +02:00
|
|
|
Copyright 2001, 2002 Red Hat, Inc.
|
* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
|
|
|
|
This file is part of Cygwin.
|
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
|
|
|
#ifndef _WINCAP_H
|
|
|
|
#define _WINCAP_H
|
|
|
|
|
|
|
|
struct wincaps
|
2001-11-05 07:09:15 +01:00
|
|
|
{
|
* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
DWORD lock_file_highword;
|
|
|
|
DWORD chunksize;
|
|
|
|
int shared;
|
|
|
|
unsigned is_winnt : 1;
|
|
|
|
unsigned access_denied_on_delete : 1;
|
|
|
|
unsigned has_delete_on_close : 1;
|
|
|
|
unsigned has_page_guard : 1;
|
|
|
|
unsigned has_security : 1;
|
|
|
|
unsigned has_security_descriptor_control : 1;
|
|
|
|
unsigned has_get_process_times : 1;
|
|
|
|
unsigned has_lseek_bug : 1;
|
|
|
|
unsigned has_lock_file_ex : 1;
|
|
|
|
unsigned has_signal_object_and_wait : 1;
|
|
|
|
unsigned has_eventlog : 1;
|
|
|
|
unsigned has_ip_helper_lib : 1;
|
|
|
|
unsigned has_set_handle_information : 1;
|
2001-09-20 10:02:01 +02:00
|
|
|
unsigned has_set_handle_information_on_console_handles: 1;
|
* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
unsigned supports_smp : 1;
|
|
|
|
unsigned map_view_of_file_ex_sucks : 1;
|
|
|
|
unsigned altgr_is_ctrl_alt : 1;
|
|
|
|
unsigned has_physical_mem_access : 1;
|
|
|
|
unsigned has_working_copy_on_write : 1;
|
|
|
|
unsigned share_mmaps_only_by_name : 1;
|
|
|
|
unsigned virtual_protect_works_on_shared_pages : 1;
|
|
|
|
unsigned has_hard_links : 1;
|
|
|
|
unsigned can_open_directories : 1;
|
|
|
|
unsigned has_move_file_ex : 1;
|
|
|
|
unsigned has_negative_pids : 1;
|
|
|
|
unsigned has_unreliable_pipes : 1;
|
|
|
|
unsigned has_try_enter_critical_section : 1;
|
2001-10-16 16:53:26 +02:00
|
|
|
unsigned has_raw_devices : 1;
|
2001-10-15 11:41:18 +02:00
|
|
|
unsigned has_valid_processorlevel : 1;
|
2002-02-25 18:47:51 +01:00
|
|
|
unsigned has_64bit_file_access : 1;
|
2002-05-12 03:37:48 +02:00
|
|
|
unsigned has_process_io_counters : 1;
|
2002-07-24 13:01:37 +02:00
|
|
|
unsigned supports_reading_modem_output_lines : 1;
|
2002-10-15 19:04:20 +02:00
|
|
|
unsigned needs_memory_protection : 1;
|
2003-04-20 03:36:15 +02:00
|
|
|
unsigned pty_needs_alloc_console : 1;
|
2003-05-20 17:22:09 +02:00
|
|
|
unsigned has_terminal_services : 1;
|
* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class wincapc
|
|
|
|
{
|
|
|
|
OSVERSIONINFO version;
|
|
|
|
char osnam[40];
|
|
|
|
void *caps;
|
|
|
|
|
|
|
|
public:
|
|
|
|
void init ();
|
|
|
|
|
|
|
|
void set_chunksize (DWORD nchunksize);
|
2001-11-05 07:09:15 +01:00
|
|
|
|
* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
const char *osname () const { return osnam; }
|
|
|
|
|
|
|
|
#define IMPLEMENT(cap) cap() const { return ((wincaps *)this->caps)->cap; }
|
|
|
|
|
|
|
|
DWORD IMPLEMENT (lock_file_highword)
|
|
|
|
DWORD IMPLEMENT (chunksize)
|
|
|
|
int IMPLEMENT (shared)
|
|
|
|
bool IMPLEMENT (is_winnt)
|
|
|
|
bool IMPLEMENT (access_denied_on_delete)
|
|
|
|
bool IMPLEMENT (has_delete_on_close)
|
|
|
|
bool IMPLEMENT (has_page_guard)
|
|
|
|
bool IMPLEMENT (has_security)
|
|
|
|
bool IMPLEMENT (has_security_descriptor_control)
|
|
|
|
bool IMPLEMENT (has_get_process_times)
|
|
|
|
bool IMPLEMENT (has_lseek_bug)
|
|
|
|
bool IMPLEMENT (has_lock_file_ex)
|
|
|
|
bool IMPLEMENT (has_signal_object_and_wait)
|
|
|
|
bool IMPLEMENT (has_eventlog)
|
|
|
|
bool IMPLEMENT (has_ip_helper_lib)
|
|
|
|
bool IMPLEMENT (has_set_handle_information)
|
2001-09-20 10:02:01 +02:00
|
|
|
bool IMPLEMENT (has_set_handle_information_on_console_handles)
|
* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
bool IMPLEMENT (supports_smp)
|
|
|
|
bool IMPLEMENT (map_view_of_file_ex_sucks)
|
|
|
|
bool IMPLEMENT (altgr_is_ctrl_alt)
|
|
|
|
bool IMPLEMENT (has_physical_mem_access)
|
|
|
|
bool IMPLEMENT (has_working_copy_on_write)
|
|
|
|
bool IMPLEMENT (share_mmaps_only_by_name)
|
|
|
|
bool IMPLEMENT (virtual_protect_works_on_shared_pages)
|
|
|
|
bool IMPLEMENT (has_hard_links)
|
|
|
|
bool IMPLEMENT (can_open_directories)
|
|
|
|
bool IMPLEMENT (has_move_file_ex)
|
|
|
|
bool IMPLEMENT (has_negative_pids)
|
|
|
|
bool IMPLEMENT (has_unreliable_pipes)
|
|
|
|
bool IMPLEMENT (has_try_enter_critical_section)
|
2001-10-16 16:53:26 +02:00
|
|
|
bool IMPLEMENT (has_raw_devices)
|
2001-10-15 11:41:18 +02:00
|
|
|
bool IMPLEMENT (has_valid_processorlevel)
|
2002-02-25 18:47:51 +01:00
|
|
|
bool IMPLEMENT (has_64bit_file_access)
|
2002-05-12 03:37:48 +02:00
|
|
|
bool IMPLEMENT (has_process_io_counters)
|
2002-07-24 13:01:37 +02:00
|
|
|
bool IMPLEMENT (supports_reading_modem_output_lines)
|
2002-10-15 19:04:20 +02:00
|
|
|
bool IMPLEMENT (needs_memory_protection)
|
2003-04-20 03:36:15 +02:00
|
|
|
bool IMPLEMENT (pty_needs_alloc_console)
|
2003-05-20 17:22:09 +02:00
|
|
|
bool IMPLEMENT (has_terminal_services)
|
* Makefile.in: Build wincap.o.
* wincap.cc: New file.
* wincap.h: Ditto.
* autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
* dcrt0.cc (os_being_run): Eliminated.
(osname): Ditto.
(iswinnt): Ditto.
(set_os_type): Ditto.
(dll_crt0_1): Call wincap.init() instead of set_os_type().
(_dll_crt0): Ditto.
* environ.cc (set_chunksize): New function.
(parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
* fork.cc (chunksize): Eliminated. Moved to be member of wincap.
* host_dependent.h: Removed.
* syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
* cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
capability check throughout.
* winsup.h: Include wincap.h. Eliminate extern declarations of
`os_being_run' and `iswinnt'. Eliminate `os_type" definition.
* include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 19:46:37 +02:00
|
|
|
|
|
|
|
#undef IMPLEMENT
|
|
|
|
};
|
|
|
|
|
|
|
|
extern wincapc wincap;
|
|
|
|
|
|
|
|
#endif /* _WINCAP_H */
|