Commit Graph

441 Commits

Author SHA1 Message Date
Corinna Vinschen 9ddf063921 Implement POSIX.1e ACL functions
* Makefile.in (DLL_OFILES): Add sec_posixacl.o.
	(SUBLIBS): Add libacl.a
	(libacl.a): New rule to create libacl.a.
	* common.din: Export POSIX ACL functions as well as most libacl.a
	extensions.
	* fhandler.h (fhander_base::acl_get): New prototype.
	(fhander_base::acl_set): Ditto.
	(fhandler_disk_file::acl_get): Ditto.
	(fhandler_disk_file::acl_set): Ditto.
	* include/acl/libacl.h: New file.
	* include/cygwin/version.h: Bump API minor version.
	* include/sys/acl.h: Drop including cygwin/acl.h.  Accommodate
	throughout Cygwin.  Add POSIX ACL definitions.
	* sec_acl.cc: Include sec_posixacl.h.  Replace ILLEGAL_UID and
	ILLEGAL_GID with ACL_UNDEFINED_ID where sensible.
	(__aclcheck): New internal acl check function to be used for
	Solaris and POSIX ACLs.
	(aclcheck32): Call __aclcheck.
	(__aclcalcmask): New function to compute ACL_MASK value.
	(__aclsort): New internal acl sort function to be used for Solaris
	and POSIX ACLs.
	(aclsort32): Call __aclsort.
	(permtostr): Work directly on provided buffer.
	(__acltotext): New internal acltotext function to be used for
	Solaris and POSIX ACLs.
	(acltotext32): Call __acltotext.
	(__aclfromtext): New internal aclfromtext function to be used for
	Solaris and POSIX ACLs.
	(aclfromtext32): Call __aclfromtext.
	* sec_posixacl.cc: New file implemeting POSIX ACL functions.
	* sec_posixacl.h: New internal header.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-08 13:56:40 +01:00
Yaakov Selkowitz 8b1ede3ce1 cygwin: Export clog10, clog10f
winsup/cygwin/
	* common.din: Add clog10, clog10f.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

	winsup/doc/
	* new-features.xml (ov-new2.5): Mention clog10, clog10f.
	* posix.xml (std-gnu): Add clog10, clog10f.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-02-22 14:45:37 -06:00
Corinna Vinschen 9a25a76e7b Bump Cygwin version to 2.5.0
Add a release file.  Add release text to documentation.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-13 16:55:00 +01:00
Corinna Vinschen 919137b3d8 Bump Cygwin version to 2.4.2.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-12 21:23:20 +01:00
Corinna Vinschen 3a720bf3f0 Bump cygwin version to 2.4.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-01-16 12:57:53 +01:00
Corinna Vinschen 80a800978b Convert utmp{x}name to int, return useful value. Define _PATH_UTMPX
* syscalls.cc (utmpname): Convert to int.  Return 0 if strdup
	worked, -1 otherwise.
	* include/utmpx.h (_PATH_UTMPX): Define as _PATH_UTMP.
	(utmpxname): Declare as int function.
	* include/sys/utmp.h (utmpname): Ditto.
	* include/cygwin/version.h: Bump API minor version.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-01-07 15:40:40 +01:00
Corinna Vinschen 049eeecba7 Bump Cygwin DLL version to 2.4.0
* include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2004.
	(CYGWIN_VERSION_API_MINOR): Reset to 0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-18 22:11:54 +01:00
Yaakov Selkowitz ed8beb5361 cygwin: export rpmatch(3)
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>
2015-11-17 12:23:33 -06:00
Corinna Vinschen 1968c57d9c Bump Cygwin DLL minor number
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-09 10:12:48 +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 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
Corinna Vinschen 986069c7e3 Bump Cygwin DLL minor number.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-08-24 18:35:49 +02:00
Corinna Vinschen 09d458b5c7 Bump Cygwin DLL minor number.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-08-03 21:46:55 +02:00
Corinna Vinschen 7c96ab0b43 Cygwin: Implement siglongjmp and sigsetjmp functions.
* libc/include/machine/setjmp.h (siglongjmp): Declare as function on
	Cygwin.
	(sigsetjmp): Ditto.
	(_longjmp): Mark as noreturn function on Cygwin.

	* common.din (siglongjmp): Export.
	(sigsetjmp): Export.
	* gendef: Change formatting of some comments.
	(sigsetjmp): Implement.
	(siglongjmp): Implement.
	(__setjmpex): x86_64 only: Drop entry point.
	(setjmp): x86_64 only: Store tls stackptr in Frame now, store MXCSR
	and FPUCW registers in Spare, as MSVCRT does.
	(longjmp): x86_64 only: Restore tls stackptr from Frame now, restore
	MXCSR and FPUCW registers from Spare.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

	* new-features.xml (ov-new2.2): Document sigsetjmp, siglongjmp.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-07-21 17:31:02 +02:00
