aboutsummaryrefslogtreecommitdiff
path: root/newlib
AgeCommit message (Collapse)AuthorFilesLines
2018-01-16cygwin: add LFS_CFLAGS etc. to confstr/getconfYaakov Selkowitz1-0/+4
These are used, for instance, when cross-compiling the Linux kernel. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-09newlib: fvprintf: fix get_arg for !_MB_CAPABLEIvan Grokhotkov1-0/+2
Code path for _MB_CAPABLE scans for the '%' character and advances 'fmt' pointer past '%'. Code path for !_MB_CAPABLE leaved fmt pointing to '%', which caused the state machine to go from START to DONE state immediately.
2018-01-08fix incompatible pointer type for va_list in nano versions of printf and ↵Alexander Fedotov2-5/+24
scanf for target like PowerPC
2017-12-26RISC-V: Add nanosleep functionalityJim Wilson1-1/+1
2017-12-18newlib: ftello{64}: Handle appending stream without fflushingCorinna Vinschen2-14/+26
Neither upstream FreeBSD nor glibc ever call fflush from ftell and friends. In border cases it has the tendency to return wrong or unexpected values, for instance on block devices. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-18newlib: ftello{64}: Fix type of returned valueCorinna Vinschen2-8/+8
Especially don't just use -1L since _off_t/_off64_t are not guaranteed to be of type long. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-18newlib: Availability of _kill() in sys/signal.hMartin Aberg1-2/+0
Make prototype of _kill() always visible when _COMPILING_NEWLIB is defined. This makes <sys/signal.h> consistent with the use of _COMPILING_NEWLIB in <sys/unistd.h>, <sys/times.h>, etc.
2017-12-13newlib: Don't do double divide in powf.Jim Wilson1-1/+3
* Use 0.0f instead of 0.0 in divide.
2017-12-13Don't call double rint from float powf.Jim Wilson1-2/+2
Updated patch to use 0.0f in addition to calling rintf. Tested same way as before, with a testcase that triggers the code and make check. OK? newlib/ * libm/math/wf_pow.c (powf): Call rintf instead of rint. Use 0.0f for compare.
2017-12-12Update MAINTAINERS file email address.Jim Wilson1-1/+1
To update my email address to my current employer. Specifix died quite a while ago, and I've had two jobs in the interim. newlib/ * MAINTAINERS: Update my email address.
2017-12-08makedoc: warn about some obsolete and deprecated commandsJon Turney2-16/+15
To follow up the thread starting at [1], since all uses of TRAD_SYNOPSIS have been removed, and all uses of ANSI_SYNOPSIS have been renamed to SYNOPSIS, we can now warn about the use of these. [1] https://sourceware.org/ml/newlib/2017/msg01182.html Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-07makedoc: exit with non-zero status on errorJon Turney1-8/+12
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-07makedoc: make errors visibleJon Turney46-182/+139
Discard QUICKREF sections, rather than writing them to stderr Discard MATHREF sections, rather than discarding as an error Pass NOTES sections through to texinfo, rather than discarding as an error Don't redirect makedoc stderr to .ref file Remove makedoc output on error Remove .ref files from CLEANFILES Regenerate Makefile.ins Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-04newlib: vfwscanf: fix negation bug in %[ conversionCorinna Vinschen1-1/+1
Old BSD bug: While ^ is recognized and the set of matching characters is negated, the code neglects to increment the pointer pointing to the matching characters. Thus, on a negation expression like %[^xyz], the matching doesn't only stop at x, y, or z, but incorrectly also on ^. Fix this by setting the start pointer after recognizing the ^. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-04ssp: add Object Size Checking for wchar.h, part 1Yaakov Selkowitz3-0/+109
The following functions are also guarded in glibc: fwprintf, swprintf, wprintf, vfwprintf, vswprintf, vwprintf. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01newlib: vfscanf: Implement %l[Corinna Vinschen1-2/+88
Just as %lc and %ls, this is only enabled on ELIX_LEVEL >= 2. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01newlib: vf[w]scanf: Fix conversion multibyte <-> wchar_tCorinna Vinschen2-25/+53
* vfscanf: per POSIX, if the target type is wchar_t, the width is counted in (multibyte) characters, not in bytes. * vfscanf: Handle UTF-8 multibyte sequences converted to surrogate pairs on UTF-16 systems. * vfwscanf: Don't count high surrogates in input against field width counting. Per POSIX, input is Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01newlib: vf[w]scanf: Drop width computation mixupCorinna Vinschen2-70/+44
The width value keeps the maximum field width. This is the maximum field width of the *input*. It's *never* to be used in conjunction with the number of bytes or characters written to the output argument. However, especially in vfwscanf, the code is partially taken from NetBSD which erroneously subtracts the number of multibyte chars written to the argument from the width variable, thus potentially subtracting up to MB_CUR_MAX from width for a single character in the input stream. To make matters worse, the previous patch adding %m added basically the same mistake for 'c' type input. Fix it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01HOWTO: remove reference to TRAD_SYNOPSISYaakov Selkowitz1-7/+1
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01mathfp: remove TRAD_SYNOPSISYaakov Selkowitz28-344/+28
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01math: remove TRAD_SYNOPSISYaakov Selkowitz28-310/+28
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01libm/machine: remove TRAD_SYNOPSISYaakov Selkowitz3-12/+3
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01complex: remove TRAD_SYNOPSISYaakov Selkowitz23-23/+23
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01libm/common: remove TRAD_SYNOPSISYaakov Selkowitz30-133/+30
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01unix: remove TRAD_SYNOPSISYaakov Selkowitz2-32/+2
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01time: remove TRAD_SYNOPSISYaakov Selkowitz12-83/+12
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01sys: remove TRAD_SYNOPSISYaakov Selkowitz4-34/+4
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01string: remove TRAD_SYNOPSISYaakov Selkowitz85-546/+85
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01stdlib: remove TRAD_SYNOPSISYaakov Selkowitz50-607/+51
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01stdio64: remove TRAD_SYNOPSISYaakov Selkowitz7-81/+7
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01stdio: remove TRAD_SYNOPSISYaakov Selkowitz75-1022/+75
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01signal: remove TRAD_SYNOPSISYaakov Selkowitz3-29/+3
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01search: remove TRAD_SYNOPSISYaakov Selkowitz3-28/+3
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01reent: remove TRAD_SYNOPSISYaakov Selkowitz22-200/+25
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01posix: remove TRAD_SYNOPSISYaakov Selkowitz2-2/+2
2017-12-01misc: remove TRAD_SYNOPSISYaakov Selkowitz3-12/+3
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01powerpc: remove TRAD_SYNOPSISYaakov Selkowitz8-231/+8
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01nds32: remove TRAD_SYNOPSISYaakov Selkowitz1-5/+1
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01microblaze: remove TRAD_SYNOPSISYaakov Selkowitz4-25/+4
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01locale: remove TRAD_SYNOPSISYaakov Selkowitz5-21/+5
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01iconv: remove TRAD_SYNOPSISYaakov Selkowitz1-39/+1
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01ctype: remove TRAD_SYNOPSISYaakov Selkowitz33-189/+33
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01ssp: add Object Size Checking for unistd.h, part 2Yaakov Selkowitz2-3/+44
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30newlib: vf[w]scanf: Implement POSIX %m modifierCorinna Vinschen2-24/+448
* The new code is guarded with _WANT_IO_POSIX_EXTENSIONS, but this is automatically enabled with _WANT_IO_C99_FORMATS for now. * vfscanf neglects to implement %l[, so %ml[ is not implemented yet either. * Sidenote: vfwscanf doesn't allow ranges in %[ yet. Strictly this is allowed per POSIX, but it differes from vfscanf as well as from glibc. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30newlib: vfwscanf: fix miscomputation of max field width in %[] caseCorinna Vinschen1-1/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30Feature test macros overhaul: unistd.h, part 3Yaakov Selkowitz1-1/+21
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30ssp: add Object Size Checking for stdlib.hYaakov Selkowitz3-0/+38
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30newlib: vf[w]scanf: add validity checksCorinna Vinschen2-0/+37
POSIX requires that directive characters appear in a certain sequence: 1. '%' or '%<n>$' 2. optional '*' 3. optional field width digits 4. optional 'm' (not yet implemented) 5. optional length modifier ('l', 'L', 'll', 'h', 'hh', 'j', 't', 'z') 6. conversion specifier ('d', 's', etc) Add a few basic validity checks to that effect, otherwise reject directive as match failure. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30newlib: vf[w]scanf: Use SIZE_MAX rather than ~0Corinna Vinschen2-4/+4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30newlib: vfscanf: fix formattingCorinna Vinschen1-2/+2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>