summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
...
* Update Cygwin's fnmatch to latest from FreeBSD.Corinna Vinschen2015-11-183-55/+87
| | | | | | | | * collate.h (__collate_load_error): Convert to extern declaration. * globals.cc (__collate_load_error): Define and initialize here. * libc/fnmatch.c: Update to latest from FreeBSD. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Don't generate Windows native symlinks targeting Cygwin-only targetsCorinna Vinschen2015-11-182-2/+15
| | | | | | | | | * path.cc (symlink_native): Don't generate native symlink targeting Cygwin special file. Inform the caller. (symlink_worker): Don;t bail out in WSYM_nativestrict case if the target is a Cygwin special file. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Regenerate Cygwin locale message infoCorinna Vinschen2015-11-182-29/+46
| | | | | | * lc_msg.h: Regenerate. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: export rpmatch(3)Yaakov Selkowitz2015-11-176-1/+26
| | | | | | | | | | | | winsup/cygwin/ * common.din (rpmatch): Export. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. winsup/doc/ * new-features.xml (ov-new2.4): New section. Document rpmatch. * posix.xml (std-bsd): Add rpmatch. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* flock: Fix hang in object collision caseCorinna Vinschen2015-11-123-2/+12
| | | | | | | * flock.cc (lockf_t::create_lock_obj): Correctly recreate lock object attributes anew in each loop. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add comment to explain previous patchCorinna Vinschen2015-11-121-0/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix crash at process init on 64 bit XP/2003 under WOW64Corinna Vinschen2015-11-123-3/+26
| | | | | | | | * init.cc (munge_threadfunc): Don't call NtQueryInformationThread with ThreadQuerySetWin32StartAddress info class on XP 64 and Server 2003 64. It crashes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Bump Cygwin DLL minor numberCorinna Vinschen2015-11-092-1/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fake volume serial number on filesystems not providing itCorinna Vinschen2015-11-052-2/+33
| | | | | | | * mount.cc (fs_info::update): Fake a serial number on filesystems not providing one. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Avoid deadlock in flock(2)Corinna Vinschen2015-11-054-5/+16
| | | | | | | | * fcntl.cc (fcntl64): Don't lock fd table when performing locking. * flock.cc (flock): Ditto. (lockf): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix iterating over pending signals if a signal doesn't have to be clearedCorinna Vinschen2015-11-052-3/+15
| | | | | | | | | * sigproc.cc (pending_signals::clear): Yet another fix to fix the fix. Actually iterate over the list of pending signals even if there's a signal which doesn't have to be cleared. Other than that, revert loop to it's former self as a while loop. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Accommodate trailing NUL in PrlSF filesystem name.Corinna Vinschen2015-11-044-1/+12
| | | | | | | | * globals.cc (ro_u_prlfs): Add trailing NUL. Explain why. * mount.cc (fs_info::update): Add a comment to explain PrlSF. * path.h (path_conv::fs_is_prlfs): Add for symmetry. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add missing release message for 68b4238f4a1276a1f6f18430580b62dfa0420ffdCorinna Vinschen2015-11-041-0/+3
|
* Fix potential endless loop in pending_signals::clearCorinna Vinschen2015-11-032-9/+9
| | | | | | | * sigproc.cc (pending_signals::clear): Fix previous fix resulting in yet another endless loop. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Define MAX_IPOPTLENCorinna Vinschen2015-11-022-0/+6
| | | | | | * include/netinet/ip.h (MAX_IPOPTLEN): Define. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix incorrect implementation to clear per-thread pending signalsCorinna Vinschen2015-11-022-5/+17
| | | | | | | | * sigproc.cc (class pending_signals): Drop sigproc_init friendship. (pending_signals::clear): Fix implementation to avoid subsequent endless loop in wait_sig. Improve comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add support for Parallels Desktop FS (prlfs)Corinna Vinschen2015-11-0210-5/+41
| | | | | | | | | | | | | | | | | * mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS). (class fs_info): Add has_broken_fnoi flag. Implement prlfs FS flag. * mount.cc (fs_info::update): Handle PrlFS. Fill new has_broken_fnoi flag with life. (fs_names): Add prlfs. * globals.cc (ro_u_prlfs): Define. * path.h (path_conv::has_broken_fnoi): New method. * path.cc (symlink_info::check): Call file_get_fnoi utilizing new has_broken_fnoi filesystem flag. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto. * new-features.xml (ov-new2.3): Document Parallels Desktop FS support. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Workaround bug in LocaleNameToLCID on Windows 10Corinna Vinschen2015-10-303-6/+22
| | | | | | | | * nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID returning LOCALE_CUSTOM_UNSPECIFIED instead of failing in case of an unsupported locale on Windows 10. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Avoid double unlock of TLS mutexCorinna Vinschen2015-10-302-4/+6
| | | | | | | * exceptions.cc (sigpacket::process): Avoid potentially double unlocking the TLS mutex. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix sigwait and pthread_kill return values in case of errorCorinna Vinschen2015-10-304-3/+23
| | | | | | | | * signal.cc (sigwait): Fix return value to reflect errno in case of error according to POSIX. Never return EINTR. * thread.cc (pthread_kill): Return errno if sig_send failed. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Check for correct funtion entry address in munge_threadfuncQian Hong2015-10-294-3/+18
| | | | | | | | * init.cc (munge_threadfunc): Check that we're actually replacing the correct original function address on the stack. * ntdll.h (enum _THREADINFOCLASS): Add ThreadQuerySetWin32StartAddress. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Remove spurious execute permissions from some Cygwin source and text filesJon Turney2015-10-2711-0/+15
| | | | | | | | | | | | | | | | | | | 2015-08-21 Jon Turney <jon.turney@dronecode.org.uk> * cygwin-cxx.h: Remove execute permissions. * fenv.cc: Ditto. * how-startup-shutdown-works.txt: Ditto. * include/arpa/nameser.h: Ditto. * include/arpa/nameser_compat.h: Ditto. * include/fenv.h: Ditto. * include/resolv.h: Ditto. * libstdcxx_wrapper.cc: Ditto. 2015-10-27 Jon Turney <jon.turney@dronecode.org.uk> * winsup.api/signal-into-win32-api.c: Remove execute permissions. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* strftime: Add support for %s (seconds since epoch)Brian Inglis2015-10-273-0/+10
| | | | | | | * libc/time/strftime.c (__strftime): add support for %s (seconds from Unix epoch). Fix whitespaces. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Clear pending signals targeting exiting threadnewlib-snapshot-20151023Corinna Vinschen2015-10-234-1/+30
| | | | | | | | | | | * cygtls.cc (_cygtls::remove): Call remove_pending_sigs. * cygtls.h (_cygtls::remove_pending_sigs): Declare. * sigproc.cc (pending_signals::clear): Define new method taking a _cygtls pointer argument. Drop pending signals for that thread. (_cygtls::remove_pending_sigs): Call pending_signals::clear for this thread. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* winsup/utils: add CPU cache variables to getconf(1)Yaakov Selkowitz2015-10-222-0/+19
| | | | | | * getconf.c (conf_table): Add LEVEL*_CACHE_* variables. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Export aligned_alloc, at_quick_exit, quick_exit.Corinna Vinschen2015-10-227-2/+35
| | | | | | | | | | | | * common.din (aligned_alloc): Export. (at_quick_exit): Export. (quick_exit): Export. * posix.xml (std-iso): New section. (std-deprec): Rearrange title text. * new-features.xml (ov-new2.3): Document aligned_alloc, at_quick_exit, Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Avoid SEGV when handling SIDs with 0 subauthoritiesCorinna Vinschen2015-10-223-1/+12
| | | | | | | * sec_helper.cc (cygsid::get_sid): Don't reject SIDs with missing subauthorities. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release message for previous Cygwin patchCorinna Vinschen2015-10-221-0/+2
|
* Fix length returned from sys_cp_wcstombs in case nwc > # of wcharsCorinna Vinschen2015-10-229-14/+23
| | | | | | | | | | * strfuncs.cc (sys_cp_wcstombs): Always return number of multibytes without trailing NUL as the documentation implies. Throughout Cygwin, fix usage to align to this pattern. * fhandler_process.cc (format_process_winexename): Drop trailing NUL and LF from output. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix memory leak in pthread_getattr_npCorinna Vinschen2015-10-213-5/+10
| | | | | | | * thread.cc (pthread_getattr_np): Fix memory leak, remove usage of malloc for small local buffer. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix EIO error accessing certain (OS X SMB?) drivesCorinna Vinschen2015-10-213-1/+15
| | | | | | | * path.cc (symlink_info::check_reparse_point): Don't generate an EIO error if NtFsControlFile returns STATUS_NOT_A_REPARSE_POINT. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * winsup/doc/faq-using.xml (faq.using.same-with-permissions): New entry.Ken Brown2015-10-212-0/+46
|
* Fix compiler errors/warnings when compiling with -O3Corinna Vinschen2015-10-203-3/+10
| | | | | | | | | * fhandler_socket.cc (fhandler_socket::wait_for_events): Fix compiler warning in -O3 case. (fhandler_socket::connect): Ditto. * regex/regcomp.c (singleton): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin 2.3.0: Add missing release messageCorinna Vinschen2015-09-081-0/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* flock.cc: Fix stack allocation from callee used in callerCorinna Vinschen2015-09-082-6/+18
| | | | | | | | | | * flock.cc (lockf_t::create_lock_obj_attr): Add buffer parameter. Call _everyone_sd with buffer argument from caller rather than everyone_sd with locally allocated stack buffer. (lockf_t::create_lock_obj): Call create_lock_obj_attr only once outside the loop and with additional buffer argument. (lockf_t::open_lock_obj): Call create_lock_obj_attr with additional buffer argument.
* faq-using.xml: Replace makewhatis with mandbCorinna Vinschen2015-09-082-2/+6
| | | | | | * faq-using.xml (faq.using.man): Replace makewhatis with mandb. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Fix missing commas in products arrayCorinna Vinschen2015-08-302-5/+9
| | | | | | * cygcheck.cc (dump_sysinfo): Fix missing commas in products array. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Fix debugger problemCorinna Vinschen2015-08-302-4/+13
| | | | | | | * cygcheck.cc (load_cygwin): Only unload cygwin DLL if not running under a debugger. Explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Handle W10/2016 sysinfoCorinna Vinschen2015-08-302-27/+68
| | | | | | | * cygcheck.cc (dump_sysinfo): Correctly handle Windows 10/Server 2016. Add missing product types. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Fix downlevel DLL handlingCorinna Vinschen2015-08-302-2/+12
| | | | | | | * cygcheck.cc (track_down): Skip error output for "api-ms-win-" downlevel DLLs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* sysconf.cc: Fix compiler warning.Corinna Vinschen2015-08-291-0/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Allow sysconf to return CPU cache informationCorinna Vinschen2015-08-297-63/+539
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/sys/unistd.h (_SC_LEVEL*): Add cache-related variables as on Linux. * fhandler_proc.cc (format_proc_cpuinfo): Fetch cache information from new cache functions in sysconf.cc, get_cpu_cache_intel and get_cpu_cache_amd. * sysconf.cc (__nt_query_system): New local helper. (get_nproc_values): Utilize __nt_query_system on pre-Windows 7 systems. Use GetLogicalProcessorInformationEx otherwise to handle more than 64 CPUs. Only handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN. (get_phys_pages): New helper to handle _SC_PHYS_PAGES. (cpuid2_cache_descriptor): New array to map Intel CPUID 2 descriptor values to cache type, cache size, associativity and linesize. (cpuid2_cache_desc_compar): Comparision function for bsearch over cpuid2_cache_descriptor. (get_cpu_cache_intel_cpuid2): New function to fetch cache info from Intel CPUID 2. (get_cpu_cache_intel_cpuid4): Ditto from Intel CPUID 4. (get_cpu_cache_intel): New function as CPU-specific entry point. (assoc): New array to map associativity values from AMD CPUID 0x80000006. (get_cpu_cache_amd): New function to fetch cache info from AMD CPUIDs 0x80000005 and 0x80000006. (get_cpu_cache): New function to fetch cache info. (sca): Call get_phys_pages if _SC_PHYS_PAGES is requested. Call get_cpu_cache for new _SC_* cache requests. (SC_MAX): Set to _SC_LEVEL4_CACHE_LINESIZE. (get_phys_pages(void)): Call get_phys_pages(int). * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * new-features.xml (ov-new2.3): Document sysconf cache addition. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement POSIX_MADV_WILLNEED/POSIX_MADV_DONTNEED for newer OSesCorinna Vinschen2015-08-279-19/+147
| | | | | | | | | | | | | | | | | | | * autoload.cc (DiscardVirtualMemory): Import. (PrefetchVirtualMemory): Import. * mmap.cc (posix_madvise): Actually implement POSIX_MADV_WILLNEED utilizing PrefetchVirtualMemory and POSIX_MADV_DONTNEED utilizing DiscardVirtualMemory on systems supporting them. * wincap.h (wincaps::has_broken_prefetchvm): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Make sure has_broken_prefetchvm is only true on W10 under WOW64. * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2003. (CYGWIN_VERSION_API_MINOR): Reset to 0. * new-features.xml (ov-new2.3): New section, document posix_madvise POSIX_MADV_WILLNEED/POSIX_MADV_DONTNEED change. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc: Only request group relation informationCorinna Vinschen2015-08-262-1/+6
| | | | | | | * fhandler_proc.cc (format_proc_cpuinfo): Only fetch group relations, we don't need anything else. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* winsup.h: Claim Windows 10 supportCorinna Vinschen2015-08-253-4/+11
| | | | | | | * winsup.h (_WIN32_WINNT): Set to 0x0a00 for Windows 10. (WINVER): Ditto. Remove outdated comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* autoload.cc: Drop using full paths for system DLLsCorinna Vinschen2015-08-252-11/+7
| | | | | | | | | | System DLLs are always first in the DLL search order so http://www.microsoft.com/technet/security/advisory/2269637.mspx doesn't apply for them. * autoload.cc (std_dll_init): Revert using full paths to system DLLs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* autload.cc: Avoid clobbering return address in noload on i686Corinna Vinschen2015-08-252-2/+9
| | | | | | | | | | | | | | | This fixes a long-standing problem when GetProcAddress fails to load a function. The noload code calls SetLastError on i686 without saving the edx register. Starting with Windows 7, SetLastError apparently uses $edx and the register is set to 0x00000000 on return. So the subsequent `jmp *$edx' in noload supposed to return to the caller, actually jumps to address NULL, which results in a SEGV. * autoload.cc (noload): i686 only: Save and restore $edx when calling SetLastError to avoid clobbering return address stating with Windows 7. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* mmap.cc: Fix some commentsCorinna Vinschen2015-08-252-9/+10
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Sigproc.cc: Fix copyright.newlib-snapshot-20150824Corinna Vinschen2015-08-241-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix hang stracing forking processes but not following childCorinna Vinschen2015-08-244-2/+37
| | | | | | | | * ntdll.h (PROCESSINFOCLASS): Define ProcessDebugFlags. * sigproc.cc (child_info::child_info): Only propagate _CI_STRACED to child if strace is actually tracing child processes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>