summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* RTEMS: Optimize pthread_once_tSebastian Huber2017-10-052-7/+6
| | | | | | Reduce size of pthread_once_t and make it zero-initialized. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* newlib/libm/complex/cargl.c change imag() real() to cimagl() creall()newlib-snapshot-20170922Brian Inglis2017-09-191-1/+1
|
* Fix warnings and documentation in strnstr.cSebastian Huber2017-09-191-4/+3
| | | | Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* cygwin: workaround GCC 6 changesYaakov Selkowitz2017-09-123-2/+6
| | | | | | | | | | | | | GCC 6 includes a number of new warnings which cause Cygwin to either not compile, or not work properly even if said warnings are ignored: https://cygwin.com/ml/cygwin-developers/2017-09/msg00000.html https://gcc.gnu.org/gcc-6/porting_to.html For now, we use the flags necessary to revert to GCC 5 behaviour until we can fix the code properly. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Revert "cygwin: only expose /dev/con{in,out,sole} when started from a ↵Yaakov Selkowitz2017-09-111-1/+1
| | | | | | | | | | | | Windows console" This caused serious regressions when running from a cmd window: https://cygwin.com/ml/cygwin/2017-09/msg00114.html This reverts commit b706c6b479422d31f0124b92c21b4cb536bbddff. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Change time_t to 64-bit by defaultSebastian Huber2017-09-077-3/+60
| | | | | | | | | In order to avoid the year 2038 problem, define time_t to a signed integer with at least 64-bits. The type for time_t can be forced to long with the --enable-newlib-long-time_t configure option or with the _USE_LONG_TIME_T system configuration define. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Remove harmful casts in gmtime_r()Sebastian Huber2017-09-071-2/+2
| | | | | | | | In case time_t is long, then the cast to long is a nop. In case time_t is __int_least64_t, then the cast to long may truncate the value before the division. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Let RTEMS provide clock()Sebastian Huber2017-09-071-1/+1
| | | | | | | | | | | Newlib uses _times_r() in clock(). The problem is that the _times_r() clock frequency is defined by sysconf(_SC_CLK_TCK). The clock frequency of clock() is the constant CLOCKS_PER_SEC. FreeBSD uses getrusage() for clock(). Since RTEMS has only one process, the implementation can be simplified. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* stdio.h: Don't define unlocked macros using static inline on C++cygwin-2_9_0-releaseCorinna Vinschen2017-09-041-1/+1
| | | | | | | | | | | | In C++, the usage of static inline functions for getchar_unlocked and putchar_unlocked may result in error messages like error: ‘_putchar_unlocked’ was not declared in this scope Fix this by not using the _getchar_unlocked and _putchar_unlocked macros in C++. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>