Corinna Vinschen 1020bb292a Implement getcontext, setcontext, makecontext, swapcontext
* common.din (getcontext): Export.
        (makecontext): Export.
        (setcontext): Export.
        (swapcontext): Export.
        * exceptions.cc (__unwind_single_frame): New static functions, 64 bit
        only.
        (setcontext): New function.
        (getcontext): New function.
        (swapcontext): New function.
        (__cont_link_context): New function.
        (makecontext): New function.
        * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2002.
        (CYGWIN_VERSION_API_MINOR): Bump.
        * include/ucontext.h (getcontext): Add prototype.
        (setcontext): Ditto.
        (swapcontext): Ditto.
        (makecontext): Ditto.
        * ntdll.h (NtContinue): Ditto.

        * new-features.xml (ov-new2.2): Add new section.  Document getcontext,
        setcontext, makecontext, swapcontext.
        * posix.xml (std-deprec): Add getcontext, setcontext, makecontext,
        swapcontext.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-07-17 14:31:12 +02:00
Corinna Vinschen 9a69aac0ed Document the fact that we forgot to bump for sigaltstack and sethostname
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-07-17 14:02:43 +02:00
Corinna Vinschen 50b00d2b93 Add sethostname
* net.cc (sethostname): New function.
	* common.din (sethostname): Export
	* include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2001.
	(CYGWIN_VERSION_DLL_MINOR): Set to 0.

	* new-features.xml (ov-new): Rename from ov-new1.7.
	(ov-new2.1): Add new section.  Document sethostname.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-06-17 11:11:02 +02:00
Corinna Vinschen 5979b17401 Bump minor DLL version to 5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-06-11 12:59:12 +02:00
Corinna Vinschen 4c3946c350 Bump minor DLL version to 4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-06-08 13:58:39 +02:00
Corinna Vinschen da1611493a Bump minor DLL version to 3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-06-02 14:10:30 +02:00
Corinna Vinschen 761a123a4f Bump minor DLL version to 2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-05-03 12:28:39 +02:00
Corinna Vinschen d4058c6686 Bump minor DLL version to 1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-04-30 17:53:15 +02:00
Corinna Vinschen 5778304f16 Bump Cygwin version to 2.0.0.
* include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2000.
	(CYGWIN_VERSION_DLL_MINOR): Set to 0.

	* new-features.xml (ov-new2.0): Rename from ov-new1.7.36 and change
	version number to 2.0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-04-23 21:58:33 +02:00
Alexey Pavlov 63b41daeb6
Fix typo in include/cygwin/version.h
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-03-12 18:48:59 +01:00
Corinna Vinschen e8ef9994cf * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 36. 2015-03-04 11:46:02 +00:00
Corinna Vinschen 37e87b843f * common.din (issetugid): Export.
* glob.cc (issetugid): Drop macro.
	* sec_auth.cc (issetugid): New exported function.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2015-03-03 12:58:34 +00:00
Corinna Vinschen f1b0fac03c * common.din: Export cabsl, cimagl, creall, finitel, hypotl, sqrtl.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2015-02-06 17:09:50 +00:00
Corinna Vinschen b6c60d78c5 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 35. 2015-02-06 17:08:10 +00:00
Corinna Vinschen d550f1876f * common.din (wcstold): Export.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2015-02-04 11:03:36 +00:00
Corinna Vinschen d2264bce02 * common.din (sockatmark): Export.
* net.cc (sockatmark): New function.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2015-01-20 18:23:20 +00:00
Yaakov Selkowitz 65d785561d * common.din (__fbufsize, __flbf, __fpending, __freadable, __freading,
__fsetlocking, __fwritable, __fwriting, clearerr_unlocked,
feof_unlocked, ferror_unlocked, fflush_unlocked, fgetc_unlocked,
fgets_unlocked, fgetwc_unlocked, fgetws_unlocked, fileno_unlocked,
fputc_unlocked, fputs_unlocked, fputwc_unlocked, fputws_unlocked,
fread_unlocked, fwrite_unlocked, getwc_unlocked, getwchar_unlocked,
putwc_unlocked, putwchar_unlocked): Export.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-12-18 16:54:11 +00:00
Corinna Vinschen e20a68a56f * environ.cc (regopt): Remove function.
(environ_init): Drop undocumented feature to read application-specific
	environment variables from the registry.
	* include/cygwin/version.h (CYGWIN_INFO_PROGRAM_OPTIONS_NAME): Remove.
2014-12-08 11:21:14 +00:00
Yaakov Selkowitz 0548dda67f * common.din (__bsd_qsort_r): Add.
(qsort_r): Add.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-12-05 16:31:36 +00:00
Corinna Vinschen d544f256d1 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 34.
* new-features.xml (ov-new1.7.34): Add new section.
	(ov-new1.7.33): Reflect intermediate 1.7.33 release.
