aboutsummaryrefslogtreecommitdiff
path: root/newlib
AgeCommit message (Collapse)AuthorFilesLines
2018-03-14Fix alloc_align and alloc_size macros for multiple argumentsYaakov Selkowitz2-4/+4
https://sourceware.org/ml/newlib/2018/msg00263.html This is a follow-up to commit 4564b30f331a067e71b25308ac7c8a85ceb4b122. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-03-14ctype: align size of category bit fields to small targets needsCorinna Vinschen1-2/+2
E.g. arm ABI requires -fshort-enums for bare-metal toolchains. Given there are only 29 category enums, the compiler chooses an 8 bit enum type, so a size of 11 bits for the bitfield leads to a compile time error: error: width of 'cat' exceeds its type enum category cat: 11; ^~~ Fix this by aligning the size of the category members to byte borders. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-14Revert "ctype: align size of category bit fields to small targets needs"Corinna Vinschen1-2/+2
This reverts commit e98d3eb3eb9b6abd897e102031a14b7057641a65. It has accidentally included some work in progress.
2018-03-14fix/enhance Unicode table generation scriptsThomas Wolff2-18/+53
Scripts do not try to acquire Unicode data by best-effort magic anymore. Options supported: -h for help -i to copy Unicode data from /usr/share/unicode/ucd first -u to download Unicode data from unicode.org first If (despite of -i or -u if given) the necessary Unicode files are not available locally, table generation is skipped, but no error code is returned, so not to obstruct the build process if called from a Makefile.
2018-03-14ctype: align size of category bit fields to small targets needsCorinna Vinschen1-2/+2
E.g. arm ABI requires -fshort-enums for bare-metal toolchains. Given there are only 29 category enums, the compiler chooses an 8 bit enum type, so a size of 11 bits for the bitfield leads to a compile time error: error: width of 'cat' exceeds its type enum category cat: 11; ^~~ Fix this by aligning the size of the category members to byte borders. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-13towctrans_l: Always return a value from helper functionsCorinna Vinschen1-19/+49
touupper and toulower didn't return a value in all cases. Worse, this only broke Cygwin when building without optimization for debug purposes. Why GCC neglects to notice this is a mystery. While at it, fix formatting. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-13rtems/.../dirent.h: Add alphasort() prototypeJoel Sherrill1-0/+1
2018-03-13Correct alloc_size annotation on reallocarray()Jon Turney1-2/+1
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2018-03-12make target for explicit Unicode data tables generationThomas Wolff1-0/+9
Run 'make unidata' in newlib target directory to generate Unicode data tables for libc functions wcwidth, tow* and isw*.
2018-03-12character data generationThomas Wolff3-0/+237
2018-03-12use generated character dataThomas Wolff38-2681/+439
The tow* functions use an included case conversion table which can be generated from Unicode data. The isw* functions use a character categories table (provided by categories.c) which can be generated from Unicode data. Delegation between current-locale and specific-locale-dependent functions was reverted towards the generic locale-dependent functions (*_l.c); this is however only relevant on systems with non-Unicode wide character locales, thus not on Cygwin.
2018-03-12generated character category data, Unicode 10.0Thomas Wolff2-0/+2115
Table categories.t and tag enumeration categories.cat provide character class data for most of the isw* functions. These data are generated from Unicode data.
2018-03-12generated case conversion data, Unicode 10.0Thomas Wolff1-0/+304
Table caseconv.t provides case conversion data for the tow* functions, especially towupper and towlower. These data are generated from Unicode data.
2018-03-12width data generationThomas Wolff5-0/+1388
2018-03-12use generated width dataThomas Wolff1-126/+24
2018-03-12generated width data, Unicode 10.0Thomas Wolff3-0/+201
These tables provide character width properties for use by the wcwidth/wcswidth functions. They are generated from Unicode.
2018-03-06RTEMS: Use int for _CLOCKID_T_Sebastian Huber1-0/+3
Linux and FreeBSD use int as well. In addition, this fixes an Ada incompatiblity problem on 64-bit targets. See also GCC: gcc/ada/libgnarl/s-osinte__rtems.ads Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-03-06Make _CLOCKID_T_ system configurableSebastian Huber1-0/+3
Let systems optionally provide the _CLOCKID_T_ type via <machine/_types.h>. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-03-05Locale modifier @cjkwide to adjust ambiguous-width in non-CJK localesThomas Wolff1-16/+23
Locale modifier @cjkwide makes Unicode "ambiguous width" characters wide. So ambiguous width characters can be enforced to have width 2 even in non-CJK locales. This gives e.g. users of "Powerline symbols" the opportunity to adjust their width to the desired behaviour (and the behaviour apparently expected by some tools) without having to set a CJK locale and without losing consistence of terminal character width with wcwidth/wcswidth locale width.
2018-03-01Add global stdio streams support for reent small.Our Air Quality3-11/+56
2018-02-16add forward declaration to __cxa_atexit to aeabi_atexit, to prevent warningsJaap de Wolff1-0/+3
2018-02-16Add prototype to _malloc_lock() and *unlock() to malloc.h, and inlude this ↵Jaap de Wolff2-15/+5
from nano-mallocr.c
2018-02-16Add define _COMPILING_NEWLIB for arm to configure.host, as it is obviously ↵Jaap de Wolff1-0/+1
needed Signed-off-by: Jaap de Wolff <jaap@stretch.de-wolff.org>
2018-02-02newlib: drop Cygwin license from sys/select.hcygwin-2_10_0-releaseCorinna Vinschen1-11/+0
This license was accidentally retained when moving the file from Cygwin to newlib. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-01Fix vprintf and vfscanf for GCC PR 14577Jon Beniston2-33/+24
2018-01-31epiphany: Additional setjmp() and longjmp() symsSebastian Huber1-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>
2018-01-26ssp: do not use __ssp_protected_ symbol prefixesYaakov Selkowitz1-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>
2018-01-25Disable powf/log2?f/exp2?f optimization for single-precision Arm FPUThomas Preudhomme1-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.
2018-01-19Guard langinfo.h nl_item from multiple typedefsYaakov Selkowitz1-0/+3
This is a prerequisite of adding nl_types.h support to Cygwin. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-19Fix syntax error in exit.cOrlando Arias1-1/+1
This patch fixes a syntax error in exit.c that was introduced during the ANSI-fication of newlib. The patch fixes a compile-time issue that arises when newlib is configured with the --enable-lite-exit feature.
2018-01-18Bump release to 3.0.0 for yearly snapshotnewlib-snapshot-20180118newlib-3.0.0Jeff Johnston108-1156/+1153
- major release required due to removal of K&R support
2018-01-18RISC-V: Fix alignment issue in sigjmp_bufKito Cheng1-1/+3
2018-01-17ansification: remove ansidecl.h from makedocYaakov Selkowitz2-176/+51
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: fix makedoc for ANSI CYaakov Selkowitz1-2/+2
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _HAVE_STDCYaakov Selkowitz36-440/+1
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _EXFUN, _EXFUN_NOTHROWYaakov Selkowitz89-1800/+1742
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _EXFNPTR, _EXPARMYaakov Selkowitz13-81/+77
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _DEFUNYaakov Selkowitz622-2372/+1220
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _VOLATILE, _SIGNEDYaakov Selkowitz1-4/+0
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _VOIDYaakov Selkowitz39-104/+102
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _DEFUN_VOIDYaakov Selkowitz43-89/+87
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _CAST_VOIDYaakov Selkowitz17-38/+36
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _PTRYaakov Selkowitz71-228/+226
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _VOID_PTRYaakov Selkowitz18-148/+145
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _PARAMSYaakov Selkowitz30-379/+373
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _NOARGSYaakov Selkowitz1-3/+1
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _DOTSYaakov Selkowitz25-45/+43
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _CONSTYaakov Selkowitz321-1146/+1144
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _ANDYaakov Selkowitz453-1688/+1686
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-16Make __always_inline macro compatible with glibcYaakov Selkowitz1-1/+1
For example, this is used when cross-compiling the Linux kernel on Cygwin. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>