From bc455088cf4f3164f30d36c78dd67a830ac43a3a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 21 Feb 2007 15:18:07 +0000 Subject: [PATCH] * wincap.cc (wincap_unknown): Change settings for unknown to reflect the capabilities of NT4. (wincap_95): Remove. (wincap_95osr2): Remove. (wincap_98): Remove. (wincap_98se): Remove. (wincap_me): Remove. (wincap_nt3): Remove. (wincapc::init): Temporarily bail out on any 9x system. --- winsup/cygwin/ChangeLog | 12 ++ winsup/cygwin/wincap.cc | 436 +--------------------------------------- 2 files changed, 19 insertions(+), 429 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5e427adb0..5f0a93db2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,15 @@ +2007-02-21 Corinna Vinschen + + * wincap.cc (wincap_unknown): Change settings for unknown to reflect + the capabilities of NT4. + (wincap_95): Remove. + (wincap_95osr2): Remove. + (wincap_98): Remove. + (wincap_98se): Remove. + (wincap_me): Remove. + (wincap_nt3): Remove. + (wincapc::init): Temporarily bail out on any 9x system. + 2007-02-20 Corinna Vinschen * cygwin.din (sem_unlink): Export. diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index b26c78f84..fca0b7566 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -11,403 +11,8 @@ details. */ #include "winsup.h" +/* Minimal set of capabilities which is equivalent to NT4. */ static NO_COPY wincaps wincap_unknown = { - lock_file_highword:0x0, - chunksize:0x0, - heapslop:0x0, - shared:FILE_SHARE_READ | FILE_SHARE_WRITE, - is_winnt:false, - is_server:false, - access_denied_on_delete:false, - has_delete_on_close:false, - has_page_guard:false, - has_security:false, - has_security_descriptor_control:false, - has_get_process_times:false, - has_lseek_bug:false, - has_lock_file_ex:false, - has_signal_object_and_wait:false, - has_eventlog:false, - has_ip_helper_lib:false, - has_set_handle_information:false, - has_set_handle_information_on_console_handles:false, - supports_smp:false, - map_view_of_file_ex_sucks:false, - altgr_is_ctrl_alt:false, - has_physical_mem_access:false, - has_working_copy_on_write:false, - share_mmaps_only_by_name:false, - virtual_protect_works_on_shared_pages:false, - has_mmap_alignment_bug:false, - has_hard_links:false, - can_open_directories:false, - has_move_file_ex:false, - has_negative_pids:false, - has_unreliable_pipes:false, - has_named_pipes:false, - has_try_enter_critical_section:false, - has_raw_devices:false, - has_valid_processorlevel:false, - has_64bit_file_access:false, - has_process_io_counters:false, - supports_reading_modem_output_lines:false, - needs_memory_protection:false, - pty_needs_alloc_console:false, - has_terminal_services:false, - has_switch_to_thread:false, - cant_debug_dll_entry:false, - has_ioctl_storage_get_media_types_ex:false, - start_proc_suspended:true, - has_extended_priority_class:false, - has_guid_volumes:false, - detect_win16_exe:true, - has_null_console_handler_routine:false, - has_disk_ex_ioctls:false, - has_working_virtual_lock:false, - has_disabled_user_tos_setting:false, - has_fileid_dirinfo:false, - has_exclusiveaddruse:false, - 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:false, - has_gaa_on_link_prefix:false, - supports_all_posix_ai_flags:false, -}; - -static NO_COPY wincaps wincap_95 = { - lock_file_highword:0x0, - chunksize:32 * 1024 * 1024, - heapslop:0x0, - shared:FILE_SHARE_READ | FILE_SHARE_WRITE, - is_winnt:false, - is_server:false, - access_denied_on_delete:true, - has_delete_on_close:false, - has_page_guard:false, - has_security:false, - has_security_descriptor_control:false, - has_get_process_times:false, - has_lseek_bug:true, - has_lock_file_ex:false, - has_signal_object_and_wait:false, - has_eventlog:false, - has_ip_helper_lib:false, - has_set_handle_information:false, - has_set_handle_information_on_console_handles:false, - supports_smp:false, - map_view_of_file_ex_sucks:true, - altgr_is_ctrl_alt:false, - has_physical_mem_access:false, - has_working_copy_on_write:false, - share_mmaps_only_by_name:true, - virtual_protect_works_on_shared_pages:false, - has_mmap_alignment_bug:false, - has_hard_links:false, - can_open_directories:false, - has_move_file_ex:false, - has_negative_pids:true, - has_unreliable_pipes:true, - has_named_pipes:false, - has_try_enter_critical_section:false, - has_raw_devices:false, - has_valid_processorlevel:false, - has_64bit_file_access:false, - has_process_io_counters:false, - supports_reading_modem_output_lines:false, - needs_memory_protection:false, - pty_needs_alloc_console:false, - has_terminal_services:false, - has_switch_to_thread:false, - cant_debug_dll_entry:true, - has_ioctl_storage_get_media_types_ex:false, - start_proc_suspended:true, - has_extended_priority_class:false, - has_guid_volumes:false, - detect_win16_exe:true, - has_null_console_handler_routine:false, - has_disk_ex_ioctls:false, - has_working_virtual_lock:false, - has_disabled_user_tos_setting:false, - has_fileid_dirinfo:false, - has_exclusiveaddruse:false, - 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:false, - has_gaa_on_link_prefix:false, - supports_all_posix_ai_flags:false, -}; - -static NO_COPY wincaps wincap_95osr2 = { - lock_file_highword:0x0, - chunksize:32 * 1024 * 1024, - heapslop:0x0, - shared:FILE_SHARE_READ | FILE_SHARE_WRITE, - is_winnt:false, - is_server:false, - access_denied_on_delete:true, - has_delete_on_close:false, - has_page_guard:false, - has_security:false, - has_security_descriptor_control:false, - has_get_process_times:false, - has_lseek_bug:true, - has_lock_file_ex:false, - has_signal_object_and_wait:false, - has_eventlog:false, - has_ip_helper_lib:false, - has_set_handle_information:false, - has_set_handle_information_on_console_handles:false, - supports_smp:false, - map_view_of_file_ex_sucks:true, - altgr_is_ctrl_alt:false, - has_physical_mem_access:false, - has_working_copy_on_write:false, - share_mmaps_only_by_name:true, - virtual_protect_works_on_shared_pages:false, - has_mmap_alignment_bug:false, - has_hard_links:false, - can_open_directories:false, - has_move_file_ex:false, - has_negative_pids:true, - has_unreliable_pipes:true, - has_named_pipes:false, - has_try_enter_critical_section:false, - has_raw_devices:false, - has_valid_processorlevel:false, - has_64bit_file_access:false, - has_process_io_counters:false, - supports_reading_modem_output_lines:false, - needs_memory_protection:false, - pty_needs_alloc_console:false, - has_terminal_services:false, - has_switch_to_thread:false, - cant_debug_dll_entry:true, - has_ioctl_storage_get_media_types_ex:false, - start_proc_suspended:true, - has_extended_priority_class:false, - has_guid_volumes:false, - detect_win16_exe:true, - has_null_console_handler_routine:false, - has_disk_ex_ioctls:false, - has_working_virtual_lock:false, - has_disabled_user_tos_setting:false, - has_fileid_dirinfo:false, - has_exclusiveaddruse:false, - 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:false, - has_gaa_on_link_prefix:false, - supports_all_posix_ai_flags:false, -}; - -static NO_COPY wincaps wincap_98 = { - lock_file_highword:0x0, - chunksize:32 * 1024 * 1024, - heapslop:0x0, - shared:FILE_SHARE_READ | FILE_SHARE_WRITE, - is_winnt:false, - is_server:false, - access_denied_on_delete:true, - has_delete_on_close:false, - has_page_guard:false, - has_security:false, - has_security_descriptor_control:false, - has_get_process_times:false, - has_lseek_bug:true, - has_lock_file_ex:false, - has_signal_object_and_wait:false, - has_eventlog:false, - has_ip_helper_lib:true, - has_set_handle_information:false, - has_set_handle_information_on_console_handles:false, - supports_smp:false, - map_view_of_file_ex_sucks:true, - altgr_is_ctrl_alt:false, - has_physical_mem_access:false, - has_working_copy_on_write:false, - share_mmaps_only_by_name:true, - virtual_protect_works_on_shared_pages:false, - has_mmap_alignment_bug:true, - has_hard_links:false, - can_open_directories:false, - has_move_file_ex:false, - has_negative_pids:true, - has_unreliable_pipes:true, - has_named_pipes:false, - has_try_enter_critical_section:false, - has_raw_devices:false, - has_valid_processorlevel:true, - has_64bit_file_access:false, - has_process_io_counters:false, - supports_reading_modem_output_lines:false, - needs_memory_protection:false, - pty_needs_alloc_console:false, - has_terminal_services:false, - has_switch_to_thread:false, - cant_debug_dll_entry:true, - has_ioctl_storage_get_media_types_ex:false, - start_proc_suspended:true, - has_extended_priority_class:false, - has_guid_volumes:false, - detect_win16_exe:true, - has_null_console_handler_routine:false, - has_disk_ex_ioctls:false, - has_working_virtual_lock:false, - has_disabled_user_tos_setting:false, - has_fileid_dirinfo:false, - has_exclusiveaddruse:false, - 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:false, - has_gaa_on_link_prefix:false, - supports_all_posix_ai_flags:false, -}; - -static NO_COPY wincaps wincap_98se = { - lock_file_highword:0x0, - chunksize:32 * 1024 * 1024, - heapslop:0x0, - shared:FILE_SHARE_READ | FILE_SHARE_WRITE, - is_winnt:false, - is_server:false, - access_denied_on_delete:true, - has_delete_on_close:false, - has_page_guard:false, - has_security:false, - has_security_descriptor_control:false, - has_get_process_times:false, - has_lseek_bug:true, - has_lock_file_ex:false, - has_signal_object_and_wait:false, - has_eventlog:false, - has_ip_helper_lib:true, - has_set_handle_information:false, - has_set_handle_information_on_console_handles:false, - supports_smp:false, - map_view_of_file_ex_sucks:true, - altgr_is_ctrl_alt:false, - has_physical_mem_access:false, - has_working_copy_on_write:false, - share_mmaps_only_by_name:true, - virtual_protect_works_on_shared_pages:false, - has_mmap_alignment_bug:true, - has_hard_links:false, - can_open_directories:false, - has_move_file_ex:false, - has_negative_pids:true, - has_unreliable_pipes:true, - has_named_pipes:false, - has_try_enter_critical_section:false, - has_raw_devices:false, - has_valid_processorlevel:true, - has_64bit_file_access:false, - has_process_io_counters:false, - supports_reading_modem_output_lines:false, - needs_memory_protection:false, - pty_needs_alloc_console:false, - has_terminal_services:false, - has_switch_to_thread:false, - cant_debug_dll_entry:true, - has_ioctl_storage_get_media_types_ex:false, - start_proc_suspended:true, - has_extended_priority_class:false, - has_guid_volumes:false, - detect_win16_exe:true, - has_null_console_handler_routine:false, - has_disk_ex_ioctls:false, - has_working_virtual_lock:false, - has_disabled_user_tos_setting:false, - has_fileid_dirinfo:false, - has_exclusiveaddruse:false, - 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:false, - has_gaa_on_link_prefix:false, - supports_all_posix_ai_flags:false, -}; - -static NO_COPY wincaps wincap_me = { - lock_file_highword:0x0, - chunksize:32 * 1024 * 1024, - heapslop:0x0, - shared:FILE_SHARE_READ | FILE_SHARE_WRITE, - is_winnt:false, - is_server:false, - access_denied_on_delete:true, - has_delete_on_close:false, - has_page_guard:false, - has_security:false, - has_security_descriptor_control:false, - has_get_process_times:false, - has_lseek_bug:true, - has_lock_file_ex:false, - has_signal_object_and_wait:false, - has_eventlog:false, - has_ip_helper_lib:true, - has_set_handle_information:false, - has_set_handle_information_on_console_handles:false, - supports_smp:false, - map_view_of_file_ex_sucks:true, - altgr_is_ctrl_alt:false, - has_physical_mem_access:false, - has_working_copy_on_write:false, - share_mmaps_only_by_name:true, - virtual_protect_works_on_shared_pages:false, - has_mmap_alignment_bug:false, - has_hard_links:false, - can_open_directories:false, - has_move_file_ex:false, - has_negative_pids:true, - has_unreliable_pipes:true, - has_named_pipes:false, - has_try_enter_critical_section:false, - has_raw_devices:false, - has_valid_processorlevel:true, - has_64bit_file_access:false, - has_process_io_counters:false, - supports_reading_modem_output_lines:false, - needs_memory_protection:false, - pty_needs_alloc_console:false, - has_terminal_services:false, - has_switch_to_thread:false, - cant_debug_dll_entry:true, - has_ioctl_storage_get_media_types_ex:false, - start_proc_suspended:true, - has_extended_priority_class:false, - has_guid_volumes:false, - detect_win16_exe:true, - has_null_console_handler_routine:false, - has_disk_ex_ioctls:false, - has_working_virtual_lock:false, - has_disabled_user_tos_setting:false, - has_fileid_dirinfo:false, - has_exclusiveaddruse:false, - 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:false, - has_gaa_on_link_prefix:false, - supports_all_posix_ai_flags:false, -}; - -static NO_COPY wincaps wincap_nt3 = { lock_file_highword:UINT32_MAX, chunksize:0, heapslop:0x0, @@ -422,12 +27,12 @@ static NO_COPY wincaps wincap_nt3 = { has_get_process_times:true, has_lseek_bug:false, has_lock_file_ex:true, - has_signal_object_and_wait:false, + has_signal_object_and_wait:true, has_eventlog:true, has_ip_helper_lib:false, has_set_handle_information:true, has_set_handle_information_on_console_handles:false, - supports_smp:false, + supports_smp:true, map_view_of_file_ex_sucks:false, altgr_is_ctrl_alt:true, has_physical_mem_access:true, @@ -441,7 +46,7 @@ static NO_COPY wincaps wincap_nt3 = { has_negative_pids:false, has_unreliable_pipes:false, has_named_pipes:true, - has_try_enter_critical_section:false, + has_try_enter_critical_section:true, has_raw_devices:true, has_valid_processorlevel:true, has_64bit_file_access:true, @@ -450,7 +55,7 @@ static NO_COPY wincaps wincap_nt3 = { needs_memory_protection:true, pty_needs_alloc_console:true, has_terminal_services:false, - has_switch_to_thread:false, + has_switch_to_thread:true, cant_debug_dll_entry:false, has_ioctl_storage_get_media_types_ex:false, start_proc_suspended:false, @@ -896,10 +501,6 @@ wincapc::init () case VER_PLATFORM_WIN32_NT: switch (version.dwMajorVersion) { - case 3: - os = "NT"; - caps = &wincap_nt3; - break; case 4: os = "NT"; if (!has_osversioninfoex @@ -937,31 +538,8 @@ wincapc::init () } break; case VER_PLATFORM_WIN32_WINDOWS: - switch (version.dwMinorVersion) - { - case 0: - os = "95"; - if (strchr (version.szCSDVersion, 'C')) - caps = &wincap_95osr2; - else - caps = &wincap_95; - break; - case 10: - os = "98"; - if (strchr (version.szCSDVersion, 'A')) - caps = &wincap_98se; - else - caps = &wincap_98; - break; - case 90: - os = "ME"; - caps = &wincap_me; - break; - default: - os = "??"; - caps = &wincap_unknown; - break; - } + /* This is just preliminary. */ + api_fatal ("Windows 95/98/Me are not supported."); break; default: os = "??";