summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cygwin: drop unused device nodes and clean up socket devicesCorinna Vinschen2018-02-238-49/+25
| | | | | | | | * Rename DEV_TCP_MAJOR to DEV_SOCK_MAJOR * Drop FH_TCP, FH_UDP, FH_ICMP in favor of single FH_INET * Drop FH_UNIX, FH_STREAM, FH_DGRAM in favor of single FH_LOCAL Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Move select functions into derived classesCorinna Vinschen2018-02-222-6/+72
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Rearrange methodsCorinna Vinschen2018-02-222-144/+145
| | | | | | Follow the same pattern in all fhandler_socket classes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Add derived fcntl methodsCorinna Vinschen2018-02-224-14/+57
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Add derived ioctl methodsCorinna Vinschen2018-02-224-50/+128
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Move shutdown and close methods into derived classesCorinna Vinschen2018-02-224-90/+160
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: make socketpair an AF_LOCAL-only methodCorinna Vinschen2018-02-224-32/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* doc/ntsec.xml: Fix typoDavid Macek2018-02-211-1/+1
|
* Cygwin: inline get_socket_flags()Corinna Vinschen2018-02-214-20/+33
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix whitespaces in socket codeCorinna Vinschen2018-02-213-7/+7
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: split out fhandler_socket into inet and local classesCorinna Vinschen2018-02-2110-2213/+3288
| | | | | | | | | | | | | First cut, still incomplete * fhandler_socket is now base class for other socket classes * fhandler_socket_inet handles AF_INET and AF_INET6 sockets * fhandler_socket_local handles AF_LOCAL/AF_UNIX sockets * finally get rid of fdsock by using set_socket_handle in accept4 * align file-related calls (fstat, fstatvfs, fchown, fchmod, facl) to Linux. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: net.cc: drop redundant declarationsCorinna Vinschen2018-02-201-4/+1
| | | | | | Replace cygwin_inet_aton call with cygwin_inet_pton Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: set/getsockopt: Move implementation into fhandler_socket classCorinna Vinschen2018-02-204-334/+348
| | | | | | This requires to export find_winsock_errno from net.cc. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: clean error mappingCorinna Vinschen2018-02-204-23/+18
| | | | | | | | | - Move definition of windows to POSIX error mapping struct into cygerrno.h - Move declaration of winsock errno functions to cygerrno.h - Input to error mapping functions is DWORD Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Make sure fraction of seconds constants enforce 64 bit computationCorinna Vinschen2018-02-201-4/+4
| | | | | | | Dropping the 'LL' specifier leads to 32 bit truncation during timestamp computation. Revert it. Exempt MSPERSEC which is used for 32 bit values. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix declaration of fhandler_socket::socketpairCorinna Vinschen2018-02-161-2/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix utils path handling in case cygdrive path is just '/'Corinna Vinschen2018-02-162-12/+22
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: net: Improve standars conformance commentsCorinna Vinschen2018-02-161-30/+35
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Add :: to potentially colliding WinSock callsCorinna Vinschen2018-02-161-6/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: socketpair: Move socketpair creation inside fhandler_socket classCorinna Vinschen2018-02-163-174/+197
| | | | | | | | Add fhandler_socket::socketpair method Deliberately disable AF_INET socketpairs for now Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: sockets: move common settings into set_socket_handle()Corinna Vinschen2018-02-162-18/+21
| | | | | | | Move setting address family, socket type and descriptor flags into fhandler_socket::set_socket_handle method. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* add forward declaration to main() to prevent warningsJaap de Wolff2018-02-161-0/+2
|
* adapt prototypes arm/syscalls.c to usual prototypes, and do not rely on ↵Jaap de Wolff2018-02-161-48/+49
| | | | implicit conversions
* add forward declaration to __cxa_atexit to aeabi_atexit, to prevent warningsJaap de Wolff2018-02-161-0/+3
|
* Add prototype to _malloc_lock() and *unlock() to malloc.h, and inlude this ↵Jaap de Wolff2018-02-162-15/+5
| | | | from nano-mallocr.c
* Add define _COMPILING_NEWLIB for arm to configure.host, as it is obviously ↵Jaap de Wolff2018-02-161-0/+1
| | | | | | needed Signed-off-by: Jaap de Wolff <jaap@stretch.de-wolff.org>
* Cygwin: socket: move socket creation inside fhandler_socket classCorinna Vinschen2018-02-143-46/+166
| | | | | | | | Add fhandler_socket::socket method Add fhandler_socket::set_socket_handle method, basically duplicating what fdsock is doing. This is the first step in getting rid of fdsock. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: improve O_TMPFILE handlingCorinna Vinschen2018-02-143-13/+29
| | | | | | | | | | | | | | | | Windows does not remove FILE_ATTRIBUTE_TEMPORARY by itself after a file has been closed. It's just some attribute which can be set or removed at will, despite its purpose. Apparently there are tools out there which use FILE_ATTRIBUTE_TEMPORARY accidentally or wrongly, even Microsoft's own tools are affected. In the end, the filesystem is potentially full of files with this attribute set. Implement O_TMPFILE files with FILE_ATTRIBUTE_TEMPORARY and FILE_ATTRIBUTE_HIDDEN set. This combination is pretty unlikely. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix file-related functions on unix socketsCorinna Vinschen2018-02-141-6/+33
| | | | | | | | | | * Fix an incorrect condition to recognize AF_LOCAL sockets in file-related functions (fchmod, fchown, fstat, fsttavfs, facl, link). * Return successfully when called on unnamed or abstract AF_LOCAL sockets, except link, just as on Linux. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: improve a comment in fhandler_socket::getsocknameCorinna Vinschen2018-02-141-3/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: /proc/<pid>/stat: Fix time handlingCorinna Vinschen2018-02-121-36/+19
| | | | | | | | * Use 64 bit timestamps * Use System boot and process start time to compute starttime value per Linux proc.5 description. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Drop HZ usage in favor of MSPERSEC and CLOCKS_PER_SECCorinna Vinschen2018-02-126-19/+25
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Define MSPERSEC and fix USPERSEC commentCorinna Vinschen2018-02-121-1/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Fix x86 compiler warningCorinna Vinschen2018-02-071-1/+1
| | | | | | | | | The previous patch introduced a compiler warning on x86. Given time_t is only 4 bytes on x86 we get a long vs. unsigned long comparison in timeval_to_ms. Fix it by careful casting. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: sockets: Handle SO_RCVTIMEO and SO_SNDTIMEOCorinna Vinschen2018-02-076-2/+98
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: setsockopt/getsockopt: Add missing optlen checksCorinna Vinschen2018-02-071-2/+21
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Cleanup time handlingCorinna Vinschen2018-02-0713-97/+115
| | | | | | | | | | | * Redefine NSPERSEC to NS100PERSEC * Define NSPERSEC as nanosecs per second * Define USPERSEC as microsecs per second * Use above constants throughout where appropriate * Rename to_us to timespec_to_us and inline * Rename it_bad to timespec_bad and inline Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: setsockopt/getsockopt: Clean up codeCorinna Vinschen2018-02-061-118/+207
| | | | | | | | | Rearrange setsockopt/getsockopt into per level/per optname preprocessing switch, actual call, per level/per optname postprocessing switch for better readability as well as extensibility. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: bindresvport: Guard prototypes with __MISC_VISIBLECorinna Vinschen2018-02-051-0/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: bindresvport: Try hard to find unused portCorinna Vinschen2018-02-052-8/+84
| | | | | | | | | | Workaround the problem that bind doesn't fail with EADDRINUSE if a socket with the same local address is still in TIME_WAIT. Use IP Helper functions to check if such a socket exist and don't even try this port, if so. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: bindresvport: check correctness of address familyCorinna Vinschen2018-02-051-1/+10
| | | | | | | | | | | | Assuming the address parameter is non-NULL, the test in cygwin_bindresvport_sa only tests if the address family is supported at all, which is insufficient. Check if the incoming address family matches the socket address family and for being AF_INET in cygwin_bindresvport since the latter doesn't support any other family. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: bindresvport_sa: Ignore incoming port numberCorinna Vinschen2018-02-051-12/+4
| | | | | | | Ignore port number just like glibc, otherwise suffer EADDRINUSE in subsequent connect calls. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Use SO_EXCLUSIVEADDRUSECorinna Vinschen2018-02-051-1/+1
| | | | | | | We're still using ~SO_REUSEADDR because SO_EXCLUSIVEADDRUSE wasn't defined in Mingw. But it is in Mingw-w64, so fix it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: bump version to 2.10.1Corinna Vinschen2018-02-021-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: drop Cygwin license from sys/select.hcygwin-2_10_0-releaseCorinna Vinschen2018-02-021-11/+0
| | | | | | This license was accidentally retained when moving the file from Cygwin to newlib. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix vprintf and vfscanf for GCC PR 14577Jon Beniston2018-02-012-33/+24
|
* epiphany: Additional setjmp() and longjmp() symsSebastian Huber2018-01-311-0/+4
| | | | | | | At least with Binutils 2.30 and GCC 7.3 we need symbol definitions without the leading underscore. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* ssp: do not use __ssp_protected_ symbol prefixesYaakov Selkowitz2018-01-261-1/+0
| | | | | | | | | This is a NetBSD-specific detail which does not apply to Newlib, causing linking issues in certain scenarios: https://cygwin.com/ml/cygwin/2018-01/msg00189.html Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Disable powf/log2?f/exp2?f optimization for single-precision Arm FPUThomas Preudhomme2018-01-251-1/+3
| | | | | | | | | | | | | | | | New optimized powf, logf, log2f, expf and exp2f yield worse performance on Arm targets with only single precision instructions because the double precision arithmetic is then implemented via softfloat routines. This patch uses the old implementation when double precision instructions are not available on Arm targets. Testing: Built newlib with GCC's rmprofile Arm multilibs and compared before/after -> only the above functions are changed and calls to them (name change from logf to __ieee754_logf and similar). Testing the changed function on a panel of values yields the same result before the original patches to improve them and after this one. Double checking the performance by looping the same panel of values being tested on Arm Cortex-M4 does show the performance regression is fixed.
* Define internal function mythreadname() -- revisedMark Geisert2018-01-245-4/+21
| | | | | | This new function returns the name of the calling thread; works for both cygthreads and pthreads. All calls to cygthread::name(/*void*/) replaced by calls to mythreadname(/*void*/).