* 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-13 01:46:37 +08:00
|
|
|
/* wincap.cc -- figure out on which OS we're running. Set the
|
|
|
|
capability class to the appropriate values.
|
|
|
|
|
2010-01-23 06:31:31 +08:00
|
|
|
Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
2012-02-17 22:26:18 +08:00
|
|
|
2009, 2010, 2011, 2012 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-13 01:46:37 +08: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. */
|
|
|
|
|
|
|
|
#include "winsup.h"
|
2007-07-19 16:33:22 +08:00
|
|
|
#include "security.h"
|
2008-04-28 16:47:06 +08:00
|
|
|
#include "ntdll.h"
|
* 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-13 01:46:37 +08:00
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
/* CV, 2008-10-23: All wincapc's have to be in the .cygwin_dll_common section,
|
|
|
|
same as wincap itself. Otherwise the capability changes made in
|
|
|
|
wincapc::init() are not propagated to any subsequently started process
|
|
|
|
in the same session. I'm only writing this longish comment because I'm
|
|
|
|
puzzled that this has never been noticed before... */
|
|
|
|
|
2010-09-26 04:06:21 +08:00
|
|
|
/* Minimal set of capabilities required to run Cygwin. */
|
Drop NT4 support.
* autoload.cc (DnsQuery_A): Fatal if not available.
(DnsRecordListFree): Ditto.
(DsGetDcNameW): Ditto.
(NetGetAnyDCName): Remove.
(NetGetDCName): Remove.
(EnumProcessModules): Fatal if not available.
(GetModuleFileNameExW): Ditto.
(GetModuleInformation): Ditto.
(GetProcessMemoryInfo): Ditto.
(QueryWorkingSet): Ditto.
(LsaRegisterLogonProcess): Ditto.
* fenv.cc (_feinitialise): Drop supports_sse condition.
* fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment.
(fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition.
(fhandler_disk_file::opendir): Ditto.
* fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment.
* fhandler_proc.cc (format_proc_partitions): Drop NT4-only code.
* fhandler_process.cc (get_process_state): Ditto.
* kernel32.cc (GetWindowsDirectoryW): Remove.
(GetWindowsDirectoryA): Remove.
* miscfuncs.cc (nice_to_winprio): Drop NT4-only code.
* mount.cc (fs_info::update): Fix comments.
* net.cc (get_2k_ifs): Drop NT4-only code.
* sec_auth.cc (get_logon_server): Ditto.
(lsaauth): Drop NT4-specific error handling.
* security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally.
* select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE.
(peek_windows): Drop NT4-only condition in call to PeekMessage.
* syscalls.cc (gethostid): Remove NT4-only workaround.
* wincap.cc: Througout, drop has_dacl_protect,
has_broken_if_oper_status, has_process_io_counters,
has_terminal_services, has_extended_priority_class, has_guid_volumes,
has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from
wincaps.
(wincap_nt4sp4): Remove.
(wincap_minimal): Set to wincap_2000.
(wincapc::init): Rely on availability of OSVERSIONINFOEX structure.
Treat error from GetVersionEx as fatal. Treat NT4 as fatal.
* wincap.h (struct wincaps): Drop has_dacl_protect,
has_broken_if_oper_status, has_process_io_counters,
has_terminal_services, has_extended_priority_class, has_guid_volumes,
has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags
and methods.
* winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW.
(GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
2011-04-04 20:23:36 +08:00
|
|
|
#define wincap_minimal wincap_2000
|
* 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-13 01:46:37 +08:00
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
2007-07-19 16:33:22 +08:00
|
|
|
max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE,
|
2003-09-27 11:44:31 +08:00
|
|
|
is_server:false,
|
* 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-13 01:46:37 +08:00
|
|
|
has_physical_mem_access:true,
|
2007-03-30 00:37:36 +08:00
|
|
|
has_create_global_privilege:false,
|
2004-12-28 09:27:26 +08:00
|
|
|
has_ioctl_storage_get_media_types_ex:false,
|
2005-10-19 02:51:33 +08:00
|
|
|
has_disk_ex_ioctls:false,
|
2006-10-23 23:13:55 +08:00
|
|
|
has_buggy_restart_scan:true,
|
2006-11-08 19:38:05 +08:00
|
|
|
has_mandatory_integrity_control:false,
|
2006-11-27 20:59:59 +08:00
|
|
|
needs_logon_sid_in_sid_list:true,
|
2006-12-05 18:59:21 +08:00
|
|
|
needs_count_in_si_lpres2:false,
|
2006-12-11 00:43:30 +08:00
|
|
|
has_recycle_dot_bin:false,
|
2007-01-18 03:26:58 +08:00
|
|
|
has_gaa_prefixes:false,
|
|
|
|
has_gaa_on_link_prefix:false,
|
2007-02-01 23:54:40 +08:00
|
|
|
supports_all_posix_ai_flags:false,
|
2008-02-13 17:42:22 +08:00
|
|
|
has_restricted_stack_args:false,
|
2008-05-16 00:34:01 +08:00
|
|
|
has_transactions:false,
|
2009-01-20 19:16:59 +08:00
|
|
|
has_recvmsg:false,
|
|
|
|
has_sendmsg:false,
|
2009-01-30 04:32:08 +08:00
|
|
|
has_broken_udf:true,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_console_handle_problem:false,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:false,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:false,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:false,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:false,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:false,
|
2011-03-01 08:19:23 +08:00
|
|
|
use_dont_resolve_hack:false,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:false,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:false,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:false,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:false,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:true,
|
* 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-13 01:46:37 +08:00
|
|
|
};
|
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
2007-07-19 16:33:22 +08:00
|
|
|
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
|
|
|
|
is_server:false,
|
|
|
|
has_physical_mem_access:true,
|
|
|
|
has_create_global_privilege:true,
|
|
|
|
has_ioctl_storage_get_media_types_ex:false,
|
|
|
|
has_disk_ex_ioctls:false,
|
|
|
|
has_buggy_restart_scan:true,
|
|
|
|
has_mandatory_integrity_control:false,
|
|
|
|
needs_logon_sid_in_sid_list:true,
|
|
|
|
needs_count_in_si_lpres2:false,
|
|
|
|
has_recycle_dot_bin:false,
|
|
|
|
has_gaa_prefixes:false,
|
|
|
|
has_gaa_on_link_prefix:false,
|
|
|
|
supports_all_posix_ai_flags:false,
|
2008-02-13 17:42:22 +08:00
|
|
|
has_restricted_stack_args:false,
|
2008-05-16 00:34:01 +08:00
|
|
|
has_transactions:false,
|
2009-01-20 19:16:59 +08:00
|
|
|
has_recvmsg:false,
|
|
|
|
has_sendmsg:false,
|
2009-01-30 04:32:08 +08:00
|
|
|
has_broken_udf:true,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_console_handle_problem:false,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:false,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:false,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:false,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:false,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:false,
|
2011-03-01 08:19:23 +08:00
|
|
|
use_dont_resolve_hack:false,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:false,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:false,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:false,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:false,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:true,
|
2007-07-19 16:33:22 +08:00
|
|
|
};
|
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
|
2007-07-19 16:33:22 +08:00
|
|
|
max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE,
|
2003-09-27 11:44:31 +08:00
|
|
|
is_server:false,
|
* 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-13 01:46:37 +08:00
|
|
|
has_physical_mem_access:true,
|
2007-03-30 00:37:36 +08:00
|
|
|
has_create_global_privilege:false,
|
2004-12-28 09:27:26 +08:00
|
|
|
has_ioctl_storage_get_media_types_ex:true,
|
2005-10-19 02:51:33 +08:00
|
|
|
has_disk_ex_ioctls:true,
|
2006-10-23 23:13:55 +08:00
|
|
|
has_buggy_restart_scan:false,
|
2006-11-08 19:38:05 +08:00
|
|
|
has_mandatory_integrity_control:false,
|
2006-11-27 20:59:59 +08:00
|
|
|
needs_logon_sid_in_sid_list:false,
|
2006-12-05 18:59:21 +08:00
|
|
|
needs_count_in_si_lpres2:false,
|
2006-12-11 00:43:30 +08:00
|
|
|
has_recycle_dot_bin:false,
|
2007-07-19 16:33:22 +08:00
|
|
|
has_gaa_prefixes:false,
|
|
|
|
has_gaa_on_link_prefix:false,
|
|
|
|
supports_all_posix_ai_flags:false,
|
2008-02-13 17:42:22 +08:00
|
|
|
has_restricted_stack_args:false,
|
2008-05-16 00:34:01 +08:00
|
|
|
has_transactions:false,
|
2009-01-20 19:16:59 +08:00
|
|
|
has_recvmsg:true,
|
|
|
|
has_sendmsg:false,
|
2009-01-30 04:32:08 +08:00
|
|
|
has_broken_udf:true,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_console_handle_problem:false,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:false,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:false,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:false,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:false,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:false,
|
2011-03-01 08:19:23 +08:00
|
|
|
use_dont_resolve_hack:true,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:true,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:false,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:false,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:false,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:false,
|
2007-07-19 16:33:22 +08:00
|
|
|
};
|
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
2007-07-19 16:33:22 +08:00
|
|
|
max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE,
|
|
|
|
is_server:false,
|
|
|
|
has_physical_mem_access:true,
|
|
|
|
has_create_global_privilege:false,
|
|
|
|
has_ioctl_storage_get_media_types_ex:true,
|
|
|
|
has_disk_ex_ioctls:true,
|
|
|
|
has_buggy_restart_scan:false,
|
|
|
|
has_mandatory_integrity_control:false,
|
|
|
|
needs_logon_sid_in_sid_list:false,
|
|
|
|
needs_count_in_si_lpres2:false,
|
|
|
|
has_recycle_dot_bin:false,
|
|
|
|
has_gaa_prefixes:true,
|
|
|
|
has_gaa_on_link_prefix:false,
|
|
|
|
supports_all_posix_ai_flags:false,
|
2008-02-13 17:42:22 +08:00
|
|
|
has_restricted_stack_args:false,
|
2008-05-16 00:34:01 +08:00
|
|
|
has_transactions:false,
|
2009-01-20 19:16:59 +08:00
|
|
|
has_recvmsg:true,
|
|
|
|
has_sendmsg:false,
|
2009-01-30 04:32:08 +08:00
|
|
|
has_broken_udf:true,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_console_handle_problem:false,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:false,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:false,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:false,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:false,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:false,
|
2011-03-01 08:19:23 +08:00
|
|
|
use_dont_resolve_hack:true,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:true,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:false,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:false,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:false,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:false,
|
2007-07-19 16:33:22 +08:00
|
|
|
};
|
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
2007-07-19 16:33:22 +08:00
|
|
|
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
|
|
|
|
is_server:false,
|
|
|
|
has_physical_mem_access:true,
|
|
|
|
has_create_global_privilege:true,
|
|
|
|
has_ioctl_storage_get_media_types_ex:true,
|
|
|
|
has_disk_ex_ioctls:true,
|
|
|
|
has_buggy_restart_scan:false,
|
|
|
|
has_mandatory_integrity_control:false,
|
|
|
|
needs_logon_sid_in_sid_list:false,
|
|
|
|
needs_count_in_si_lpres2:false,
|
|
|
|
has_recycle_dot_bin:false,
|
2007-01-22 06:54:05 +08:00
|
|
|
has_gaa_prefixes:true,
|
2007-01-18 03:26:58 +08:00
|
|
|
has_gaa_on_link_prefix:false,
|
2007-02-01 23:54:40 +08:00
|
|
|
supports_all_posix_ai_flags:false,
|
2008-02-13 17:42:22 +08:00
|
|
|
has_restricted_stack_args:false,
|
2008-05-16 00:34:01 +08:00
|
|
|
has_transactions:false,
|
2009-01-20 19:16:59 +08:00
|
|
|
has_recvmsg:true,
|
|
|
|
has_sendmsg:false,
|
2009-01-30 04:32:08 +08:00
|
|
|
has_broken_udf:true,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_console_handle_problem:false,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:false,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:false,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:false,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:false,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:false,
|
2011-03-01 08:19:23 +08:00
|
|
|
use_dont_resolve_hack:true,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:true,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:false,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:false,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:false,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:false,
|
2003-05-20 23:22:09 +08:00
|
|
|
};
|
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
2007-07-19 16:33:22 +08:00
|
|
|
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
|
2011-05-10 23:39:02 +08:00
|
|
|
is_server:false,
|
2006-12-07 00:33:03 +08:00
|
|
|
has_physical_mem_access:false,
|
2007-03-30 00:37:36 +08:00
|
|
|
has_create_global_privilege:true,
|
2004-12-28 09:27:26 +08:00
|
|
|
has_ioctl_storage_get_media_types_ex:true,
|
2005-10-19 02:51:33 +08:00
|
|
|
has_disk_ex_ioctls:true,
|
2006-10-23 23:13:55 +08:00
|
|
|
has_buggy_restart_scan:false,
|
2006-11-08 19:38:05 +08:00
|
|
|
has_mandatory_integrity_control:false,
|
2006-11-27 20:59:59 +08:00
|
|
|
needs_logon_sid_in_sid_list:false,
|
2006-12-05 18:59:21 +08:00
|
|
|
needs_count_in_si_lpres2:false,
|
2006-12-11 00:43:30 +08:00
|
|
|
has_recycle_dot_bin:false,
|
2007-01-18 03:26:58 +08:00
|
|
|
has_gaa_prefixes:true,
|
|
|
|
has_gaa_on_link_prefix:false,
|
2007-02-01 23:54:40 +08:00
|
|
|
supports_all_posix_ai_flags:false,
|
2008-02-13 17:42:22 +08:00
|
|
|
has_restricted_stack_args:true,
|
2008-05-16 00:34:01 +08:00
|
|
|
has_transactions:false,
|
2009-01-20 19:16:59 +08:00
|
|
|
has_recvmsg:true,
|
|
|
|
has_sendmsg:false,
|
2009-01-30 04:32:08 +08:00
|
|
|
has_broken_udf:true,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_console_handle_problem:false,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:false,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:false,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:false,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:false,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:false,
|
2011-03-24 05:33:36 +08:00
|
|
|
use_dont_resolve_hack:true,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:true,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:false,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:true,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:false,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:false,
|
2005-09-29 03:33:18 +08:00
|
|
|
};
|
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
|
2007-07-19 16:33:22 +08:00
|
|
|
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
2007-01-18 03:26:58 +08:00
|
|
|
is_server:false,
|
2006-12-07 00:33:03 +08:00
|
|
|
has_physical_mem_access:false,
|
2007-03-30 00:37:36 +08:00
|
|
|
has_create_global_privilege:true,
|
2005-09-29 03:33:18 +08:00
|
|
|
has_ioctl_storage_get_media_types_ex:true,
|
2005-10-19 02:51:33 +08:00
|
|
|
has_disk_ex_ioctls:true,
|
2006-10-23 23:13:55 +08:00
|
|
|
has_buggy_restart_scan:false,
|
2006-11-08 19:38:05 +08:00
|
|
|
has_mandatory_integrity_control:true,
|
2006-11-27 20:59:59 +08:00
|
|
|
needs_logon_sid_in_sid_list:false,
|
2006-12-05 18:59:21 +08:00
|
|
|
needs_count_in_si_lpres2:true,
|
2006-12-11 00:43:30 +08:00
|
|
|
has_recycle_dot_bin:true,
|
2007-01-18 03:26:58 +08:00
|
|
|
has_gaa_prefixes:true,
|
|
|
|
has_gaa_on_link_prefix:true,
|
2007-02-01 23:54:40 +08:00
|
|
|
supports_all_posix_ai_flags:true,
|
2008-02-13 17:42:22 +08:00
|
|
|
has_restricted_stack_args:false,
|
2008-05-16 00:34:01 +08:00
|
|
|
has_transactions:true,
|
2009-01-20 19:16:59 +08:00
|
|
|
has_recvmsg:true,
|
|
|
|
has_sendmsg:true,
|
2009-01-30 04:32:08 +08:00
|
|
|
has_broken_udf:false,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_console_handle_problem:false,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:false,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:true,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:true,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:true,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:true,
|
2011-03-01 08:19:23 +08:00
|
|
|
use_dont_resolve_hack:false,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:true,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:false,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:false,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:true,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:false,
|
2009-05-09 23:56:37 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|
|
|
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
|
|
|
is_server:false,
|
|
|
|
has_physical_mem_access:false,
|
|
|
|
has_create_global_privilege:true,
|
|
|
|
has_ioctl_storage_get_media_types_ex:true,
|
|
|
|
has_disk_ex_ioctls:true,
|
|
|
|
has_buggy_restart_scan:false,
|
|
|
|
has_mandatory_integrity_control:true,
|
|
|
|
needs_logon_sid_in_sid_list:false,
|
2010-07-15 16:00:52 +08:00
|
|
|
needs_count_in_si_lpres2:false,
|
2009-05-09 23:56:37 +08:00
|
|
|
has_recycle_dot_bin:true,
|
|
|
|
has_gaa_prefixes:true,
|
|
|
|
has_gaa_on_link_prefix:true,
|
|
|
|
supports_all_posix_ai_flags:true,
|
|
|
|
has_restricted_stack_args:false,
|
|
|
|
has_transactions:true,
|
|
|
|
has_recvmsg:true,
|
|
|
|
has_sendmsg:true,
|
|
|
|
has_broken_udf:false,
|
|
|
|
has_console_handle_problem:true,
|
2009-06-26 23:12:06 +08:00
|
|
|
has_broken_alloc_console:true,
|
2009-07-20 23:44:55 +08:00
|
|
|
has_always_all_codepages:true,
|
2010-01-23 06:31:31 +08:00
|
|
|
has_localenames:true,
|
2010-10-09 18:54:13 +08:00
|
|
|
has_fast_cwd:true,
|
2011-01-11 22:50:45 +08:00
|
|
|
has_restricted_raw_disk_access:true,
|
2011-03-01 08:19:23 +08:00
|
|
|
use_dont_resolve_hack:false,
|
2011-05-20 15:23:11 +08:00
|
|
|
has_stack_size_param_is_a_reservation:true,
|
2011-10-16 00:31:57 +08:00
|
|
|
has_console_logon_sid:true,
|
2011-12-19 20:50:35 +08:00
|
|
|
wow64_has_secondary_stack:false,
|
2012-02-17 22:26:18 +08:00
|
|
|
has_program_compatibility_assitant:true,
|
2012-02-22 01:03:51 +08:00
|
|
|
kernel_is_always_casesensitive:false,
|
* 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-13 01:46:37 +08:00
|
|
|
};
|
|
|
|
|
2006-01-11 02:11:32 +08:00
|
|
|
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
|
* 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-13 01:46:37 +08:00
|
|
|
|
|
|
|
void
|
|
|
|
wincapc::init ()
|
|
|
|
{
|
2002-01-29 10:02:03 +08:00
|
|
|
if (caps)
|
|
|
|
return; // already initialized
|
|
|
|
|
2011-05-10 23:39:02 +08:00
|
|
|
GetSystemInfo (&system_info);
|
* 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-13 01:46:37 +08:00
|
|
|
memset (&version, 0, sizeof version);
|
2007-01-22 06:54:05 +08:00
|
|
|
version.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
|
|
|
|
if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version)))
|
Drop NT4 support.
* autoload.cc (DnsQuery_A): Fatal if not available.
(DnsRecordListFree): Ditto.
(DsGetDcNameW): Ditto.
(NetGetAnyDCName): Remove.
(NetGetDCName): Remove.
(EnumProcessModules): Fatal if not available.
(GetModuleFileNameExW): Ditto.
(GetModuleInformation): Ditto.
(GetProcessMemoryInfo): Ditto.
(QueryWorkingSet): Ditto.
(LsaRegisterLogonProcess): Ditto.
* fenv.cc (_feinitialise): Drop supports_sse condition.
* fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment.
(fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition.
(fhandler_disk_file::opendir): Ditto.
* fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment.
* fhandler_proc.cc (format_proc_partitions): Drop NT4-only code.
* fhandler_process.cc (get_process_state): Ditto.
* kernel32.cc (GetWindowsDirectoryW): Remove.
(GetWindowsDirectoryA): Remove.
* miscfuncs.cc (nice_to_winprio): Drop NT4-only code.
* mount.cc (fs_info::update): Fix comments.
* net.cc (get_2k_ifs): Drop NT4-only code.
* sec_auth.cc (get_logon_server): Ditto.
(lsaauth): Drop NT4-specific error handling.
* security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally.
* select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE.
(peek_windows): Drop NT4-only condition in call to PeekMessage.
* syscalls.cc (gethostid): Remove NT4-only workaround.
* wincap.cc: Througout, drop has_dacl_protect,
has_broken_if_oper_status, has_process_io_counters,
has_terminal_services, has_extended_priority_class, has_guid_volumes,
has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from
wincaps.
(wincap_nt4sp4): Remove.
(wincap_minimal): Set to wincap_2000.
(wincapc::init): Rely on availability of OSVERSIONINFOEX structure.
Treat error from GetVersionEx as fatal. Treat NT4 as fatal.
* wincap.h (struct wincaps): Drop has_dacl_protect,
has_broken_if_oper_status, has_process_io_counters,
has_terminal_services, has_extended_priority_class, has_guid_volumes,
has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags
and methods.
* winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW.
(GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
2011-04-04 20:23:36 +08:00
|
|
|
api_fatal ("Cygwin requires at least Windows 2000.");
|
* 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-13 01:46:37 +08:00
|
|
|
|
|
|
|
switch (version.dwPlatformId)
|
|
|
|
{
|
|
|
|
case VER_PLATFORM_WIN32_NT:
|
|
|
|
switch (version.dwMajorVersion)
|
|
|
|
{
|
|
|
|
case 4:
|
Drop NT4 support.
* autoload.cc (DnsQuery_A): Fatal if not available.
(DnsRecordListFree): Ditto.
(DsGetDcNameW): Ditto.
(NetGetAnyDCName): Remove.
(NetGetDCName): Remove.
(EnumProcessModules): Fatal if not available.
(GetModuleFileNameExW): Ditto.
(GetModuleInformation): Ditto.
(GetProcessMemoryInfo): Ditto.
(QueryWorkingSet): Ditto.
(LsaRegisterLogonProcess): Ditto.
* fenv.cc (_feinitialise): Drop supports_sse condition.
* fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment.
(fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition.
(fhandler_disk_file::opendir): Ditto.
* fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment.
* fhandler_proc.cc (format_proc_partitions): Drop NT4-only code.
* fhandler_process.cc (get_process_state): Ditto.
* kernel32.cc (GetWindowsDirectoryW): Remove.
(GetWindowsDirectoryA): Remove.
* miscfuncs.cc (nice_to_winprio): Drop NT4-only code.
* mount.cc (fs_info::update): Fix comments.
* net.cc (get_2k_ifs): Drop NT4-only code.
* sec_auth.cc (get_logon_server): Ditto.
(lsaauth): Drop NT4-specific error handling.
* security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally.
* select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE.
(peek_windows): Drop NT4-only condition in call to PeekMessage.
* syscalls.cc (gethostid): Remove NT4-only workaround.
* wincap.cc: Througout, drop has_dacl_protect,
has_broken_if_oper_status, has_process_io_counters,
has_terminal_services, has_extended_priority_class, has_guid_volumes,
has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from
wincaps.
(wincap_nt4sp4): Remove.
(wincap_minimal): Set to wincap_2000.
(wincapc::init): Rely on availability of OSVERSIONINFOEX structure.
Treat error from GetVersionEx as fatal. Treat NT4 as fatal.
* wincap.h (struct wincaps): Drop has_dacl_protect,
has_broken_if_oper_status, has_process_io_counters,
has_terminal_services, has_extended_priority_class, has_guid_volumes,
has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags
and methods.
* winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW.
(GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
2011-04-04 20:23:36 +08:00
|
|
|
/* I'd be very surprised if this code is ever hit, but it doesn't
|
|
|
|
hurt to keep it. */
|
|
|
|
api_fatal ("Cygwin requires at least Windows 2000.");
|
* 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-13 01:46:37 +08:00
|
|
|
break;
|
|
|
|
case 5:
|
2003-05-20 23:22:09 +08:00
|
|
|
switch (version.dwMinorVersion)
|
2004-05-29 03:50:07 +08:00
|
|
|
{
|
2003-05-20 23:22:09 +08:00
|
|
|
case 0:
|
2007-07-19 16:33:22 +08:00
|
|
|
if (version.wServicePackMajor < 4)
|
|
|
|
caps = &wincap_2000;
|
|
|
|
else
|
|
|
|
caps = &wincap_2000sp4;
|
2003-05-20 23:22:09 +08:00
|
|
|
break;
|
2003-07-26 12:53:59 +08:00
|
|
|
|
2003-05-20 23:22:09 +08:00
|
|
|
case 1:
|
|
|
|
caps = &wincap_xp;
|
2007-07-19 16:33:22 +08:00
|
|
|
switch (version.wServicePackMajor)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
caps = &wincap_xp;
|
|
|
|
case 1:
|
|
|
|
caps = &wincap_xpsp1;
|
|
|
|
default:
|
|
|
|
caps = &wincap_xpsp2;
|
|
|
|
}
|
2003-05-20 23:22:09 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
caps = &wincap_2003;
|
|
|
|
}
|
* 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-13 01:46:37 +08:00
|
|
|
break;
|
2005-09-29 03:33:18 +08:00
|
|
|
case 6:
|
2009-05-09 23:56:37 +08:00
|
|
|
switch (version.dwMinorVersion)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
caps = &wincap_vista;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
caps = &wincap_7;
|
|
|
|
break;
|
|
|
|
}
|
2005-09-29 03:33:18 +08:00
|
|
|
break;
|
* 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-13 01:46:37 +08:00
|
|
|
default:
|
2010-09-26 04:06:21 +08:00
|
|
|
caps = &wincap_minimal;
|
* 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-13 01:46:37 +08:00
|
|
|
break;
|
|
|
|
}
|
2001-11-05 14:09:15 +08:00
|
|
|
break;
|
* 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-13 01:46:37 +08:00
|
|
|
case VER_PLATFORM_WIN32_WINDOWS:
|
2007-02-23 23:15:50 +08:00
|
|
|
/* I'd be very surprised if this code is ever hit, but it doesn't
|
|
|
|
hurt to keep it. */
|
2007-02-21 23:18:07 +08:00
|
|
|
api_fatal ("Windows 95/98/Me are not supported.");
|
2001-11-05 14:09:15 +08:00
|
|
|
break;
|
* 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-13 01:46:37 +08:00
|
|
|
default:
|
2010-09-26 04:06:21 +08:00
|
|
|
caps = &wincap_minimal;
|
* 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-13 01:46:37 +08:00
|
|
|
break;
|
|
|
|
}
|
2003-09-27 11:44:31 +08:00
|
|
|
|
2011-05-10 23:39:02 +08:00
|
|
|
((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION);
|
2009-12-19 04:32:04 +08:00
|
|
|
if (NT_SUCCESS (NtQueryInformationProcess (NtCurrentProcess (),
|
2008-04-28 16:47:06 +08:00
|
|
|
ProcessWow64Information,
|
|
|
|
&wow64, sizeof wow64, NULL))
|
|
|
|
&& !wow64)
|
2008-02-13 17:42:22 +08:00
|
|
|
{
|
2008-04-28 00:12:00 +08:00
|
|
|
((wincaps *)caps)->needs_count_in_si_lpres2 = false;
|
|
|
|
((wincaps *)caps)->has_restricted_stack_args = false;
|
2011-12-19 20:50:35 +08:00
|
|
|
((wincaps *)caps)->wow64_has_secondary_stack = false;
|
2008-02-13 17:42:22 +08:00
|
|
|
}
|
2006-01-11 02:11:32 +08:00
|
|
|
|
2007-12-12 20:12:24 +08:00
|
|
|
__small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion,
|
* 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-13 01:46:37 +08:00
|
|
|
version.dwMinorVersion);
|
|
|
|
}
|