aboutsummaryrefslogtreecommitdiff
path: root/newlib
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-11-30newlib: vf[w]scanf: Only return from a single point to simplify cleanupCorinna Vinschen2-4/+2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30string: add wmempcpyYaakov Selkowitz5-38/+85
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30RTEMS: Add semaphore <sys/lock.h> functionsSebastian Huber1-0/+4
Declare semaphore try wait and post binary functions. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30RTEMS: Timed wait by ticks <sys/lock.h> functionsSebastian Huber1-0/+16
Declare timed wait by ticks functions. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30RTEMS: Add set/get name <sys/lock.h> functionsSebastian Huber1-1/+71
Add inline functions to set/get the name. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-29ssp: add build infrastructureYaakov Selkowitz8-9/+798
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29ssp: add documentationYaakov Selkowitz3-0/+46
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29ssp: add Object Size Checking for unistd.h, part 1Yaakov Selkowitz2-0/+58
The implementation is from NetBSD, with the addition of feature test macros for readlink. glibc also wraps the following functions: confstr, getdomainname, getgroups, gethostname, getlogin_r, getwd, pread, readlinkat, ttyname_r. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29ssp: add Object Size Checking for stdio.h, part 1Yaakov Selkowitz7-0/+416
The implementation is mostly from NetBSD, except for switching fgets to pure inline, and the addition of fgets_unlocked, fread, and fread_unlocked for parity with glibc. The following functions are also guarded in glibc: asprintf, dprintf, fprintf, printf, vasprintf, vdprintf, vfprintf, vprintf. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29ssp: add Object Size Checking for strings.hYaakov Selkowitz2-0/+59
The implementation is from NetBSD, with the addition of explicit_bzero for parity with glibc. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29ssp: add Object Size Checking for string.hYaakov Selkowitz12-0/+652
The implementation is from NetBSD, with the addition of mempcpy (a GNU extension) for parity with glibc and libssp. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29ssp: add Object Size Checking common codeYaakov Selkowitz3-1/+107
The Object Size Checking (-D_FORTIFY_SOURCE=*) functionality provides wrappers around functions suspectible to buffer overflows. While independent from Stack Smashing Protection (-fstack-protector*), they are often used and implemented together. While GCC also provides an implementation in libssp, it is completely broken (CVE-2016-4973, RHBZ#1324759) and seemingly unfixable, as there is no reliable way for a preprocessor macro to trigger a link flag. Therefore, adding this here is necessary to make it work. Note that this does require building gcc with --disable-libssp and gcc_cv_libc_provides_ssp=yes. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>