aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
AgeCommit message (Collapse)AuthorFilesLines
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 Selkowitz318-1142/+1140
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17ansification: remove _ANDYaakov Selkowitz429-1595/+1593
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>
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-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-07makedoc: make errors visibleJon Turney33-99/+99
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-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>