Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-02-16 * autoload.cc (NetUseGetInfo): Define.Corinna Vinschen
* fhandler_disk_file.cc (fhandler_cygdrive::opendir): Rename flptst to drive. Call new get_disk_type function rather than is_floppy and check SMB drives with the NetUseGetInfo function. Explain why. * mount.cc (get_disk_type): New function to evaluate disk type from native NT device name. (is_floppy): Remove. * mount.h (enum disk_type): Define. (get_disk_type): Declare. * path.h (is_floppy): Drop declaration.
2012-02-02 Fix memory and handle leaks due to fdopendir:Corinna Vinschen
* dir.cc (closedir): Call global close instead of just releasing the fhandler. * fhandler_disk_file.cc (fhandler_disk_file::closedir): Don't close fhandler handle here, rely on global closedir doing the right thing. * fhandler_registry.cc (fhandler_registry::readdir): Also delete d_hash when closing registry key. (fhandler_registry::rewinddir): Ditto. Avoid infinite recursion in VirtualStore under UAC: * fhandler_registry.cc (VIRT_CLASSES_KEY_PREFIX): Define. (VIRT_CLASSES_KEY_SUFFIX): Ditto. (VIRT_CLASSES_KEY): Ditto. (VIRT_CLASSES_LINKTGT): Ditto. (fhandler_registry::exists): Return virt_symlink as file type if this is a Classes key under the VirtualStore. (fhandler_registry::fstat): Handle virt_symlink. (fhandler_registry::readdir): Return DT_LNK as d_type if this is a Classes key under the VirtualStore. (fhandler_registry::fill_filebuf): Handle Classes symlink. Handle user impersonation in /proc/registry access: * autoload.cc (RegOpenUserClassesRoot): Define. (RegOpenCurrentUser): Define. * fhandler_registry.cc (RegOpenUserClassesRoot): Declare function missing in w32api. (RegOpenCurrentUser): Ditto. (fetch_hkey): New function. (fhandler_registry::open): Call fetch_hkey to get root registry key. (open_key): Ditto.
2011-12-15 Don't leave Windows 2000 behind.Corinna Vinschen
* autoload.cc (GetSystemWow64DirectoryW): Define. (GetVolumePathNamesForVolumeNameW): Define. * fhandler_process.cc (get_volume_path_names_for_volume_name): New static function to workaround missing GetVolumePathNamesForVolumeNameW function in Windows 2000. (dos_drive_mappings::dos_drive_mappings): Call get_volume_path_names_for_volume_name instead of GetVolumePathNamesForVolumeNameW.
2011-08-16 * autoload.cc (GetModuleHandleExW): Define.Corinna Vinschen
* dlfcn.cc: Throughout mark exported symbols as extern "C". (dlopen): Unignore flags argument. Define ret to NULL. Fix typo in comment. Support Glibc flags RTLD_NOLOAD and RTLD_NODELETE. * include/dlfcn.h: Clean up comments. (RTLD_NODELETE): Define. (RTLD_NOLOAD): Define. (RTLD_DEEPBIND): Define.
2011-05-28* autoload.cc: Call _api_fatal in asm.Christopher Faylor
* child_info.h: Redefine CURR_CHILD_INFO_MAGIC. (child_info_fork::abort): Rename from handle_failure. Change arguments. * cygtls.h (_local_storage::ttybuf): New field. * dcrt0.cc (vapi_fatal): Split api_fatal. Add "in forked process" to message when appropriate. (api_fatal): Use vapi_fatal. * devices.h: Make multiple inclusion safe. (fh_devices): Add FH_CONS* stuff. Reorder slightly. (device): Eliminate anonymous union. Add more ways to access minor/major. (device::setunit): Accommodate no-longer-anonymous union. (device::is_fs): Ditto. (device::is_fs_special): Ditto. (device::major): New function. (device::minor): Ditto. (device::is_device): New function. (device::not_device): Ditto. (device::operator int): New operator. (device::operator fh_devices): Ditto. (device::operator bool): Ditto. (device::operator DWORD): Ditto. (device::operator =): Ditto. (isproc_dev): New function. (isprocsys_dev): Ditto. (iscons_dev): Ditto. (istty_slave_dev): Ditto. * devices.in: Add new "/dev/cons*" strings. Accommodate no-longer-anonymous union throughout. (BRACK): Use more precise method for initialization. * devices.cc: Regenerate. * dtable.cc (dtable::stdio_init): Use get_cttyp instead of get_tty. (dtable::find_archetype): Use new DWORD operator in device to test archetypes. (dtable::init_std_file_from_handle): Use different method to initialize 'dev'. Adapt to different ctty handling and accommodate /dev/cons*. (fh_alloc): Accommodate no-longer-anonymous union. Adapt to new /dev/cons*. (build_fh_pc): Make debugging output more useful. * exceptions.cc (ctrl_c_handler): Use get_cttyp instead of get_tty. * external.cc (fillout_pinfo): Accommodate new cons* stuff. * fhandler.cc (fhandler_base::read): Eliminate is_slow() test. * fhandler.h (fhandler_base::*): Adapt to changes in device.h. (fhandler_*::is_slow): Delete. ( fhandler_proc::get_proc_fhandler): Return fh_devices type. * fhandler_console.cc (open_shared_console): New function. (console_unit): New class. (console_unit::console_unit): New constructor. (enum_windows): New function. Declare as friend to console_unit. (fhandler_console::set_unit): New function. (fhandler_console::get_tty_stuff): Call set_unit to set the unit number and determine if initialization is needed. Eliminate flags parameter. (tty_list::get_cttyp): Rename (sorta) from get_tty. Return pointer to correct tty_min. (fhandler_console::open): Adapt to elimination of argument to get_tty_stuff. (fhandler_console::output_tcsetattr): Properly detect error condition. (fhandler_console::fixup_after_fork_exec): Adapt to get_tty_stuff() setting tc automatically. * fhandler_proc.cc: Use FH_BAD rather than 0 throughout where using fh_devices enum. (fhandler_proc::get_proc_fhandler): Return fh_devices. Adapt to devices.h changes. * fhandler_process.cc: Adapt to devices.h changes. Use FH_BAD rather than 0 throughout where using fh_devices enum. * fhandler_procnet.cc: Ditto. * fhandler_procsys.cc: Ditto. * fhandler_procsysvipc.cc: Ditto. * fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Ditto. * fhandler_termios.cc (handler_termios::bg_check): Use tc->ttyname() rather than assuming that we can construct a tty. * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Just return get_minor() of dev. (fhandler_pty_master::process_slave_output): Add slightly more debugging info. (fhandler_tty_slave::fhandler_tty_slave): Change name from ntty to unit. (fhandler_pty_master::open): Ditto. (fhandler_tty_slave::ioctl): Adapt to change which causes ctty to represent a complete device. (fhandler_tty_master::init_console): Add debugging for failure path. (fhandler_pty_master::setup): Use get_unit() to retrieve unit number rather than relying on raw ntty. (fhandler_pty_master::setup): Ditto. * fhandler_virtual.h (virt_tab_t): Redefine fhandler as fh_devices. * fork.cc: Remove obsolete vfork stuff. (frok::child): Don't assume that a ctty == 0 is valid. * mount.cc (mount_info::conv_to_win32_path): Adapt to device struct changes. (mount_info::conv_to_win32_path): Ditto. * path.cc (path_conv::check): Retrive major/minor numbers via a method rather than accessing them directly from device. Rely on dev operators to set/retrieve device information as required by device struct change. * path.h (isproc_dev): Move to devices.h. (isprocsys_dev): Ditto. (isvirtual_dev): Ditto. (path_conv:{isdevice,isfifo,isspecial,iscygdrive,issocket,get_devn,get_unitn}): Use device methods to access/manipulate devices. * pinfo.cc (pinfo::exit): Don't assume that ctty == 0 is valid. Use iscons_dev to determine if a device is a console. (_pinfo::_ctty): Use device::parse to generate tty/cons name. (_pinfo::set_ctty): Don't assume that ctty == 0 is valid. Remove redundant info from debugging. * shared.cc (offsets): Remove console offset. * shared_info.h (shared_locations): Ditto. * syscalls.cc (umask): Use device methods to manipulate device information. (ctermid): Use device::parse to generate term device name. * tlsoffsets.h: Regenerate. * tty.cc (ttyslot): Return minor number of ctty since ctty now represents a full device. (tty::create_master): Set ctty to a complete device. (tty_list::attach): Rework to detect new /dev/cons* stuff. (tty_list::terminate): Adapt to changes to ctty. (tty_list::init): Adapt to change to setntty - pass in device major number. (tty::exists): Use get_unit() to retrive tty unit number. (tty::open_mutex): Ditto. (tty::open_inuse): Ditto. (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty_min::ttyname): Define new function. * tty.h (tty_min::ntty): Redefine as fh_devices. (tty::exists): Use get_unit() to retrive tty unit number. (tty::open_mutex): Ditto. (tty::open_inuse): Ditto. (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty_min::ttyname): Declare new function. (tty::getntty): Declare as const. (tty_list::operator []): Assure that only minor part of argument is used. * dll_init.cc (dll_list::alloc): Detect mismatch of data segments early issuing an explicit error message if necessary. * heap.cc (heap_init): Adapt to changes from fork->handle_failure to fork->abort. * pinfo.h (EXITCODE_FORK_FAILED): New enum. (from Ryan Johnson) * sigproc.cc (child_info_fork::abort): Rename from handle_failure. Change arguments to allow passing in a printf-like message. * winsup.h (api_fatal): Delete macro definition. (api_fatal): Redefine from __api_fatal. (vapi_fatal): Declare new function. * include/sys/strace.h (strace_vprintf): Define new macro. * ntdll.h (_SYSTEM_INFORMATION_CLASS): Add SystemHandleInformation.
2011-05-11 * autoload.cc: Remove useless comment.Corinna Vinschen
2011-05-11 * autoload.cc (EnumProcessModules): Remove.Corinna Vinschen
* dlfcn.cc (dlopen): Make sure errno is set if an error occurs. (dlsym): Rewrite using RtlQueryProcessDebugInformation instead of EnumProcessModules. * ntdll.h (struct _DEBUG_MODULE_ARRAY): Define. (RtlCreateQueryDebugBuffer): Declare. (RtlDestroyQueryDebugBuffer): Declare. (RtlQueryProcessDebugInformation): Declare.
2011-05-11 * autoload.cc (GetModuleFileNameExW): Remove.Corinna Vinschen
* autoload.cc (GetModuleInformation): Remove.
2011-05-11 * autoload.cc (QueryWorkingSet): Remove.Corinna Vinschen
2011-05-11 * autoload.cc (GetProcessMemoryInfo): Remove.Corinna Vinschen
* resource.cc (fill_rusage): Call NtQueryInformationProcess rather than GetProcessMemoryInfo to drop a psapi dependency.
2011-05-01 Throughout, use user32 UNICODE functions rather than ANSI functions.Corinna Vinschen
* autoload.cc: Convert all definitions for ANSI user32 functions to definitions for the corresponding UNICODE function. (SendMessageA): Remove. (SendNotifyMessageW): Define. * fhandler_windows.cc (fhandler_windows::write): Use SendNotifyMessageW call rather than SendMessage to make function always return immediately. (fhandler_windows::read): Make function interruptible and a cancellation point. Handle O_NONBLOCK. * select.cc (peek_serial): Don't wait for signal_arrived here. * window.cc (wininfo::winthread): Call CreateWindowExW directly rather than CreateWindow wrapper.
2011-04-28 * autoload.cc (GetSecurityInfo): Remove.Corinna Vinschen
* 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.
2011-04-19 * autoload.cc (GetConsoleWindow): Drop.Corinna Vinschen
(GetSystemWindowsDirectoryW): Drop. * fhandler_console.cc (beep): Call GetSystemWindowsDirectoryW instead of GetWindowsDirectoryW. * uinfo.cc (cygheap_user::env_systemroot): Call GetSystemWindowsDirectoryW and convert to multibyte on the fly. * winlean.h (GetWindowsDirectoryW): Redefine to something invalid. Explain why.
2011-04-19 * Makefile.in (DLL_IMPORTS): Drop advapi32.dll.Corinna Vinschen
* autoload.cc: Enable autoloading advapi32 functions. * environ.cc (regopt): Use wide char arguments in reg_key functions. * fhandler_console.cc (beep): Ditto. Use WCHAR throughout. * registry.cc (reg_key): Rewrite reg_key class to use native NT registry functions. Use WCHAR string parameters throughout. Use PCWSTR rather than const WCHAR. Drop multibyte char functionality. Drop unused methods. (get_registry_hive_path): Use RtlQueryRegistryValues to fetch path from registry. (load_registry_hive): Drop useless check for user hive being available. Load hive using NtLoadKey. * registry.h: Accommodate above changes. * sched.cc (sched_rr_get_interval): Use wide char arguments in reg_key functions. * shared.cc (init_installation_root): Ditto. (shared_info::init_obcaseinsensitive): Use RtlQueryRegistryValues to fetch obcaseinsensitive value. (shared_info::heap_slop_size): Use wide char arguments in reg_key functions. (shared_info::heap_chunk_size): Ditto. * syscalls.cc (gethostid): Ditto. * winsup.h (__WIDE): Define. (_WIDE): Define. * libc/minires-os-if.c (get_registry_dns_items): Don't fetch values from registry. Just extract them from given UNICODE_STRING parameter. (get_registry_dns): Fetch all registry values at once using RtlQueryRegistryValues.
2011-04-04 Drop NT4 support.Corinna Vinschen
* 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-02 * autoload.cc (FindFirstVolumeA): Remove.Corinna Vinschen
(FindNextVolumeA): Remove. (FindVolumeClose): Remove. (GetVolumeNameForVolumeMountPointA): Remove. * ntdll.h (NtFlushBuffersFile): Declare. * syscalls.cc (sync_worker): Rewrite using native NT functions. (sync): Ditto.
2011-04-02 * autoload.cc (GetExtendedTcpTable): Remove.Corinna Vinschen
(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.
2011-04-01 * Makefile.in (DLL_OFILES): Add avapi32.o.Corinna Vinschen
* advapi32.cc: New file. * autoload.cc: Add block of remaining advapi32 functions used by Cygwin. Keep commented out. Explain why.
2011-03-29 * fhandler_socket.cc (get_inet_addr): Make externally available.Corinna Vinschen
* autoload.cc (GetUdpTable): Define. * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64 to check for local socket file. Create socket with type returned by get_inet_addr. If connect on UDP socket works, test if there's really a listening peer, otherwise fall back to Windows event log. (try_connect_syslogd): Use syslogd_inited flag to check if syslogd is available.
2011-03-29 * autoload.cc (UuidCreate): Remove.Corinna Vinschen
(UuidCreateSequential): Remove. * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler error with gcc 4.5.1. * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto. * ntdll.h (NtAllocateUuids): Declare. * syscalls.cc (gethostid): Use NtAllocateUuids function rather than UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
2011-03-29 * autoload.cc (winmm): Remove time functions. Don't treatCorinna Vinschen
unloadable wave functions as fatal. * hires.h (hires_ms::timeGetTime_ns): New private method. (hires_ms::dmsecs): Call timeGetTime_ns here. * ntdll.h (struct _KSYSTEM_TIME): Define. (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime. (SharedUserData): Define here. (NtQueryTimerResolution): Declare. (NtSetTimerResolution): Declare. * path.cc (SharedUserData): Move to ntdll.h. * times.cc (hires_ms::timeGetTime_ns): New private method. Use throughout instead of timeGetTime. Document entire functionality of timeGetTime in case we need it. (hires_ms::resolution): Try a call to NtQueryTimerResolution to fetch current period. Fall back to heuristic if that fails. Cast to DWORD in assignments to minperiod. (clock_setres): Align period to possible values per a call to NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod and timeEndPeriod with underlying call to NtSetTimerResolution. Use status code from NtSetTimerResolution to compute errno. Convert period to ULONGLONG and store 100ns value to simplify code.
2011-03-23* autoload.cc (dll_load): Change error message to make it clear if a newer DLLChristopher Faylor
is being run.
2011-03-02* autoload.cc (dll_load): Avoid in_forkee test since this apparently fails evenChristopher Faylor
when not forked.
2011-03-01* autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack onChristopher Faylor
systems which need it. * wincap.cc (use_dont_resolve_hack): Set as appropriate. * wincap.h (use_dont_resolve_hack): Define.
2011-02-28* autoload.cc (dll_load): Make inline. Clarify logic.Christopher Faylor
2011-02-27 * autoload.cc (dll_load): Only call LoadLibraryExW withCorinna Vinschen
DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with ERROR_INVALID_ADDRESS. (LsaRegisterLogonProcess): Align comment to previous change.
2011-02-27* autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate changesChristopher Faylor
to LoadDLLprime. (LoadDLLprime): Take an extra argument indicating whether this dll needs special handling on fork. Place this information in the "handle" location. (LoadDLLfuncEx3): Eliminate "func" handling. Pass new no_resolve_on_fork argument to LoadDLLprime. (dll_load): New function. (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load to load DLL in both cases where it is used.
2011-02-26 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto forCorinna Vinschen
secur32 functions, except for LsaRegisterLogonProcess. Change return value to ERROR_PROC_NOT_FOUND. Explain why. * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to LsaRegisterLogonProcess when generating the errno value.
2011-02-15 * Throughout fix copyright dates.Corinna Vinschen
2011-02-05* autoload.cc (wsock_init): Properly define WSAStartup function pointer toChristopher Faylor
avoid stack damage.
2010-12-09 * autoload.cc (RETRY_COUNT): New define.Corinna Vinschen
(std_dll_init): Restructure loop to retry loading a DLL only if specific errors occur. If these errors persist, try to load DLL with name only.
2010-11-23 * autoload.cc (SendARP): Remove.Corinna Vinschen
* net.cc (get_flags): Set IFF_NOARP flag for PPP and SLIP devices. (get_xp_ifs): Unify IFF_BROADCAST setting. Drop calling SendARP to set IFF_NOARP flag.
2010-10-02* autoload.cc (std_dll_init): Add a retry loop.Christopher Faylor
2010-09-28 Revert accidental previous login.Corinna Vinschen
2010-09-28 * Makefile.in (DLL_IMPORTS): Remove libadvapi32.a.Corinna Vinschen
* autoload.cc: Add all advapi32 entry points. * mount.cc (mount_info::init): Read user fstab only if we have a username. * passwd.cc (pwdgrp::read_passwd): Only use username if we have one. * shared.cc (user_info::initialize): Set cb last so as not to override planned behaviour in pwdgrp::read_passwd. * uinfo.cc (cygheap_user::init): Fetch Windows username from environment variable $USERNAME. Don't set name in cygheap if variable is empty. (internal_getlogin): If we still have no username, try GetUserNameW.
2010-09-25 * autoload.cc: Throughout. order entry points alphabetically by DLLCorinna Vinschen
and function name. Make functions which are available on all supported systems non-optional. Fix return value on entry points imported from secur32.dll. Add comment. (std_dll_init): Call fesetenv unconditionally.
2010-09-24* autoload.cc (std_dll_init): Move dll_path closer to its use. Use dll_path inChristopher Faylor
fatal error. Set ret values under lock control. * lib/minires.c (res_nsend): Fix compilation errors owing to pointer signedness.
2010-09-24* autoload.cc (std_dll_init): Use correct format type when displaying dll nameChristopher Faylor
in error output.
2010-09-11winsup/cygwin/ChangeLog:Dave Korn
* Makefile.in (DLL_OFILES): Add new fenv.o module. (fenv_CFLAGS): New flags definition for fenv.o compile. * autoload.cc (std_dll_init): Use fenv.h functions instead of direct manipulation of x87 FPU registers. * crt0.c (mainCRTStartup): Likewise. * cygwin.din (feclearexcept, fegetexceptflag, feraiseexcept, fesetexceptflag, fetestexcept, fegetround, fesetround, fegetenv, feholdexcept, fesetenv, feupdateenv, fegetprec, fesetprec, feenableexcept, fedisableexcept, fegetexcept, _feinitialise, _fe_dfl_env, _fe_nomask_env): Export new functions and data items. * fenv.cc: New file. * posix.sgml: Update status of newly-implemented APIs. * include/fenv.h: Likewise related header. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2010-08-30 * autoload.cc (MsgWaitForMultipleObjectsEx): Define.Corinna Vinschen
(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.
2010-08-28 * autoload.cc (LoadDLLprime): Change dllname storage to string16.Corinna Vinschen
(struct dll_info): Convert name to WCHAR. (std_dll_init): Load DLLs with full path to windows system directory. Add hint to Microsoft security advisory. * dcrt0.cc (init_windows_system_directory): New function. (dll_crt0_0): Call init_windows_system_directory first. * exceptions.cc (windows_system_directory): Move to globals.cc. (windows_system_directory_length): Ditto. (events_init): Drop code fetching windows_system_directory. * globals.cc (windows_system_directory): New global variable. (windows_system_directory_length): Ditto. * net.cc (load_ipv6_funcs): Use windows_system_directory rather than GetSystemDirectoryW. * netdb.cc (open_system_file): Ditto. Simplify debug output.
2010-07-19* autoload.cc (noload): Use "pushl" rather than "push".Christopher Faylor
2010-04-19 * autoload.cc (GetNamedPipeClientProcessId): Define.Corinna Vinschen
* fhandler.h (fhandler_tty_slave::fch_open_handles): Declare private. (fhandler_tty_slave::fch_close_handles): Ditto. (fhandler_tty_slave::cygserver_attach_tty): Drop declaration. (fhandler_tty_slave::fstat): Declare public. (fhandler_tty_slave::fchmod): Declare public. (fhandler_tty_slave::fchown): Declare public. (class fhandler_pty_master): Add master_ctl handle. (fhandler_pty_master::pty_master_thread): Declare public. * fhandler_termios.cc (fhandler_termios::tcinit): If the process is started from a non-Cygwin process, make it tty process group leader. * fhandler_tty.cc: Throughout accommodate additional security related arguments in calls to functions creating or opening objects. (close_maybe): Move to start of file to reuse it in other methods. (struct pipe_request): Define. (struct pipe_reply): Define. (fhandler_tty_slave::open): Throughout, try to open synchronization objects with MAXIMUM_ALLOWED permissions. Drop call to cygserver. Try to duplicate pipe handles via master_ctl pipe if duplicating directly doesn't work. (fhandler_tty_slave::cygserver_attach_tty): Remove. (fhandler_tty_slave::init): Close unused incoming pipe handle. (fhandler_pty_master::close): Send exit message to master control thread and close master_ctl handle. (fhandler_pty_master::pty_master_thread): New method, implementing the master control thread. (pty_master_thread): Static helper to start master control thread. (fhandler_pty_master::setup): Simplify creating pipe inheritance. Make sure we're the one creating the input_available_event. Add comment to explain why. Create master_ctl pipe and start master control thread. Close master_ctl handle in case of error. * security.cc (alloc_sd): Add code to handle tty objects. Add comments to explain what exactly is required. (get_object_sd): New function. (get_object_attribute): New function. (create_object_sd_from_attribute): New function. (set_object_sd): New function. (set_object_attribute): New function. (set_file_attribute): Change attribute type to mode_t. * security.h (set_file_attribute): Change attribute type to mode_t. (get_object_sd): Declare. (get_object_attribute): Declare. (create_object_sd_from_attribute): Declare. (set_object_sd): Declare. (set_object_attribute): Declare. * tty.cc (tty::slave_alive): Implement directly instead of via alive. (tty::exists): Open mutex handle with READ_CONTROL access. (tty::alive): Remove. (tty::open_output_mutex): Convert to inline method. (tty::open_input_mutex): Ditto. (tty::open_mutex): Take additional ACCESS_MASK parameter for the mutex open access mask. (tty::open_inuse): New method. (tty::create_inuse): Take PSECURITY_ATTRIBUTES parameter. Drop fmt name parameter. Always create TTY_SLAVE_ALIVE event. (tty::get_event): Take additional PSECURITY_ATTRIBUTES parameter for CreateEvent. * tty.h (class tty): Change declarations according to aforementioned changes. (tty::open_output_mutex): Implement as inline method. (tty::open_input_mutex): Ditto.
2010-03-13Throughout change all calls of low_priority_sleep (0) to yield ().Christopher Faylor
* miscfuncs.cc (yield): Rename from low_priority_sleep. Remove all of the logic which called Sleep() and just use SwitchToThread. * miscfuncs.h (yield): Rename from low_priority_sleep. (SLEEP_0_STAY_LOW): Delete unused define. * shared.cc (memory_init): Move heap_init() call directly after shared memory initialization to more closely mimic long-standing program flow. * tty.cc (tty_list::terminate): Replace call to low_priority_sleep with Sleep.
2010-01-23 * Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.Corinna Vinschen
* 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.
2009-11-17 Reintegrate socket duplication via WSADuplicateSocket/WSASocket.Corinna Vinschen
* autoload.cc (WSADuplicateSocketW): Define. (WSASocketW): Define. * dtable.cc (dtable::release): Call dec_need_fixup_before if necessary. (dtable::fixup_before_fork): New function. (dtable::fixup_before_exec): New function. * dtable.h (class dtable): Add member cnt_need_fixup_before. Add declarations for above new functions. (dtable::dec_need_fixup_before): New inline method. (dtable::inc_need_fixup_before): New inline method. (dtable::need_fixup_before): New inline method. * fhandler.h (fhandler_base::fixup_before_fork_exec): New virtual method. (fhandler_base::need_fixup_before): New virtual method. (class fhandler_socket): Add member prot_info_ptr. (fhandler_socket::init_fixup_before): Declare. (fhandler_socket::need_fixup_before): New inline method. (fhandler_socket::fixup_before_fork_exec): Declare. (fhandler_socket::fixup_after_exec): Declare. * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize prot_info_ptr to NULL. (fhandler_socket::~fhandler_socket): Free prot_info_ptr conditionally. (fhandler_socket::init_fixup_before): New method. (fhandler_socket::fixup_before_fork_exec): Ditto. (fhandler_socket::fixup_after_fork): Use WSASocketW to duplicate socket if necessary. (fhandler_socket::fixup_after_exec): New method. (fhandler_socket::dup): Use fixup_before_fork_exec/fixup_after_fork to duplicate socket if necessary. * fork.cc (frok::parent): Start child suspended if some fhandler needs fixup before fork. If so, call dtable::fixup_before_fork after CreateProcess and resume child. * net.cc (fdsock): Try to find out if socket needs fixup before and initialize socket accordingly. Add HUGE comment to explain what happens and why. * spawn.cc (spawn_guts): Start child suspended if some fhandler needs fixup before exec. If so, call dtable::fixup_before_exec after CreateProcess.
2009-09-22 * autoload.cc (WSARecv): Define.Corinna Vinschen
* fhandler_socket.cc (fhandler_socket::recv_internal): Call WSARecv instead of WSARecvFrom if no name parameter is given. Explain why.
2009-07-06 * autoload.cc: Delete stray CR.Corinna Vinschen
2009-07-05* autoload.cc (SetParent): Add new import.Christopher Faylor
* fhandler.h (fhandler_console::create_invisible_console): Declare new function. (create_invisible_console_workaround): Ditto. * fhandler_console.cc (fhandler_console::create_invisible_console): Define new function. (create_invisible_console_workaround): Ditto. Add too much code to deal with broken Windows 7. Use a helper app to start an invisible console window. (fhandler_console::need_invisible): Reorganize to use helper functions to create invisible console. * spawn.cc (spawn_guts): Avoid zeroing already zeroed fields in si.
2009-07-04 * autoload.cc (AttachConsole): Correct size of args.Dave Korn