1 /* wincap.h: Header for OS capability class.
3 Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4 2009, 2010, 2011 Red Hat, Inc.
6 This file is part of Cygwin.
8 This software is a copyrighted work licensed under the terms of the
9 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
18 unsigned is_server : 1;
19 unsigned has_physical_mem_access : 1;
20 unsigned has_create_global_privilege : 1;
21 unsigned has_ioctl_storage_get_media_types_ex : 1;
22 unsigned has_disk_ex_ioctls : 1;
23 unsigned has_buggy_restart_scan : 1;
24 unsigned has_mandatory_integrity_control : 1;
25 unsigned needs_logon_sid_in_sid_list : 1;
26 unsigned needs_count_in_si_lpres2 : 1;
27 unsigned has_recycle_dot_bin : 1;
28 unsigned has_gaa_prefixes : 1;
29 unsigned has_gaa_on_link_prefix : 1;
30 unsigned supports_all_posix_ai_flags : 1;
31 unsigned has_restricted_stack_args : 1;
32 unsigned has_transactions : 1;
33 unsigned has_recvmsg : 1;
34 unsigned has_sendmsg : 1;
35 unsigned has_broken_udf : 1;
36 unsigned has_console_handle_problem : 1;
37 unsigned has_broken_alloc_console : 1;
38 unsigned has_always_all_codepages : 1;
39 unsigned has_localenames : 1;
40 unsigned has_fast_cwd : 1;
41 unsigned has_restricted_raw_disk_access : 1;
42 unsigned use_dont_resolve_hack : 1;
43 unsigned has_stack_size_param_is_a_reservation : 1;
44 unsigned has_console_logon_sid : 1;
49 SYSTEM_INFO system_info;
50 OSVERSIONINFOEX version;
58 const DWORD cpu_count () const { return system_info.dwNumberOfProcessors; }
59 const DWORD page_size () const { return system_info.dwPageSize; }
60 const DWORD allocation_granularity () const
61 { return system_info.dwAllocationGranularity; }
62 const char *osname () const { return osnam; }
63 const bool is_wow64 () const { return wow64; }
65 #define IMPLEMENT(cap) cap() const { return ((wincaps *) this->caps)->cap; }
67 DWORD IMPLEMENT (max_sys_priv)
68 bool IMPLEMENT (is_server)
69 bool IMPLEMENT (has_physical_mem_access)
70 bool IMPLEMENT (has_create_global_privilege)
71 bool IMPLEMENT (has_ioctl_storage_get_media_types_ex)
72 bool IMPLEMENT (has_disk_ex_ioctls)
73 bool IMPLEMENT (has_buggy_restart_scan)
74 bool IMPLEMENT (has_mandatory_integrity_control)
75 bool IMPLEMENT (needs_logon_sid_in_sid_list)
76 bool IMPLEMENT (needs_count_in_si_lpres2)
77 bool IMPLEMENT (has_recycle_dot_bin)
78 bool IMPLEMENT (has_gaa_prefixes)
79 bool IMPLEMENT (has_gaa_on_link_prefix)
80 bool IMPLEMENT (supports_all_posix_ai_flags)
81 bool IMPLEMENT (has_restricted_stack_args)
82 bool IMPLEMENT (has_transactions)
83 bool IMPLEMENT (has_recvmsg)
84 bool IMPLEMENT (has_sendmsg)
85 bool IMPLEMENT (has_broken_udf)
86 bool IMPLEMENT (has_console_handle_problem)
87 bool IMPLEMENT (has_broken_alloc_console)
88 bool IMPLEMENT (has_always_all_codepages)
89 bool IMPLEMENT (has_localenames)
90 bool IMPLEMENT (has_fast_cwd)
91 bool IMPLEMENT (has_restricted_raw_disk_access)
92 bool IMPLEMENT (use_dont_resolve_hack)
93 bool IMPLEMENT (has_stack_size_param_is_a_reservation)
94 bool IMPLEMENT (has_console_logon_sid)
99 extern wincapc wincap;
101 #endif /* _WINCAP_H */