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
path: root/newlib
AgeCommit message (Collapse)Author
2016-12-22This is an attempt to fix the problem described here:Jeff Johnston
https://sourceware.org/ml/newlib/2016/msg01139.html https://gcc.gnu.org/ml/gcc/2016-12/msg00010.html There is no change if libtool is used. Some run-time support libraries provided by GCC (e.g. libgomp) use configure checks to detect certain features, e.g. availability of thread-local storage. The configure script generates a test program and tries to compile and link it. It should use target libraries and startfiles of the build tree if available and not random ones from the installation prefix for this procedure. The search directories specified by -B are a bit special, see for_each_path() in gcc.c of the GCC sources. First a search is performed on all search paths with the multilib directory appended (if desired), then a second search is performed on demand with the base directory only. For each multilib there is a "newlib" subdirectory. This directory is specified by a -B option for the support libraries. In order to find the newlib artifacts (ctr0.o, libc.a, libg.a and libm.a) they must be located in a proper multilib subdirectory withing the build directory. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-12-20RTEMS: Increase SEM_VALUE_MAXSebastian Huber
RTEMS defined SEM_VALUE_MAX to 32767 unlike other systems like FreeBSD and glibc. A common value is INT_MAX. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-12-16Remove extraneous float casts in wcstod.c.Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-12-16Remove extraneous float casts in strtod.c.Jeff Johnston
2016-12-152016-12-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>cygwin-2_6_1-releaseJeff Johnston
* libc/stdlib/strtod.c (strtof_l): Set errno to ERANGE when double to float conversion results in infinity. (strtof): Likewise. * libc/stdlib/wcstod.c (wcstof_l): Likewise. (wcstof): Likewise.
2016-12-152016-12-15 Giuseppe Musumeci <giuseppe.musumeci@broadcom.com>Jeff Johnston
__sinit initialises some common file descriptors as line buffered and relies on the first users of such FDs to call __smakebuf_r. If __smakebuf_r realises there's no space for a buffer (malloc returns NULL), it makes them unbuffered. However, while setting the __SNBF bit, it doesn't clear the __SLBF bit in the flags. Depending on the order in which functions check buffering flags in the FD, sometime they assume it's line buffered (e.g. __sfvwrite_r), trashing application memory that's not really been allocated to them. This patch solves the problem by clearing the unbuffered/line buffered flag when setting the line buffered/unbuffered flag.
2016-12-12Big-endian fix for memcpy-armv7m.SJulian Brown
In the case of memcpy-armv7m.S being built for a big-endian multilib (including armv7 without a specific profile), realignment code made assumptions about the byte ordering being little-endian. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-12-06Fix 'make man' for parallel makeJon Turney
Ensure the Python Lex/Yacc (PLY) cache used by makedocbook is initialized before it is used by parallelizable rules to make the DocBook XML, as it appears that these can collide in cache generation, leading to errors. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-12-06Add <devctl.h> per POSIX 1003.26-2003Joel Sherrill
2016-12-05Add missing crt0 symbols for RTEMSSebastian Huber
In order to enable proper detection of thread-local storage availability we have to provide some symbols on ARM. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-28Enforce no arguments for __get_current_locale/__get_C_localeCorinna Vinschen
Remember: foo() != foo(void) Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-11-28Correct argument to __get_current_locale.Douglas
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-11-24Self-contained pthread_spinlock_t for RTEMSSebastian Huber
Turn pthread_spinlock_t into a self-contained object. On uni-processor configurations, interrupts are disabled in the lock/trylock operations and the previous interrupt status is restored in the corresponding unlock operations. On SMP configurations, a ticket lock is a acquired and released in addition. See also: https://devel.rtems.org/ticket/2674 This implementation is simple and efficient. However, this test case of the Linux Test Project would fail due to call of printf() and sleep() during spin lock ownership: https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-22Provide <memory.h>Sebastian Huber
Provide <memory.h> for all standard Newlib targets and remove Cygwin-specific header. Most POSIX like systems provide this historic header. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-22Declare non-standard pthread_yield()Sebastian Huber
The non-standard pthread_yield() function is available at least on Cygwin, FreeBSD and glibc. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-17Move pthread types to <sys/_pthreadtypes.h>Sebastian Huber
This makes it possible provide operating system specific types for <pthread.h>. It is in line with the FreeBSD header file structure and allows a future cleanup of <pthread.h> to not expose unrelated things via <sys/types.h> and <unistd.h>. Glibc uses the similar <bits/pthreadtypes.h> for this purpose. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-17Add _TICKET_LOCK_INITIALIZER to <sys/lock.h>Sebastian Huber
Add _TICKET_LOCK_INITIALIZER to statically initialize a _Ticket_lock_Control structure. This makes it possible to embed a ticket lock in other structures outside of <sys/lock.h>. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-17Use __inline in <sys/lock.h> for RTEMSSebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-08sys/cdefs.h: Define __hidden as empty on CygwinCorinna Vinschen
Non-default visibility attributes are unsupported on PE/COFF, so don't use in __hidden definition for Cygwin. Add comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-11-07Use external header file for kernel space timeSebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-07Add kernel space header for <sys/lock.h> for RTEMSSebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-07Use external header file for kernel space typesSebastian Huber
The FreeBSD kernel types are not used in Newlib. Provide them via an external header file to decouple Newlib and FreeBSD updates for RTEMS. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-07Provide cap_ioctl_t for RTEMSSebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-10-25Fix pdf build failure with texinfo 6.1.0Thomas Preudhomme
Hi, make pdf on Ubuntu 16.04 fail with: newlib/libc/libc.texinfo:9: Missing @endcsname inserted. After a lot of fiddling the reason appears to be the combination of concept and function index despite a lack of concept index entries. Arguably texinfo should not error in that case but here we are, newlib will fail to build its documentation on some systems because of this. Since libc.texinfo only contains function index entries this patch simply removes the combination of indices. It does the same for libm.texinfo which has concept index entries but no function index entries. Tested by running make pdf, make dvi, make info and make html successfully. libc.pdf appears to have only one index as expected. == Proposed commit message == Fix pdf build failure with texinfo 6.1.0 as provided in Ubuntu 16.04. Index combination in libc.texinfo and libm.texinfo fails because both file have only one type of index entries. Removing index combination is thus harmless and solves the problem. Is this ok for master? Best regards, Thomas
2016-10-25Provide vm_page_t for RTEMS via <machine/_types.h>Sebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-10-25Provide rman_res_t for RTEMS via <machine/types.h>Sebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-10-25Provide __intmax_t and __uintmax_tSebastian Huber
Provide __intmax_t and __uintmax_t via <machine/_default_types.h> and define intmax_t and uintmax_t in <sys/_stdint.h> for FreeBSD compatibility. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-10-25Fix typo in <sys/_stdint.h>Sebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-10-22towupper: Eliminate dead codeCorinna Vinschen
Fixes Coverity CID 59865 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22Fix a potential buffer overflow in wscanf familyCorinna Vinschen
Fixes Coverity CID 60046 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22get_alt_digits: Fix typo in allocationCorinna Vinschen
adi->digit is an array of CHAR *, not of CHAR **. Fixes Coverity CID 60043 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22Actually return value from __cp_indexCorinna Vinschen
Fixes Coverty CID 153470 Also drop redundant declaration of __cp_index. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22Drop redundant checks for NULL input string in wctomb helper funcsCorinna Vinschen
Fixes Coverity CIDs 153465 and 153466 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22Fix check for empty locale string in newlocaleCorinna Vinschen
The original test is broken. It tests for a NULL locale which isn't just wrong, it simply can't occur at this point due to an earlier check for a NULL locale string. Thus, the locale info for a category is never taken from the environment. Fixes Coverty CID 153467. Also, add comment. Also, add some parens for readability. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-21Add _PC_CASE_INSENSITIVE to [f]pathconfKen Brown
Update the getconf utility to support the new flag as well as _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY. These were previously unsupported, probably as an oversight. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-17Make ctype_.c and ctype_.h agree on _ctype_b typeThomas Preud'homme
_ctype_b is defined in ctype_.c as a const char array for non cygwin targets allowing negative ctype index but as a char array for the same targets in ctype_.h, giving type conflict at compile time. This is because the cygwin targets are not treated specially in the latter file. This patch adds the necessary logic for cygwin targets in ctype_.h.
2016-08-31Fix typo in strerror doccygwin-2_6_0-releaseCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-29Fix off_t typedef on Cygwin64Yaakov Selkowitz
While both long and long long are 64-bits on x86_64, they are distinct types, and long was used prior to commit 477463a2011ba81907a753df9ce7a71b6563db54. Changing this breaks the linking of previously compiled C++ functions with off_t arguments on 64-bit Cygwin with newly compiled code, as the mangling of long (l) and long long (x) differ. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-08-25Change return type from locale_t to struct __locale_t * as wellCorinna Vinschen
Complements commit 14228e2. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-25Drop duplicate _ctype_ declaration from ctype_.hCorinna Vinschen
It's already defined in ctype.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-25Drop global __ctype_ptr__ entirely in favor of using locale_t::ctype_ptrCorinna Vinschen
Keep __ctype_ptr__ available on Cygwin only, for backward compatibility with existing apps referencing it via the ctype macros. Otherwise initialize __global_locale.ctype_ptr and __C_locale.ctype_ptr and use them throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-25Use struct __locale_t * for reentrent locale functionsCorinna Vinschen
This fixes a build problem since locale_t is only defined if __POSIX_VISIBLE >= 200809. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-25Add strerror_l prototype, change str[n]casecmp_l feature testsBrian Inglis
strerror_l prototype was missing. str[n]casecmp_l feature tests in string.h vs. strings.h were transposed.
2016-08-24Avoid crash when calling __localeconv_l with __C_localeCorinna Vinschen
__C_locale is const. Thus, overwriting the lconv values in __localeconv_l will try to write to a R/O region. Given the lconv values in __C_locale are initialized, there's no reason to write them in __localeconv_l at all. Just return &__C_locale.lconv. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-24Use #if __GNU_VISIBLE, not #ifdef __GNU_VISIBLECorinna Vinschen
sys/features.h always defines __GNU_VISIBLE, either as 0 or 1. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-23strerror_l: Fix copy-and-paste typoEric Blake
Signed-off-by: Eric Blake <eblake@redhat.com>
2016-08-23Mention strerror_l in libc/string/strings.texCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-23Add __get_C_locale inline function and fix new locale code for !_MB_CAPABLE ↵Corinna Vinschen
targets Only access "C" locale using the new __get_C_locale inline function. Enable __global_locale for !_MB_CAPABLE targets. Accommodate !_MB_CAPABLE targets in new locale code. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-23Implement GNU extension strptime_lCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-23Implement GNU extension wcsftime_lCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>