Commit Graph

15 Commits

Author SHA1 Message Date
Corinna Vinschen 41299df081 Avoid deadlock in flock(2)
* 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>
2015-11-05 18:31:36 +01:00
Corinna Vinschen 58922d3125 Add missing release message for 68b4238f4a1276a1f6f18430580b62dfa0420ffd 2015-11-04 10:09:12 +01:00
Corinna Vinschen df6206aa56 Add support for Parallels Desktop FS (prlfs)
* 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>
2015-11-02 12:08:25 +01:00
Corinna Vinschen 677eea00a6 Workaround bug in LocaleNameToLCID on Windows 10
* 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>
2015-10-30 20:13:26 +01:00
Corinna Vinschen 8f97c045b8 Fix sigwait and pthread_kill return values in case of error
* 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>
2015-10-30 16:05:43 +01:00
Qian Hong ff3c4a7d2f Check for correct funtion entry address in munge_threadfunc
* 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>
2015-10-29 09:17:57 +01:00
Brian Inglis 6090952296 strftime: Add support for %s (seconds since epoch)
* libc/time/strftime.c (__strftime): add support for %s (seconds from
	Unix epoch).  Fix whitespaces.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-27 09:41:40 +01:00
Corinna Vinschen 6b457615e6 Export aligned_alloc, at_quick_exit, quick_exit.
* 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>
2015-10-22 16:21:17 +02:00
Corinna Vinschen e01381afde Avoid SEGV when handling SIDs with 0 subauthorities
* sec_helper.cc (cygsid::get_sid): Don't reject SIDs with missing
	subauthorities.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-22 15:38:42 +02:00
Corinna Vinschen 6599fad55d Add release message for previous Cygwin patch 2015-10-22 15:35:46 +02:00
Corinna Vinschen c0345822e5 Fix memory leak in pthread_getattr_np
* thread.cc (pthread_getattr_np): Fix memory leak, remove usage of
	malloc for small local buffer.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-21 12:46:32 +02:00
Corinna Vinschen 713161b28b Fix EIO error accessing certain (OS X SMB?) drives
* 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>
2015-10-21 12:01:11 +02:00
Corinna Vinschen 36da3f961c Cygwin 2.3.0: Add missing release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-09-08 22:53:54 +02:00
Corinna Vinschen 38fd7ddb79 Allow sysconf to return CPU cache information
* 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>
2015-08-29 09:16:47 +02:00
Corinna Vinschen 35d5d87540 Implement POSIX_MADV_WILLNEED/POSIX_MADV_DONTNEED for newer OSes
* 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>
2015-08-27 13:34:25 +02:00
Renamed from winsup/cygwin/release/2.2.2 (Browse further)