a49209d2bc
newlib: vf[w]scanf: Fix conversion multibyte <-> wchar_t
...
* 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-01 17:18:26 +01:00
9638c07527
newlib: vf[w]scanf: Drop width computation mixup
...
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-01 13:47:26 +01:00
70afa0c7b3
HOWTO: remove reference to TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:54 -06:00
9f369d3c8d
mathfp: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:54 -06:00
ec4c079f4b
math: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:53 -06:00
59822e777f
libm/machine: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:53 -06:00
ac8b60bdd1
complex: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:53 -06:00
3312f960a7
libm/common: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:53 -06:00
571ff42ae4
unix: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:53 -06:00
5aa2434de0
time: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:53 -06:00
adfde9d773
sys: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:52 -06:00
352c8f2f0d
string: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:52 -06:00
a38fc79ee9
stdlib: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:52 -06:00
a60026253d
stdio64: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:51 -06:00
c7ef9668cf
stdio: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:51 -06:00
b88cfbc1e5
signal: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:51 -06:00
bf3a554bc6
search: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:51 -06:00
35d2d2fe2e
reent: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:51 -06:00
aa06fa01dc
posix: remove TRAD_SYNOPSIS
2017-12-01 03:41:50 -06:00
191b4f35bc
misc: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:50 -06:00
1f1e477554
powerpc: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:50 -06:00
ddd22ee069
nds32: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:50 -06:00
4e8c64b928
microblaze: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:50 -06:00
59235deeec
locale: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:50 -06:00
03973c19e9
iconv: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:50 -06:00
9db7609592
ctype: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:50 -06:00
8ba0bbb913
ssp: add Object Size Checking for unistd.h, part 2
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-12-01 03:41:49 -06:00
10b57ba8d0
cygwin: Document latest changes, bump API minor
...
Signed-off-by: Corinna Vinschen <corinna@vinschen.de >
2017-11-30 21:57:16 +01:00
d43863f569
newlib: vf[w]scanf: Implement POSIX %m modifier
...
* 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-30 21:50:23 +01:00
27c1a7972c
cygwin: [w]mempcpy: fix global symbol
...
Signed-off-by: Corinna Vinschen <corinna@vinschen.de >
2017-11-30 21:34:29 +01:00
aea710b5fb
cygwin: x86_64: implement mempcpy/wmempcpy in assembler
...
* change memcpy to internal _memcpy not setting the return value in %rax
* implement all memcpy-like functions as caller to _memcpy, setting %rax
to correct return value beforehand. This is possible because _memcpy
does not use %rax at all
Signed-off-by: Corinna Vinschen <corinna@vinschen.de >
2017-11-30 21:15:28 +01:00
7161622514
newlib: vfwscanf: fix miscomputation of max field width in %[] case
...
Signed-off-by: Corinna Vinschen <corinna@vinschen.de >
2017-11-30 21:02:38 +01:00
b9a662bb4c
Feature test macros overhaul: unistd.h, part 3
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-30 12:09:05 -06:00
1e43e181c2
ssp: add Object Size Checking for stdlib.h
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-30 12:09:03 -06:00
0fd2c9bd12
newlib: vf[w]scanf: add validity checks
...
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-30 11:55:27 +01:00
31f11d0572
newlib: vf[w]scanf: Use SIZE_MAX rather than ~0
...
Signed-off-by: Corinna Vinschen <corinna@vinschen.de >
2017-11-30 11:41:36 +01:00
5e4a1c9c97
newlib: vfscanf: fix formatting
...
Signed-off-by: Corinna Vinschen <corinna@vinschen.de >
2017-11-30 11:41:36 +01:00
2e328edee4
newlib: vf[w]scanf: Only return from a single point to simplify cleanup
...
Signed-off-by: Corinna Vinschen <corinna@vinschen.de >
2017-11-30 11:41:36 +01:00
f636eae26f
cygwin: export wmempcpy
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-30 04:06:51 -06:00
8a94bca694
string: add wmempcpy
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-30 04:06:49 -06:00
da4839ec18
cygwin: add Object Size Checking to sys/socket.h
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-30 04:06:48 -06:00
b3281de25f
cygwin: add Object Size Checking to sys/poll.h
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-30 04:06:47 -06:00
dadc9e7e4a
RTEMS: Add semaphore <sys/lock.h> functions
...
Declare semaphore try wait and post binary functions.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de >
2017-11-30 07:00:45 +01:00
5a2ab9d55e
RTEMS: Timed wait by ticks <sys/lock.h> functions
...
Declare timed wait by ticks functions.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de >
2017-11-30 07:00:45 +01:00
186166f67a
RTEMS: Add set/get name <sys/lock.h> functions
...
Add inline functions to set/get the name.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de >
2017-11-30 07:00:45 +01:00
552a20ab4e
cygwin: create libssp compatibility import library
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-29 11:25:49 -06:00
6a848db442
cygwin: export SSP functions
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-29 11:25:48 -06:00
6f84ee8105
ssp: add build infrastructure
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-29 11:25:46 -06:00
192de5a349
ssp: add documentation
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com >
2017-11-29 11:25:45 -06:00
6b02865d80
ssp: add Object Size Checking for unistd.h, part 1
...
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-29 11:25:44 -06:00