summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Feature test macros overhaul: Cygwin limits.h, part 2Yaakov Selkowitz2017-11-281-2/+28
| | | | | | | http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html https://sourceware.org/ml/newlib/2017/msg01133.html Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* cygwin: convert most #ifndef __x86_64__ to #ifdef __i386__Corinna Vinschen2017-11-2727-140/+140
| | | | | | Address the real offender Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: improve tags generationCorinna Vinschen2017-11-271-1/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: cleanup fhandler_socket::release_eventsCorinna Vinschen2017-11-271-7/+9
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add the Aarch64 SVE specific HWCAP_SVE defineJeff Johnston2017-11-221-0/+1
| | | | | | Checking in change from Alan Hayward <Alan.Hayward@arm.com> Signed-off-by: Jeff Johnston <jjohnstn@redhat.com>
* RTEMS: Add missing __getreent() to crt0Sebastian Huber2017-11-201-0/+1
| | | | | | | Default implementation was removed for RTEMS by b1a388799dc98e6d1451fb73aa71097cbf9f37d9. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* RTEMS: Add missing functions to crt0Sebastian Huber2017-11-201-5/+10
| | | | | | This helps to get some more features from libstdc++. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Cygwin: pipe_data_available: cleanup codeCorinna Vinschen2017-11-151-27/+40
| | | | | | | | * Don't use a bool var to store three states (-1, 0, 1). * Correctly check for NT_SUCCESS of a function returning NTSTATUS. * Straighten out code for better readability. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Add FAQ How do I fix find_fast_cwd warnings?Brian Inglis2017-11-151-0/+50
|
* Cygwin: open: Remove unused code to handle HIDDEN and SYSTEM filesCorinna Vinschen2017-11-141-8/+0
| | | | | | | | | | | | Commit 603ef545bdbdbf7495e1a0bbabffb8741fc2a5bb broke this snippet and commit 5b312b4747cc4acda39c187369c02fcea456513b didn't help at all since FILE_CREATE is exactly *not* the situation the test was originally supposed to handle. In fact, none of the open flags used by fhandler_base::open actually hits this problem anymore, so just drop the code. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: link: Simplify an expressionCorinna Vinschen2017-11-141-9/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Bump DLL version to 2.10.0, bump API minor to 319Corinna Vinschen2017-11-142-3/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fcntl.h: Use test macros to guard non-standard open flagsCorinna Vinschen2017-11-141-4/+12
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fcntl.h: Define O_NOATIMECorinna Vinschen2017-11-141-0/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fcntl.h: Define O_TMPFILE and implement itCorinna Vinschen2017-11-144-3/+103
| | | | | | | | Difference to Linux: We can't create files which don't show up in the filesystem due to OS restrictions. As a kludge, make a (half-hearted) attempt to hide the file in the filesystem. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: open: cleanup code in preparation of O_TMPFILECorinna Vinschen2017-11-141-55/+53
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib/libc/stdlib/realloc.c: fix variable nameFlorian Schmidt2017-11-141-1/+1
| | | | | | | | The variable doesn't follow the convention of having the same name as the function it's bundled with. Furthermore, it clashes with the variable of the same name in newlib/libc/stdlib/calloc.c. Signed-off-by: Florian Schmidt <florian.schmidt@neclab.eu>
* newlib/.../getreent.c: Allow to be provided by host and do so for RTEMSJoel Sherrill2017-11-132-2/+10
| | | | | | | RTEMS provides the option to have a global or per-thread reentrancy as part of application configuration. As part of this, RTEMS provides the implementation of __getreent() as appropriate. Allow the target to determine if this method is present in libc.a.
* cygwin: pread: Remove incorrect commentCorinna Vinschen2017-11-081-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: fhandler_disk_file::pread: always print debug info on returnCorinna Vinschen2017-11-081-2/+9
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* 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.