2014-11-13 13:10:26 +00:00
Corinna Vinschen 54f79f8650 * cygheap.h (cygheap_pwdgrp): Remove constants NSS_FILES and NSS_DB.
Use NSS_SRC_FILES and NSS_SRC_DB throughout instead.
	(cygheap_pwdgrp::nss_pwd_src): New inline method.
	(cygheap_pwdgrp::nss_grp_src): Ditto.
	* external.cc (cygwin_internal): Add CW_GETNSS_PWD_SRC and
	CW_GETNSS_GRP_SRC cases.
	* uinfo.cc: Use NSS_SRC_FILES and NSS_SRC_DB throughout.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GETNSS_PWD_SRC
	and CW_GETNSS_GRP_SRC.
	(NSS_SRC_FILES): Define.
	(NSS_SRC_DB): Define.
2014-11-12 11:19:08 +00:00
Corinna Vinschen dfc361dad4 * dcrt0.cc (cygwin_atexit): Change preceeding comment to reflect
API version numbers.
	* external.cc (cygwin_internal): disable setting cxx_malloc on 64 bit.
	Add CW_FIXED_ATEXIT case.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_FIXED_ATEXIT.
	* lib/atexit.c (atexit): Test running Cygwin version by checking
	return value of cygwin_internal (CW_FIXED_ATEXIT).
2014-11-06 15:32:21 +00:00
Yaakov Selkowitz d6aa3abb4f * common.din (stime): Export.
* times.cc (stime): New function.
* include/cygwin/time.h (stime): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-22 19:03:02 +00:00
Corinna Vinschen 1db937e986 * Makefile.in (DLL_OFILES): Add quotactl.o.
* common.din (quotactl): Export.
	* ntdll.h: Define FILE_FS_CONTROL_INFORMATION::FileSystemControlFlags
	flag values.
	(struct _FILE_FS_CONTROL_INFORMATION): Define.
	(struct _FILE_GET_QUOTA_INFORMATION): Define.
	(typedef struct _FILE_QUOTA_INFORMATION): Define.
	(NtQueryObject): Use PVOID rather than VOID*.
	(NtQueryVolumeInformationFile): Ditto.
	(NtQueryQuotaInformationFile): Declare.
	(NtSetQuotaInformationFile): Declare.
	(NtSetVolumeInformationFile): Declare.
	* quotactl.cc: New file implementing quotactl().
	* include/sys/mount.h (BLOCK_SIZE): Define.
	(BLOCK_SIZE_BITS): Define.
	* include/sys/quota.h: New header.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-17 08:19:27 +00:00
Corinna Vinschen 697b9afe00 Add setsockopt(sd, SOL_SOCKET, SO_PEERCRED, NULL, 0) to disable
initial handshake on AF_LOCAL sockets.
	* fhandler.h (class fhandler_socket): Add no_getpeereid status flag.
	(fhandler_socket::af_local_set_no_getpeereid): New prototype.
	* fhandler_socket.cc (fhandler_socket::af_local_connect): Skip handshake
	if no_getpeereid is set.  Add debug output.
	(fhandler_socket::af_local_accept): Likewise.
	(fhandler_socket::af_local_set_no_getpeereid): New function.
	(fhandler_socket::af_local_copy): Copy no_getpeereid.
	(fhandler_socket::getpeereid): Fail if no_getpeereid is set.
	* net.cc (cygwin_setsockopt): Add SO_PEERCRED for AF_LOCAL/SOCK_STREAM
	sockets.  Add comment to explain why we need it.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-11 18:28:04 +00:00
Corinna Vinschen d326f841c3 * common.din (ffsl): Export.
(ffsll): Export.
	* syscalls.cc (ffs): Implement using GCC intrinsic.
	(ffsl): Ditto.
	(ffsll): Ditto.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-08 21:03:40 +00:00
Corinna Vinschen 0d45f7ee54 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 33.
(CYGWIN_VERSION_API_MINOR): Bump to reflect intermediate 1.7.32 release.
2014-08-13 17:38:47 +00:00
Yaakov Selkowitz f9c956a1ff * common.din (__cxa_finalize): Export.
* dcrt0.cc (cygwin_atexit): Use d->handle with __cxa_atexit.
* dll_init.cc (dll_list::detach): Use d->handle with __cxa_finalize.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Use 274 for
__cxa_finalize as well.
2014-08-07 16:25:06 +00:00
Corinna Vinschen 79131d442e * common.din (__cxa_atexit): Export.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 274.
2014-08-04 16:52:04 +00:00
Corinna Vinschen 7cc124b0e5 bump to 32 2014-07-21 11:08:07 +00:00
Corinna Vinschen 50e4a3cdff Fix typo 2014-07-15 08:45:10 +00:00
Corinna Vinschen a25a812338 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 31. 2014-05-19 14:31:08 +00:00
Corinna Vinschen 2d0cb1acc7 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 273. 2014-05-15 11:24:42 +00:00
Corinna Vinschen 3d6a6ba138 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 30. 2014-04-10 19:20:49 +00:00
Corinna Vinschen 27afe3a4ab * localtime.cc: Define TM_GMTOFF and TM_ZONE based on __TM_GMTOFF and
__TM_ZONE being defined.  Throughout, write to these struct tm members
	only if CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS is true.
	* libc/strptime.cc: Ditto.
	* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS):
	Define.
	(CYGWIN_VERSION_API_MINOR): Bump to 272.
2014-03-05 12:45:49 +00:00