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
2016-08-15Implement newlocale, freelocale, duplocale, uselocaleCorinna Vinschen
Add global const __C_locale for reference purposes. Bump Cygwin API minor number and DLL major version number to 2.6.0. Signed-off by: Corinna Vinschen <corinna@vinschen.de>
2016-08-15POSIX-1.2008 per-thread locales, groundwork part 1Corinna Vinschen
Introduce first cut of struct _thr_locale_t used for the locale_t definition. Introduce global instance called __global_locale used by default. Introduce internal inline functions __get_global_locale, __get_locale_r, __get_current_locale. Remove usage of global variables in favor of accessor functions pointing to __global_locale for now. Include all local headers in locale subdir from setlocale.h to get single include for internal locale access. Introduce __CTYPE_PTR macro to replace direct access to __ctype_ptr__ and use throughout in isxxx functions. Signed-off by: Corinna Vinschen <corinna@vinschen.de>
2016-06-24Rename if_indextoname to cygwin_if_indextoname (analag for if_nametoindex)Corinna Vinschen
Just call OS functions
2016-03-29Add missing nanlCorinna Vinschen
* Makefile.in (MATH_OFILES): Add nanl.o. * common.din (nanl): Export. * math/nanl.c: New file. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29Add missing long double functions to CygwinCorinna Vinschen
This patch adds the long double functions missing in newlib to Cygwin. Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l}, isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib. Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin. Cygwin: * math: New subdir with math functions. * Makefile.in (VPATH): Add math subdir. (MATH_OFILES): List of object files collected from building files in math subdir. (DLL_OFILES): Add $(MATH_OFILES). ${CURDIR}/libm.a: Add $(MATH_OFILES) to build. * common.din: Add new functions from math subdir. * i686.din: Align to new math subdir. Remove functions now commonly available. * x86_64.din: Ditto. * math.h: math.h wrapper to define mingw structs used in some files in math subdir. * include/cygwin/version.h: Bump API minor version. newlib: * libc/include/complex.h: Add prototypes for complex long double functions. Only define for Cygwin. * libc/include/math.h: Additionally enable prototypes of long double functions for Cygwin. Add Cygwin-only prototypes for dreml, sincosl, exp10l and pow10l. Explain why we don't add them to newlib. * libc/include/tgmath.h: Enable long double handling on Cygwin. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29cygwin: export __getpagesizeYaakov Selkowitz
The inclusion of <sys/cygwin.h> by <sys/shm.h>, besides causing namespace pollution, also makes it very difficult to get the WINVER-dependent parts of the former. This affects code (such as x11vnc -unixpw_nis) which use both SysV shared memory (e.g. the X11 MIT-SHM extension) and user password authentication. getpagesize is the simplest function to retreive this information, but it is a legacy function and would also pollute the global namespace. The LSB lists another form which is in the implementation-reserved namespace: http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/baselib---getpagesize.html Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-03-08Implement POSIX.1e ACL functionsCorinna Vinschen
* 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-02-22cygwin: Export clog10, clog10fYaakov Selkowitz
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-13POSIX barrier implementation, take 3Václav Haisman
The attached patch should address all of the review comments. Modifed change log: Newlib: * libc/include/sys/features.h (_POSIX_BARRIERS): Define for Cygwin. * libc/include/sys/types.h (pthread_barrier_t) (pthread_barrierattr_t): Do not define for Cygwin. Cygwin: * common.din (pthread_barrierattr_init) (pthread_barrierattr_setpshared, pthread_barrierattr_getpshared) (pthread_barrierattr_destroy, pthread_barrier_init) (pthread_barrier_destroy, pthread_barrier_wait): Export. * include/cygwin/types.h (pthread_barrierattr_t) (pthread_barrier_t): Declare. * include/pthread.h (PTHREAD_BARRIER_SERIAL_THREAD) (pthread_barrierattr_init, pthread_barrierattr_setpshared) (pthread_barrierattr_getpshared, pthread_barrierattr_destroy) (pthread_barrier_init, pthread_barrier_destroy) (pthread_barrier_wait): Declare. * thread.h (PTHREAD_BARRIER_MAGIC) (PTHREAD_BARRIERATTR_MAGIC): Define. (class pthread_barrierattr, class pthread_barrier): Declare. * thread.cc (delete_and_clear): New local helper function. (class pthread_barrierattr, class pthread_barrier): Implement. * miscfuncs.h (likely, unlikely): New macros. -- VH
2015-11-20Import correctly working strtold from David M. Gay.Corinna Vinschen
* libc/stdlib/Makefile.am (GENERAL_SOURCES): Add strtodg.c and strtorx.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/strtodg.c: New file implementing generic string to long double conversion. * libc/stdlib/strtorx.c: New file, implementing IEEE format string to long double conversion. * libc/stdlib/mprec.h (_strtodg_r): Declare. (_strtorx_r): Declare. * libc/stdlib/gdtoa.h (__UShort): Define. * libc/stdlib/strtold.c (__flt_rounds): Define for i386 and x86_64 target. (FLT_ROUNDS): Define, as 0 on platforms missing a __flt_rounds function. (_strtold_r): Converted from strtold. Call _strtorx_r on targets supporting distinct long doubles. (strtold): Just call _strtold_r. * libc/include/stdlib.h (_strtold_r): Declare. * libc/stdlib/ldtoa.c (_strtold): Comment out. Explain why. * libc/stdio/vfscanf.c (__SVFSCANF_R): Call _strtold_r instead of _strtold. * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto. * common.din (strtold): Drop redirection to _strtold. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-17cygwin: export rpmatch(3)Yaakov Selkowitz
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-10-22Export aligned_alloc, at_quick_exit, quick_exit.Corinna Vinschen
* 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-07-21Cygwin: Implement siglongjmp and sigsetjmp functions.Corinna Vinschen
* 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-17Implement getcontext, setcontext, makecontext, swapcontextCorinna Vinschen
* 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-06-19Preliminary infrastructure to implement alternate stackCorinna Vinschen
* libc/include/sys/signal.h: Define SS_ONSTACK and SS_DISABLE unconditionally. (sigaltstack): Enable prototype on Cygwin. * common.din (sigaltstack): Export. * cygtls.cc (_cygtls::init_thread): Initialize altstack. * cygtls.h (__tlsstack_t): Rename from __stack_t to distinguish more clearly from stack_t. Accommodate throughout. (_cygtls): Add altstack member. * exceptions.cc (exception::handle): Set SIGSEGV handler to SIG_DFL if we encounter a stack overflow, and no alternate stack has been defined. * include/cygwin/signal.h (MINSIGSTKSZ): Define (SIGSTKSZ): Define. (SA_ONSTACK): Define. * signal.cc (sigaltstack): New function. * tlsoffset.h: Regenerate. * tlsoffset64.h: Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-06-17Add sethostnameCorinna Vinschen
* 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-04-23cygwin: add GNU basename(3)Yaakov Selkowitz
winsup/cygwin/ * common.din (__gnu_basename): Export. * path.cc (__gnu_basename): New function. winsup/doc/ * posix.xml (std-gnu): Add basename. (std-notes): Add note about two forms of basename.
2015-03-03 * common.din (issetugid): Export.Corinna Vinschen
* glob.cc (issetugid): Drop macro. * sec_auth.cc (issetugid): New exported function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2015-02-15 * i686.din (__mempcpy): Move symbol export from here...Corinna Vinschen
* common.din (__mempcpy): ... to here.
2015-02-06 * common.din: Export cabsl, cimagl, creall, finitel, hypotl, sqrtl.Corinna Vinschen
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2015-02-04 * common.din (wcstold): Export.Corinna Vinschen
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2015-01-20 * common.din (sockatmark): Export.Corinna Vinschen
* net.cc (sockatmark): New function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-12-18* common.din (__fbufsize, __flbf, __fpending, __freadable, __freading,Yaakov Selkowitz
__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-05* common.din (__bsd_qsort_r): Add.Yaakov Selkowitz
(qsort_r): Add. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-29 * common.din (__cxa_atexit): Define as cygwin__cxa_atexit.Corinna Vinschen
* dcrt0.cc (cygwin__cxa_atexit): New function. Explain what we do.
2014-10-22* common.din (stime): Export.Yaakov Selkowitz
* times.cc (stime): New function. * include/cygwin/time.h (stime): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-17 * Makefile.in (DLL_OFILES): Add quotactl.o.Corinna Vinschen
* 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-09 * common.din (ffsl): Export.Corinna Vinschen
(ffsll): Export. * syscalls.cc (ffs): Implement using GCC intrinsic. (ffsl): Ditto. (ffsll): Ditto. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-08-07* common.din (__cxa_finalize): Export.Yaakov Selkowitz
* 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-04 * common.din (__cxa_atexit): Export.Corinna Vinschen
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 274.
2013-11-26 * common.din: Export posix_spawn[...] functions.Corinna Vinschen
* exec.cc (execve): Add EXPORT_ALIAS _execve. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * posix.sgml (std-susv4): Add posix_spawn[...] here. (std-notimpl): Drop here.
2013-07-19* common.din: Export GetCommandLine{A,W}.Christopher Faylor
* kernel32.cc: Add includes needed for GetCommandLine functions. (ucmd): New function. (cygwin_GetCommandLineW): Ditto. (cygwin_GetCommandLineA): Ditto. * spawn.cc (child_info_spawn::worker): Rename one_line -> cmd. Use lb_wcs macro to generate a wide character version of the line buffer. Remove duplicate printing of command line. Don't access members of linebuf directly. * winf.h: Use pragma once. (linebuf): Make storage private. (linebuf::operator size_t): New operator. Return size of buf. (linebuf::operator wchar_t): New operator. (linebuf::wcs): New function. (lb_wcs): New macro. * include/cygwin/version.h: Bump API minor number to 268. * strfuncs.cc: Clarify descriptive file comment.
2013-06-24* common.din (rawmemchr): Export.Yaakov Selkowitz
* posix.sgml (std-gnu): Add rawmemchr. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2013-05-21 * Makefile.in (DLL_OFILES): Add arc4random.o.Corinna Vinschen
* common.din: Export arc4random, arc4random_addrandom, arc4random_buf, arc4random_stir and arc4random_uniform. * mktemp.cc (arc4random): Remove static replacement function. * posix.sgml (std-bsd): Add arc4random functions. * include/cygwin/stdlib.h: Declare arc4random functions. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * libc/arc4random.cc: New file implementing arc4random functions taken from FreeBSD.
2013-05-21 * libc/base64.c: New file.Corinna Vinschen
* Makefile.in (DLL_OFILES): Add base64.o. * common.din: Export __b64_ntop and __b64_pton. * posix.sgml (std-bsd): Add __b64_ntop and __b64_pton. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2013-05-13* i686.din: Remove _strtold.Christopher Faylor
* x86_64.din: Move strtold definition... * common.din: ...to here.
2013-05-01* i686.din: New file.Christopher Faylor
* x86_64.din: New file. * common.din: New file. * cygwin.din: Delete. * cygwin64.din: Delete. * gendef: Rework to take options rather than using positional parameters. Accept multiple files as input.