summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cygwin: pread() returns non-zero if read beyond EOFXiaofeng Liu2017-11-081-2/+5
| | | | | NtReadFile returns EOF status but doesn't set information to 0. Set return value explicitly on EOF.
* cygwin: fix stray semicolonCorinna Vinschen2017-11-071-1/+1
| | | | | | introduced by patch 1c50e0d1abd5cc790e72572af6fd6b03f7d1c594 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: add socket bugfix to release notesCorinna Vinschen2017-11-071-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix two bugs in the limit of large numbers of sockets:Erik M. Bray2017-11-071-2/+9
| | | | | | | | | | | | | | * Fix the maximum number of sockets allowed in the session to 2048, instead of making it relative to sizeof(wsa_event). The original choice of 2048 was in order to fit the wsa_events array in the .cygwin_dll_common shared section, but there is still enough room to grow there to have 2048 sockets on 64-bit as well. * Return an error and set errno=ENOBUF if a socket can't be created due to this limit being reached. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Make ffsl() and ffsll() BSD-visibleSebastian Huber2017-11-031-3/+1
| | | | | | | | | | Since glibc 2.27, they are visible via _DEFAULT_SOURCE (__USE_MISC): https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man3/ffs.3?id=247bbcf00c9a425ab0ad6e303ec8718e4ba844a6 In FreeBSD, they are guarded by __BSD_VISIBLE. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* cygwin: ftruncate64: add missing bracesCorinna Vinschen2017-11-021-6/+8
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: add 2.9.1 release messages fileCorinna Vinschen2017-11-021-0/+16
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* posix_fallocate() *returns* error codes but does not set errnoErik M. Bray2017-11-024-18/+16
| | | | | | | | Also updates the fhandler_*::ftruncate implementations to adhere to the same semantics. The error handling semantics of those syscalls that use fhandler_*::ftruncate are moved to the implementations of those syscalls ( in particular ftruncate() and friends still set errno and return -1 on error but that logic is handled in the syscall implementation).
* posix_fadvise() *returns* error codes but does not set errnoErik M. Bray2017-11-023-11/+5
| | | | | Also updates the fhandler_*::fadvise implementations to adhere to the same semantics.
* newlib/configure.host: Remove obsolete definition of ↵Joel Sherrill2017-11-021-2/+0
| | | | | | | _I386MACH_ALLOW_HW_INTERRUPTS The *-*-rtems* targets defined this even though the conditional was no longer present in i386/setjmp.S.
* RTEMS: Remove internal timecounter APISebastian Huber2017-10-261-29/+4
| | | | | | | Change copyright. Original BSD content moved to <machine/_kernel_time.h>. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* winsup/utils/dump_setup.cc: Remove the function 'base'Ken Brown2017-10-251-16/+1
| | | | | | This was called only on filenames in /etc/setup/installed.db, which are all basenames anyway. Moreover, base wasn't correctly handling filenames containing colons.
* Fixed semihosting for AArch64 when heapinfo parameters are not provided by ↵Alexander Fedotov2017-10-242-26/+59
| | | | debugger
* fix internal __ieee754_expf and __ieee754_logf callsSzabolcs Nagy2017-10-201-0/+11
| | | | | | | | | | | | | | | | | The recently added new math code inlines error handling instead of using error handling wrappers around __ieee754* internal symbols, and thus the __ieee754* symbols are no longer provided. However __ieee754_expf and __ieee754_logf are used in the implementation of a number of other math functions. These symbols are safe to redirect to the external expf and logf symbols, because those names are always reserved when single precision math functions are reserved and the additional error handling code is either not reached or there will be an error in the final result that will override an internal spurious errno setting. For consistency all of __ieee754_expf, __ieee754_logf and __ieee754_powf are redirected using a macro.
* cygwin: belatedly bump DLL minor versionCorinna Vinschen2017-10-181-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: unlink: workaround NFS non-ability to move file in certain casesCorinna Vinschen2017-10-181-8/+43
| | | | | | | | | | | Under some not quite clear conditions, NFS fails to use its unlink workaround to rename a file to ".nfsXYZ". The problem has been reproduced with the GAWK testext.awk testcase. To workaround this in Cygwin, we now call try_to_bin on NFS, too. For some reason NFS doesn't fail to rename the .cygXYZ file to .nfsXYZ after this Cygwin rename. Fix comment in unlink_nt accordingly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: unlink: don't try "final trick" in try_to_bin on NFSCorinna Vinschen2017-10-181-2/+2
| | | | | | Doesn't work. Just another STATUS_SHARING_VIOLATION. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: unlink: fix "final trick" overwrite method on remote drivesCorinna Vinschen2017-10-181-2/+16
| | | | | | | | The "final trick" code in try_to_bin accidentally never worked on remote drives because it relies on rootdir. Which isn't set for remote unlinks. The code now creates a full path for remote files. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: unlink: improve debug messages in try_to_binCorinna Vinschen2017-10-181-2/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: unlink: simplify rootdir handlingCorinna Vinschen2017-10-181-1/+1
| | | | | | | In try_to_bin, rootdir is NULL for remote drives anyway. No extra check required. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: unlink: drop redundant check for netapp FSCorinna Vinschen2017-10-181-1/+1
| | | | | | | The try_to_bin function isn't called for netapp FSes anyway, so testing for this FS type in the function is moot. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: unlink: Fix typos in commentsCorinna Vinschen2017-10-181-2/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* New expf, exp2f, logf, log2f and powf implementationsSzabolcs Nagy2017-10-1324-88/+1339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on code from https://github.com/ARM-software/optimized-routines/ This patch adds a highly optimized generic implementation of expf, exp2f, logf, log2f and powf. The new functions are not only faster (6x for powf!), but are also smaller and more accurate. In order to achieve this, the algorithm uses double precision arithmetic for accuracy, avoids divisions and uses small table lookups to minimize the polynomials. Special cases are handled inline to avoid the unnecessary overhead of wrapper functions and set errno to POSIX requirements. The new functions are added under newlib/libm/common, but the old implementations are kept (in newlib/libm/math) for non-IEEE or pre-C99 systems. Targets can enable the new math code by defining __OBSOLETE_MATH_DEFAULT to 0 in newlib/libc/include/machine/ieeefp.h, users can override the default by defining __OBSOLETE_MATH. Currently the new code is enabled for AArch64 and AArch32 with VFP. Targets with a single precision FPU may still prefer the old implementation. libm.a size changes: arm: -1692 arm/thumb/v7-a/nofp: -878 arm/thumb/v7-a+fp/hard: -864 arm/thumb/v7-a+fp/softfp: -908 aarch64: -1476
* RTEMS: Fix _PTHREAD_MUTEX_INITIALIZERSebastian Huber2017-10-131-1/+1
| | | | | | Add missing braces around initializer. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* cygwin: fix gethostbyaddr argument typesYaakov Selkowitz2017-10-102-3/+3
| | | | | | | | The first argument of gethostbyaddr needs to accept a generic pointer to be compatible with e.g. struct in_addr *. This caused an issue compiling krb5-1.15. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Feature test macros overhaul: Cygwin netdb.hYaakov Selkowitz2017-10-101-2/+24
| | | | | | | herror etc. are MISC, rcmd etc. are BSD, addrinfo functions are POSIX.1-2001, except for IDN functionality which is GNU. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* cygwin: fix potential buffer overflow in forkMichael Haubenwallner2017-10-101-7/+2
| | | | | | | When fork fails, we can use "%s" now with system_sprintf for the errmsg rather than a (potentially too small) buffer for the format string. * fork.cc (fork): Use "%s" with system_printf now.
* cygwin: fix potential buffer overflow in small_sprintfMichael Haubenwallner2017-10-101-2/+2
| | | | | | | | With "%C" format string, argument may convert in up to MB_LEN_MAX bytes. Relying on sys_wcstombs to add a trailing zero here requires us to provide a large enough buffer. * smallprint.c (__small_vsprintf): Use MB_LEN_MAX+1 bufsize for "%C".
* Fix multido compilation on ARMTamar Christina2017-10-091-2/+2
| | | | | | | | | | | | | The previous multi-build implementation was copying the config.status from the parent multilib directory when building the different semihosting variants. It did so because the configuration doesn't change. However when you use a relative path to configure it turns out that the paths inside the config.status are also relative. To fix this, the srcdir is adjusted from the initial configuration instead of copying it. Tested on aarch64-none-elf and arm-none-eabi. Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* cygwin: initialize variable for stack unwindingMichael Haubenwallner2017-10-091-1/+1
| | | | | | | The third argument of RtlLookupFunctionEntry actually is documented as _Inout_opt_ for both x64 and ARM, although generic doc says _Out_ only. * exceptions.cc (__unwind_single_frame): Initialize hist variable.
* cygwin: disable -Wframe-address warning only on GCC 6 or laterCorinna Vinschen2017-10-092-1/+9
| | | | | | | This is required as long as we don't have a GCC 6.x cross compiler on Linux. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix typo with newlib-long-time_t default value.Michael Haubenwallner2017-10-092-2/+2
| | | | Fix typo for newlib-long-time_t to leave newlib-nano-malloc alone.
* adjust libnosys config for aarch64 to avoid linker error when switching from ↵Alexander Fedotov2017-10-092-0/+4
| | | | rdimon.specs to nosys.specs
* cygwin: Remove workaround for GCC 6 null pointer check warningsKen Brown2017-10-091-1/+1
|
* cygwin: Remove comparison of 'this' to NULL in _pinfo::existsKen Brown2017-10-095-8/+13
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::killKen Brown2017-10-091-3/+12
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::environKen Brown2017-10-092-2/+2
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::fdKen Brown2017-10-092-2/+2
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::pipe_fhandlerKen Brown2017-10-091-1/+1
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::commune_requestKen Brown2017-10-091-1/+1
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::cmdlineKen Brown2017-10-093-3/+3
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::cwdKen Brown2017-10-092-2/+2
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::rootKen Brown2017-10-092-2/+2
| | | | Fix all callers.
* cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::fdsKen Brown2017-10-092-2/+2
| | | | Fix all callers.
* cygwin: Remove comparisons of 'this' to 'NULL' in fhandler_dsp.ccKen Brown2017-10-091-15/+40
| | | | Fix all callers.
* RTEMS: Make pthread_mutex_t self-containedSebastian Huber2017-10-051-2/+28
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* RTEMS: Make pthread_cond_t self-containedSebastian Huber2017-10-051-2/+6
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* RTEMS: Make pthread_rwlock_t self-containedSebastian Huber2017-10-051-2/+7
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* RTEMS: Make pthread_barrier_t self-containedSebastian Huber2017-10-051-1/+7
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* RTEMS: Make sem_t self-containedSebastian Huber2017-10-051-2/+6
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>