summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/wincap.cc
Commit message (Collapse)AuthorAgeFilesLines
* * uinfo.cc (cygheap_user::init): Fix formatting in debug output.Corinna Vinschen2014-05-081-1/+6
| | | | | | | | (struct cyg_USER_INFO_24): Define temporarily. Explain why. (pwdgrp::fetch_account_from_windows): Handle sane primary group setting for Microsoft Accounts. Explain why. * wincap.h (wincaps::has_microsoft_accounts): New element. * wincap.cc: Implement above element throughout.
* * ntdll.h (RtlGetVersion): Declare.Corinna Vinschen2013-11-191-2/+2
| | | | | | | * wincap.cc (wincapc::init): Rather than GetVersionEx, call RtlGetVersion which is not crippled by missing Windows 8.1 manifest. * wincap.h (wincapc): Change type of version to RTL_OSVERSIONINFOEXW. Align formatting of all class members.
* * wincap.cc (wincapc::init): Revert previous change. It's not working.Corinna Vinschen2013-11-191-9/+0
|
* * wincap.cc (wincapc::init): Fix dwMinorVersion for Windows 8.1 andCorinna Vinschen2013-11-191-0/+9
| | | | Server 2012. Explain why this is necessary.
* * autoload.cc (GetSystemTimePreciseAsFileTime): Define.Corinna Vinschen2013-06-141-0/+5
| | | | | | | | | | * times.cc (GetSystemTimePreciseAsFileTime): Temporarily declare here to workaround missing definition in 32 bit w32api headers. (get_system_time): New always inline function to call either GetSystemTimePreciseAsFileTime or GetSystemTimeAsFileTime on a per OS basis. Call throughout instead of GetSystemTimeAsFileTime. * wincap.h (wincaps::has_precise_system_time): New element. * wincap.cc: Implement above element throughout.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-212/+11
|
* * cygthread.cc (cygthread::terminate_thread): Only try to freeCorinna Vinschen2013-03-291-1/+10
| | | | | | thread stack on systems not freeing it by themselves. * wincap.h (wincaps::terminate_thread_frees_stack): New element. * wincap.cc: Implement above element throughout.
* Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor2013-01-211-2/+2
| | | | checkins. Regularize copyright format.
* * wincap.cc (wincapc::init): Drop memset call since it can result inCorinna Vinschen2012-07-241-53/+33
| | | | | a race condition. Drop all considerations for pre-Windows 2000 systems since Cygwin won't start on them anyway.
* * net.cc (get_adapters_addresses): Only create thread on affectedCorinna Vinschen2012-05-031-1/+48
| | | | | | | | | systems. Change comment acordingly. * wincap.h (wincaps::has_gaa_largeaddress_bug): New element. * wincap.cc: Implement above element throughout. (wincap_8): New globale wincaps to support Windows 8. (wincapc::init): Take Windows 8 into account. Set new has_gaa_largeaddress_bug member to false on 32 bit systems.
* wincap.h: Rename assitant to assistant throughout. wincap.cc: Ditto.Christopher Faylor2012-04-151-8/+8
| | | | | | | | | | | | | * devices.in (exists_console): Use fhandler_console::exists () rather than raw test. * devices.cc: Regenerate. * fhandler.h (fhandler_console::exists): Define new function. * fhandler_console.cc (fhandler_console::need_invisible): Use fhandler_console::exists () rather than raw test. * spawn.cc: Rename assitant to assistant throughout. (child_info_spawn::worker): Simplify test for when to start a non-Cygwin process in its own process group. Just do it whenever we start a non-Cygwin process.
* * shared.cc (shared_info::init_obcaseinsensitive): Check actual stateCorinna Vinschen2012-02-211-0/+8
| | | | | | of case sensitivity on post-Windows 2000 systems. * wincap.h (wincaps::kernel_is_always_casesensitive): New element. * wincap.cc: Implement above element throughout.
* * ntdll.h (struct _PEB): Add EnvironmentUpdateCount member.Corinna Vinschen2012-02-171-1/+9
| | | | | | | * spawn.cc (child_info_spawn::worker): Speed up job recognition. Expand comment to explain every little detail and so we never forget. * wincap.h (wincaps::has_program_compatibility_assitant): New element. * wincap.cc: Implement above element throughout.
* * dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stackCorinna Vinschen2011-12-191-0/+9
| | | | | | | | | | | | | | | rather than for wincap.is_wow64. Accommodate name change from wow64_has_64bit_parent to wow64_needs_stack_adjustment. Align comment. (_dll_crt0): Ditto. * wincap.h (wincaps::wow64_has_secondary_stack): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Set wow64_has_secondary_stack to false on non-64 bit systems. * wow64.cc (wow64_needs_stack_adjustment): Rename (hopefully the last time) from wow64_has_64bit_parent. (wow64_eval_expected_main_stack): Fix comment to reflect real life. (wow64_test_for_64bit_parent): Fix comment. * wow64.h (wow64_needs_stack_adjustment): Accommodate new name.
* * sec_auth.cc (get_token_group_sidlist): Add CONSOLE LOGON SID onCorinna Vinschen2011-10-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | systems supporting it. Never add SERVICE SID but keep code in for future reference. Explain why. (get_priv_list): Add cygpsid pointer parameter. Point it to the mandatory integrity SID which matches account and privileges. (create_token): Fetch mandatory integrity SID from call to get_priv_list. (lsaauth): Call get_priv_list with additional NULL pointer. Change comment accordingly. * sec_helper.cc (well_known_console_logon_sid): New static SID. (cygpriv): Change to structure containing extra flag to store info about required integrity level. (privilege_luid): Accommodate changes to cygpriv. Return integrity level in new high_integrity parameter. (privilege_name): Accommodate changes to cygpriv. (set_privilege): Drop trailing \n from debug output. (set_cygwin_privileges): Don't set SE_CREATE_GLOBAL_PRIVILEGE anymore since it's just not needed, but keep code in for future reference. Change comment accordingly. * security.h (well_known_console_logon_sid): Declare. (privilege_luid): Align declaration to above change. * wincap.h (wincaps::has_console_logon_sid): New element. * wincap.cc: Implement above element throughout.
* * cygthread.cc (cygthread::async_create): Define new function.Christopher Faylor2011-07-301-10/+0
| | | | | | | | | | | * cygthread.h (cygthread::create): Use correct regparm. (cygthread::standalone): Delete from class and from all constructors. (cygthread::cygthread): Use three only arguments for detached threads, and start the thread via QueueUserAPC/async_create. * dcrt0.cc (dll_crt0_0): Remove handling for wincap.has_buggy_thread_startup. (dll_crt0_1): Ditto. * wincap.cc: Ditto throughout. * wincap.h: Ditto.
* * child_info.h (CURR_CHILD_INFO_MAGIC): Update.Corinna Vinschen2011-05-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (class child_info_fork): Remove stacksize, add stackaddr and guardsize members. * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Partial rewrite to regenerate the stack exactly as in the parent. (child_info_fork::alloc_stack): Set stackaddr to 0, rather than stacksize. (dll_crt0_1): Check for stackaddr before changing the stack addresses in the TEB. * fork.cc (frok::child): Check for stackaddr here. (frok::parent): Set ch.stackaddr and ch.guardsize if not called from the main thread. * init.cc (dll_entry): Replace pointer to NT_TIB with pointer to TEB. Fix incorrectly changed address test before removing _my_tls. Set StackLimit to NULL on Windows 2000. Explain why. * miscfuncs.cc (struct thread_wrapper_arg): Store stackbase rather than stacksize, store commitaddr, remove guardsize. Store all pointers as char * for easier address arithmetic. (thread_wrapper): Rewrite to remove OS stack before calling thread function. Add lots of comments to explain what we do. (CygwinCreateThread): Reserve our own stack in case we got no application stack. Add comments. * ntdll.h (struct _TEB): Extend defintion up to DeallocationStack member. * thread.cc (pthread_attr::pthread_attr): Use "(size_t) -1" rather then 0xffffffff. * wincap.h (wincaps::has_stack_size_param_is_a_reservation): New element. * wincap.cc: Implement above element throughout.
* * heap.cc (heap_init): Rewrite initial heap allocation to use addressesCorinna Vinschen2011-05-161-8/+0
| | | | | | | | | | beyond 0x20000000. Explain why and how. * shared.cc (shared_info::heap_slop_size): Remove. * shared_info.h (class shared_info): Remove heap_slop_inited and heap_slop members. Remove heap_slop_size declaration. (CURR_SHARED_MAGIC): Update. * wincap.cc: Throughout, drop heapslop. * wincap.h (struct wincaps): Drop heapslop.
* * fhandler_proc.cc (format_proc_uptime): Don't call GetSystemInfo.Corinna Vinschen2011-05-101-3/+3
| | | | | | | | | | | | | | | Fetch CPU count from wincap. (format_proc_stat): Ditto. * globals.cc (system_info): Move to wincap. * heap.cc (heap_init): Fetch page size from wincap. * syscalls.cc (getpagesize): Fetch allocation granularity from wincap. (getsystempagesize): Fetch page size from wincap. * wincap.cc (wincap_2003): Default is_server to false. (wincapc::init): Call GetSystemInfo here. Always set is_server value. * wincap.h (class wincapc): Add system_info as private member. (wincapc::cpu_count): New public method. (wincapc::page_size): Ditto. (wincapc::allocation_granularity): Ditto.
* * environ.cc (set_chunksize): Remove.Corinna Vinschen2011-05-101-14/+0
| | | | | | | | | (parse_thing): Remove forkchunk entry. * fork.cc (child_copy): Drop handling external chunksize setting. * wincap.cc: Througout, drop chunksize. (wincapc::set_chunksize): Remove. * wincap.h (struct wincaps): Drop chunksize and declaration of set_chunksize.
* * autoload.cc (GetSecurityInfo): Remove.Corinna Vinschen2011-04-281-8/+0
| | | | | | | | | | | | | | | | * ntdll.h (RtlConvertToAutoInheritSecurityObject): Declare. (RtlDeleteSecurityObject): Declare. (RtlGetControlSecurityDescriptor): Declare. (RtlLengthSecurityDescriptor): Declare. * security.cc (file_mapping): New global variable. (get_file_sd): Rewrite. Clean up code. Get rid of GetSecurityInfo call. (alloc_sd): Call RtlSetControlSecurityDescriptor to set SE_DACL_PROTECTED flag. (check_file_access): Remove mapping. Use file_mapping instead. (check_registry_access): Rename mapping to reg_mapping. * wincap.cc: Througout, drop use_get_sec_info_on_dirs, * wincap.h (struct wincaps): Drop use_get_sec_info_on_dirs.
* Drop NT4 support.Corinna Vinschen2011-04-041-127/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * autoload.cc (GetExtendedTcpTable): Remove.Corinna Vinschen2011-04-021-17/+1
| | | | | | | | | | | | | (GetTcpTable): Remove. (CharNextExA): Remove. (FindWindowA): Remove. (ShowWindowAsync): Remove. * dcrt0.cc (disable_dep): Remove unused function. (dll_crt0_0): Drop comment babbling about TS & DEP. * fhandler_socket.cc (address_in_use): Remove unused function. * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps. (wincapc::init): Drop code setting ts_has_dep_problem flag. * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
* * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.Christopher Faylor2011-03-231-1/+1
|
* * fenv.cc (_feinitialise); Don't use SSE instructions on systems notCorinna Vinschen2011-03-201-0/+9
| | | | | | supporting them. * wincap.h (wincaps::supports_sse): New element. * wincap.cc: Implement above element throughout.
* * fhandler.cc (fhandler_base::open): When creating a file on aCorinna Vinschen2011-03-081-0/+9
| | | | | | | | | | | | | | | filesystem supporting ACLs, create the file with WRITE_DAC access. Explain why. * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for directories. * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets. * path.cc (symlink_worker): Ditto for symlinks. * security.cc (get_file_sd): Always call GetSecurityInfo for directories on XP and Server 2003. Improve comment to explain why. (set_file_attribute): Explicitely cast mode_t value to bool in call to get_file_sd. * wincap.h (wincaps::use_get_sec_info_on_dirs): New element. * wincap.cc: Implement above element throughout.
* * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack onChristopher Faylor2011-03-011-0/+9
| | | | | | systems which need it. * wincap.cc (use_dont_resolve_hack): Set as appropriate. * wincap.h (use_dont_resolve_hack): Define.
* * fhandler_socket.cc (address_in_use): Disable. Add comment.Corinna Vinschen2011-01-301-9/+0
| | | | | | | | | | | (fhandler_socket::bind): Change comment to explain setting the SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for address in use. * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve comment to compensate for the deleted comment in fhandler_socket::bind. * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps. * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags and method.
* * fhandler.h (MAX_PARTITIONS): New definition.Corinna Vinschen2011-01-111-1/+10
| | | | | | | | | | | | | | | (class fhandler_dev_floppy): Add partitions array member. Add close method. * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero out partitions array. (fhandler_dev_floppy::open): Fix "entire disk" condition for call to DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO). When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME) on all affected disk partitions starting with Vista. (fhandler_dev_floppy::close): New method. (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any. * wincap.h (wincaps::has_restricted_raw_disk_access): New element. * wincap.cc: Implement above element throughout.
* * cygheap.h (cwdstuff::override_win32_cwd): Declare.Corinna Vinschen2010-10-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * ntdll.h (struct _PEB): Add members accessed by the fast cwd method starting with Vista. (struct _KUSER_SHARED_DATA): Define with only the DismountCount. (RtlAllocateHeap): Declare. (RtlEnterCriticalSection): Declare. (RtlFreeHeap): Declare. (RtlLeaveCriticalSection): Declare. * path.cc (get_user_proc_parms): Remove. (struct _FAST_CWD): New structure. (fast_cwd_ptr): Define. (SharedUserData): Define. (peek32): Define. (find_fast_cwd_pointers): New function to find the global pointer to the current FAST_CWD structure. (copy_cwd_str): New helper function. (cwdstuff::override_win32_cwd): New method to set the Win32 CWD. (cwdstuff::init): Just call override_win32_cwd from here when started from native Win32 parent. (cwdstuff::set): Access Win32 CWD via PEB reference instead of using get_user_proc_parms function. Memorize old DismountCount before opening directory handle. Call override_win32_cwd to set up Win32 CWD. Be more verbose in comments. * wincap.h (wincaps::has_fast_cwd): New element. * wincap.cc: Implement has_fast_cwd element throughout.
* * fhandler_socket.cc (fhandler_socket::bind): Drop has_exclusiveaddruseCorinna Vinschen2010-09-251-118/+6
| | | | | | | | | | | | | | | | | | | | | | condition. Fix comment about availability. Move remaining comment to the right spot. Drop has_ip_helper_lib condition. * net.cc (cygwin_setsockopt): Drop has_disabled_user_tos_setting condition. Fix comment. (get_2k_ifs): Fix comment. (get_nt_ifs): Remove. (getifaddrs): Drop call to get_nt_ifs. (get_ifconf): Ditto. * wincap.cc: Throughout, drop has_ip_helper_lib, has_disabled_user_tos_setting, and has_exclusiveaddruse settings from wincaps. (wincap_unknown): Remove. (wincap_nt4): Remove. (wincap_minimal): New macro, set to wincap_nt4sp4 for now. (wincapc::init): Drop test for pre-SP4 NT4. Just imply at least NT SP4. Replace references to wincap_unknown with references to wincap_minimal. * wincap.h (struct wincaps): Drop has_ip_helper_lib, has_disabled_user_tos_setting, and has_exclusiveaddruse flags and methods.
* * wincap.h (wincaps::has_buggy_thread_startup): Declare.Christopher Faylor2010-09-191-0/+13
| | | | | | | | | | | | | | (wincapc::has_buggy_thread_startup): Ditto. * wincap.cc::wincap_*): Accommodate has_buggy_thread_startup. (wincapc::init): Explicitly turn off has_buggy_thread_startup if not WOW64. * cygthread.h (cygthread::thread_handle): Declare/define new method. * dcrt0.cc (_dll_crt0): Don't call __sinit here. (dll_crt0_0): Don't call sigproc_init during initialization if wincap.has_buggy_thread_startup(). (dll_crt0_1): Defer sigproc_init to here when wincap.has_buggy_thread_startup(). Call __sinit after we've determined that we're not forking. (__main): Rework comments. Add potential future reminder.
* * autoload.cc (MsgWaitForMultipleObjectsEx): Define.Corinna Vinschen2010-08-301-0/+11
| | | | | | | | | | (MsgWaitForMultipleObjects): Remove. * select.cc (select_stuff::wait): Use MsgWaitForMultipleObjectsEx with QS_ALLPOSTMESSAGE and, if possible, MWMO_INPUTAVAILABLE flags. Explain why. Fix a potential crash due to a NULL pointer in WAIT_FAILED case. (peek_windows): Use filter pattern on NT4. Explain why. * wincap.h (wincaps::has_mwmo_inputavailable): New element. * wincap.cc: Implement above element throughout.
* * wincap.cc (wincap_7): Set needs_count_in_si_lpres2 to false.Corinna Vinschen2010-07-151-1/+1
|
* * Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.Corinna Vinschen2010-01-221-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | * autoload.cc (LocaleNameToLCID): Define. * cygwin.din (strfmon): Export. * nlsfuncs.cc: New file. Define a lot of internal functions called from setlocale. (wcscoll): Implement locale-aware here, using CompareStringW function. (strcoll): Ditto. (wcsxfrm): Implement locale-aware here, usingLCMapStringW function. (strxfrm): Ditto. (__set_charset_from_locale): Replace __set_charset_from_codepage. Return Linux-compatible charset. * strfuncs.cc (__set_charset_from_codepage): Remove. * wchar.h (__set_charset_from_codepage): Drop definition. * wincap.h (wincaps::has_localenames): New element. * wincap.cc: Implement above element throughout. * libc/strfmon.c: New file. * libc/strptime.cc: Remove locale constant strings in favor of access to locale-specifc data. (strptime): Point _CurrentTimeLocale to locale-specific data. Throughout use correct locale-specific format fields for all locale-specific formats. * include/monetary.h: New file. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcessCorinna Vinschen2009-12-181-1/+1
| | | | | | | | | | | | according to context. Throughout, replace hMainThread with GetCurrentThread/NtCurrentThread according to context. * dcrt0.cc (dll_crt0_0): Drop duplication of GetCurrentProcess to hMainProc. Drop duplication of GetCurrentThread to hMainThread. * dtable.cc (dtable::stdio_init): Remove useless comment. * globals.cc (hMainProc): Remove. (hMainThread): Remove. * ntdll.h (NtCurrentProcess): Define. (NtCurrentThread: Define.
* * security.cc (alloc_sd): Re-introduce setting the SE_DACL_PROTECTEDCorinna Vinschen2009-11-031-0/+11
| | | | | | | flag. Remove INHERITED_ACE flag from all inherited ACEs. Add comment. Fix ace_off counter in unrelated ACE loop. * wincap.cc: Re-add has_dacl_protect throughout. * wincap.h: Ditto.
* * fhandler.cc (fhandler_base::open): Always create file with defaultCorinna Vinschen2009-10-241-11/+0
| | | | | | | | security descriptor and fix descriptor afterwards. Change comment to explain why. * security.cc (alloc_sd): Drop setting the SE_DACL_PROTECTED flag. * wincap.cc: Remove has_dacl_protect throughout. * wincap.h: Ditto.
* * dtable.cc (dtable::init_std_file_from_handle): Fix comment toCorinna Vinschen2009-08-081-1/+0
| | | | | | document change in the Windows 7 workaround. * wincap.cc (wincapc::init): Don't set has_console_handle_problem to false on 32 bit systems.
* * wincap.h (wincaps::has_always_all_codepages): New element.Corinna Vinschen2009-07-201-0/+11
| | | | | | | | | | | | | | | * wincap.cc: Implement above element throughout. * wchar.h (__sjis_mbtowc): Declare. (__eucjp_mbtowc): Ditto. (__gbk_mbtowc): Ditto. (__kr_mbtowc): Ditto. (__big5_mbtowc): Ditto. * syscalls.cc (internal_setlocale): Convert to char * function. Return parameter by default. Return NULL if request to use a charset can't be satisfied due to missing codepage support in the underlying OS. Fix comment. (setlocale): Store original locale. Restore to original locale if internal_setlocale returns NULL.
* * wincap.h (wincaps::has_broken_alloc_console): New element.Corinna Vinschen2009-06-261-0/+11
| | | | * wincap.cc: Implement above element throughout.
* * dtable.cc (dtable::init_std_file_from_handle): Add workaround forCorinna Vinschen2009-05-091-1/+57
| | | | | | | | | | | Windows 7 64 bit issue. Add lengthy comment to explain what happens. * wincap.h (wincaps::has_console_handle_problem): New element. * wincap.cc: Implement above element throughout. (wincap_7): New wincaps structure for NT 6.1 kernels. (wincapc::init): Set has_console_handle_problem to false for 32 bit systems. Fix broken older ChangeLog entry.
* * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode numberCorinna Vinschen2009-01-291-0/+10
| | | | | | | | | | | | | | evaluation for faked "." entry. * mount.cc (fs_info::update): Move setting of is_cdrom after checking for caseinsensitivity. Recognize UDF in is_cdrom case and set caseinsensitive flag according to UDF brokenness determined by OS. Add comment to explain why. * mount.h (class fs_info): Add is_udf status flag. * path.cc (symlink_info::check): Add workaround for UDF bug in terms of casesensitivity on certain OSes. * wincap.h (wincaps::has_broken_udf): New element. (wincaps::has_broken_udf): New element
* * autoload.cc (WSAIoctl): Reintroduce.Corinna Vinschen2009-01-201-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (WSASendMsg): Define. * fhandler.h (class fhandler_socket): Change definition of recv_internal and send_internal to take WSAMSG pointer as parameter. * fhandler_socket.cc (WSAID_WSARECVMSG): Define. (LPFN_WSARECVMSG): Define. (WSASendMsg): Declare. (get_ext_funcptr): New function to fetch address of WSARecvMsg. (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter. Change code accordingly. If control information is requested, fetch address of WSARecvMsg and use that instead of WSARecvFrom. (fhandler_socket::recvfrom): Change return type to ssize_t as declared in fhandler.h. Accommodate changes to recv_internal. (fhandler_socket::recvmsg): Ditto. Make sure that control information is only requested if system, address family, and socket type support it. (fhandler_socket::send_internal): Take just a LPWSAMSG parameter and the flags. Change code accordingly. If control information is provided, use WSASendMsg instead of WSASendTo. (fhandler_socket::sendto): Drop useless comment. Accommodate changes to send_internal. (fhandler_socket::sendmsg): Ditto. Make sure that control information is only provided if system, address family, and socket type support it. * wincap.h (wincaps::has_recvmsg): New element. (wincaps::has_sendmsg): New element * wincap.cc: Implement above elements throughout. * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment of type struct cmsghdr.
* * autoload.cc (GetSystemDEPPolicy): Define.Corinna Vinschen2008-11-121-2/+18
| | | | | | | | | | | | | (GetProcessDEPPolicy): Ditto. (SetProcessDEPPolicy): Ditto. * dcrt0.cc (disable_dep): New static function. (dll_crt0_0): Call disable_dep on platforms requiring it. Add longish comment to explain the circumstances. * wincap.h (wincaps::ts_has_dep_problem): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Set ts_has_dep_problem to true on 2008 Terminal Servers. * winsup.h (WINVER): Set to 0x0601.
* * wincap.cc (all wincaps): Store in .cygwin_dll_common section same asCorinna Vinschen2008-10-231-10/+16
| | | | wincap. Add comment to explain why.
* * fhandler_socket.cc (fhandler_socket::bind): Don't run explicitCorinna Vinschen2008-07-081-0/+10
| | | | | | | | | | local socket test in SO_REUSEADDR case on systems supporting enhanced socket security. Explain why. Only call address_in_use for AF_INET sockets. * net.cc (cygwin_setsockopt): Don't call setsockopt to set SO_REUSEADDR on systems supporting enhanced socket security. Add comment. * wincap.h (wincaps::has_enhanced_socket_security): New element. * wincap.cc: Implement above element throughout.
* * autoload.cc (LoadDLLfuncNt): Re-invent.Corinna Vinschen2008-05-151-0/+10
| | | | | | | | | | | | | | | | | | | | | (NtCreateTransaction): Define. (NtCommitTransaction): Define. (NtRollbackTransaction): Define. (RtlGetCurrentTransaction): Define. (RtlSetCurrentTransaction): Define. * ntdll.h (TRANSACTION_ALL_ACCESS): Define. (NtCreateTransaction): Declare. (NtCommitTransaction): Declare. (NtRollbackTransaction): Declare. (RtlGetCurrentTransaction): Declare. (RtlSetCurrentTransaction): Declare. * syscalls.cc (start_transaction): New static function to start TxF transaction. (stop_transaction): New static function to end TxF transaction. (rename): Call start_transaction and stop_transaction where appropriate on systems supporting transactions. * wincap.h (wincaps::has_transactions): New element. * wincap.cc: Implement above element throughout.
* * autoload.cc (IsWow64Process): Remove.Corinna Vinschen2008-04-281-1/+5
| | | | | | | | | | (Wow64DisableWow64FsRedirection): Remove. (Wow64RevertWow64FsRedirection): Remove. * ntdll.h (enum _PROCESSINFOCLASS): Define ProcessWow64Information. * init.cc (respawn_wow64_process): Use NtQueryInformationProcess to get WOW64 state. * wincap.cc (wincapc::init): Ditto. * wincap.h (wincapc::wow64): Change type to ULONG.
* * wincap.h (wincapc::wow64): Change type to BOOL.Corinna Vinschen2008-04-271-8/+5
| | | | | * wincap.cc: Remove explicit use of this pointer in wincapc methods. (wincapc::init): Fix bug in IsWow64Process handling.