]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
6 years agoRISC-V: Moved syscalls to separate files to fix aliasing problems.
Jim Wilson [Tue, 26 Dec 2017 20:27:52 +0000 (12:27 -0800)]
RISC-V: Moved syscalls to separate files to fix aliasing problems.

6 years agoRISC-V: Updated syscall to take 6 arguments
Jim Wilson [Tue, 26 Dec 2017 20:26:19 +0000 (12:26 -0800)]
RISC-V: Updated syscall to take 6 arguments

6 years agoRISC-V: Add nanosleep functionality
Jim Wilson [Tue, 26 Dec 2017 20:24:45 +0000 (12:24 -0800)]
RISC-V: Add nanosleep functionality

6 years agoRISC-V: Fix libnosys build.
Jim Wilson [Tue, 26 Dec 2017 20:18:42 +0000 (12:18 -0800)]
RISC-V: Fix libnosys build.

6 years agocleanup winsup/doc/etc.{postinstall,preremove}.cygwin-doc.sh quote test variables...
Brian Inglis [Fri, 22 Dec 2017 18:35:56 +0000 (11:35 -0700)]
cleanup winsup/doc/etc.{postinstall,preremove}.cygwin-doc.sh quote test variables, correct utility paths, define site in preremove

6 years agowinsup/doc/etc.postinstall.cygwin-doc.sh fix shell variable typo
Brian Inglis [Fri, 22 Dec 2017 18:32:57 +0000 (11:32 -0700)]
winsup/doc/etc.postinstall.cygwin-doc.sh fix shell variable typo

6 years agocygwin: block devices: fix file offset after short writes newlib-snapshot-20171222
Corinna Vinschen [Tue, 19 Dec 2017 17:58:06 +0000 (18:58 +0100)]
cygwin: block devices: fix file offset after short writes

When reading/writing block devices, Cygwin emulates Linux, providing
a byte-exact file position, albeit the underlying device drivers don't.

Unfortunately this only worked correctly for reading.  The raw_write
method failed to revalidate the buffer after the read-modify-write
cycle in case len is not a multiple of the sector length.  This in
turn resulted in lseek reporting a wrong file pointer.

Also, fix a condition for invalidating the buffer after writing from
a remaining read buffer.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: document sigtimedwait and ftell{o} patch
Corinna Vinschen [Mon, 18 Dec 2017 19:21:15 +0000 (20:21 +0100)]
Cygwin: document sigtimedwait and ftell{o} patch

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: ftello{64}: Handle appending stream without fflushing
Corinna Vinschen [Mon, 18 Dec 2017 19:17:51 +0000 (20:17 +0100)]
newlib: ftello{64}: Handle appending stream without fflushing

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>
6 years agonewlib: ftello{64}: Fix type of returned value
Corinna Vinschen [Mon, 18 Dec 2017 19:15:27 +0000 (20:15 +0100)]
newlib: ftello{64}: Fix type of returned value

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>
6 years agonewlib: Availability of _kill() in sys/signal.h
Martin Aberg [Sun, 17 Dec 2017 18:23:51 +0000 (19:23 +0100)]
newlib: Availability of _kill() in sys/signal.h

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.

6 years agoCygwin: rearrange sigwait functions, convert sigwait_common to inline
Corinna Vinschen [Mon, 18 Dec 2017 18:44:30 +0000 (19:44 +0100)]
Cygwin: rearrange sigwait functions, convert sigwait_common to inline

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Implement sigtimedwait
Mark Geisert [Fri, 15 Dec 2017 01:05:55 +0000 (17:05 -0800)]
Cygwin: Implement sigtimedwait

Abstract out common code from sigwait/sigwaitinfo/sigtimedwait to
implement the latter.

6 years agowinsup: Belatedly add Mark Geisert to CONTRIBUTORS
Corinna Vinschen [Mon, 18 Dec 2017 18:42:42 +0000 (19:42 +0100)]
winsup: Belatedly add Mark Geisert to CONTRIBUTORS

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: Don't do double divide in powf.
Jim Wilson [Tue, 12 Dec 2017 19:39:13 +0000 (11:39 -0800)]
newlib: Don't do double divide in powf.

* Use 0.0f instead of 0.0 in divide.

6 years agoDon't call double rint from float powf.
Jim Wilson [Tue, 12 Dec 2017 19:38:01 +0000 (11:38 -0800)]
Don't call double rint from float powf.

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.

6 years agoUpdate MAINTAINERS file email address.
Jim Wilson [Tue, 12 Dec 2017 00:14:18 +0000 (16:14 -0800)]
Update MAINTAINERS file email address.

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.

6 years agocygwin: add mmap fork fix to 2.10.0 release test
Corinna Vinschen [Sun, 10 Dec 2017 13:32:34 +0000 (14:32 +0100)]
cygwin: add mmap fork fix to 2.10.0 release test

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: mmap: fix comment and formatting, drop unused code
Corinna Vinschen [Sun, 10 Dec 2017 13:11:41 +0000 (14:11 +0100)]
cygwin: mmap: fix comment and formatting, drop unused code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: mmap: fix a fork failure with private, anonymous mappings
Corinna Vinschen [Sun, 10 Dec 2017 13:11:03 +0000 (14:11 +0100)]
cygwin: mmap: fix a fork failure with private, anonymous mappings

Rounddown incoming addr on a page boundary. Without this, we may end
up with a fork error for private, anonymous maps.  The reason is, we
use VirtualAlloc in this case which will potentially overcommit if
addr is not on a page boundary.  This isn't taken into account in
bookkeeping, but fixup_mmaps_after_fork will eventually stumble over
this when trying to reproduce the copy-on-write pages: VirtualQuery
returns a region reaching beyond the supposedly allocated address
range and from there it goes downhill.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: Improve discussion of linker library ordering in faq-programming
Jon Turney [Mon, 6 Mar 2017 17:45:40 +0000 (17:45 +0000)]
cygwin: Improve discussion of linker library ordering in faq-programming

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
6 years agomakedoc: warn about some obsolete and deprecated commands
Jon Turney [Tue, 5 Dec 2017 18:40:44 +0000 (18:40 +0000)]
makedoc: warn about some obsolete and deprecated commands

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>
6 years agomakedoc: exit with non-zero status on error
Jon Turney [Mon, 4 Dec 2017 18:24:55 +0000 (18:24 +0000)]
makedoc: exit with non-zero status on error

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
6 years agomakedoc: make errors visible
Jon Turney [Mon, 4 Dec 2017 18:08:28 +0000 (18:08 +0000)]
makedoc: make errors visible

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>
6 years agocygwin: doc: cleanup cygutils info
Corinna Vinschen [Tue, 5 Dec 2017 16:58:02 +0000 (17:58 +0100)]
cygwin: doc: cleanup cygutils info

Especially don't keep on about d2u and u2d.  Dos2unix exists.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: vfwscanf: fix negation bug in %[ conversion
Corinna Vinschen [Mon, 4 Dec 2017 16:05:11 +0000 (17:05 +0100)]
newlib: vfwscanf: fix negation bug in %[ conversion

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>
6 years agossp: add Object Size Checking for wchar.h, part 1
Yaakov Selkowitz [Fri, 1 Dec 2017 18:45:14 +0000 (12:45 -0600)]
ssp: add Object Size Checking for wchar.h, part 1

The following functions are also guarded in glibc:
fwprintf, swprintf, wprintf, vfwprintf, vswprintf, vwprintf.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: document %l[ and bump API minor
Corinna Vinschen [Fri, 1 Dec 2017 17:21:59 +0000 (18:21 +0100)]
cygwin: document %l[ and bump API minor

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: vfscanf: Implement %l[
Corinna Vinschen [Fri, 1 Dec 2017 16:53:59 +0000 (17:53 +0100)]
newlib: vfscanf: Implement %l[

Just as %lc and %ls, this is only enabled on ELIX_LEVEL >= 2.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: vf[w]scanf: Fix conversion multibyte <-> wchar_t
Corinna Vinschen [Fri, 1 Dec 2017 16:18:26 +0000 (17:18 +0100)]
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>
6 years agonewlib: vf[w]scanf: Drop width computation mixup
Corinna Vinschen [Fri, 1 Dec 2017 12:47:26 +0000 (13:47 +0100)]
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>
6 years agoHOWTO: remove reference to TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:52:35 +0000 (02:52 -0600)]
HOWTO: remove reference to TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agomathfp: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:51:13 +0000 (02:51 -0600)]
mathfp: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agomath: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:45:57 +0000 (02:45 -0600)]
math: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agolibm/machine: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:37:42 +0000 (02:37 -0600)]
libm/machine: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocomplex: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:37:04 +0000 (02:37 -0600)]
complex: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agolibm/common: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:36:17 +0000 (02:36 -0600)]
libm/common: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agounix: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:23:19 +0000 (02:23 -0600)]
unix: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agotime: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:22:31 +0000 (02:22 -0600)]
time: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agosys: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:21:24 +0000 (02:21 -0600)]
sys: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agostring: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:20:06 +0000 (02:20 -0600)]
string: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agostdlib: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:17:18 +0000 (02:17 -0600)]
stdlib: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agostdio64: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:06:47 +0000 (02:06 -0600)]
stdio64: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agostdio: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:05:02 +0000 (02:05 -0600)]
stdio: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agosignal: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:43:14 +0000 (01:43 -0600)]
signal: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agosearch: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:41:48 +0000 (01:41 -0600)]
search: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoreent: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:41:14 +0000 (01:41 -0600)]
reent: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoposix: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 08:01:32 +0000 (02:01 -0600)]
posix: remove TRAD_SYNOPSIS

6 years agomisc: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:39:06 +0000 (01:39 -0600)]
misc: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agopowerpc: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:38:25 +0000 (01:38 -0600)]
powerpc: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agonds32: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:38:06 +0000 (01:38 -0600)]
nds32: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agomicroblaze: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:37:32 +0000 (01:37 -0600)]
microblaze: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agolocale: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:20:53 +0000 (01:20 -0600)]
locale: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoiconv: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:19:48 +0000 (01:19 -0600)]
iconv: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoctype: remove TRAD_SYNOPSIS
Yaakov Selkowitz [Thu, 30 Nov 2017 07:17:11 +0000 (01:17 -0600)]
ctype: remove TRAD_SYNOPSIS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agossp: add Object Size Checking for unistd.h, part 2
Yaakov Selkowitz [Thu, 30 Nov 2017 21:38:15 +0000 (15:38 -0600)]
ssp: add Object Size Checking for unistd.h, part 2

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: Document latest changes, bump API minor
Corinna Vinschen [Thu, 30 Nov 2017 20:57:16 +0000 (21:57 +0100)]
cygwin: Document latest changes, bump API minor

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: vf[w]scanf: Implement POSIX %m modifier
Corinna Vinschen [Thu, 30 Nov 2017 20:50:23 +0000 (21:50 +0100)]
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>
6 years agocygwin: [w]mempcpy: fix global symbol
Corinna Vinschen [Thu, 30 Nov 2017 20:34:29 +0000 (21:34 +0100)]
cygwin: [w]mempcpy: fix global symbol

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: x86_64: implement mempcpy/wmempcpy in assembler
Corinna Vinschen [Thu, 30 Nov 2017 09:47:38 +0000 (10:47 +0100)]
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>
6 years agonewlib: vfwscanf: fix miscomputation of max field width in %[] case
Corinna Vinschen [Thu, 30 Nov 2017 20:02:38 +0000 (21:02 +0100)]
newlib: vfwscanf: fix miscomputation of max field width in %[] case

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoFeature test macros overhaul: unistd.h, part 3
Yaakov Selkowitz [Thu, 30 Nov 2017 05:18:05 +0000 (23:18 -0600)]
Feature test macros overhaul: unistd.h, part 3

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agossp: add Object Size Checking for stdlib.h
Yaakov Selkowitz [Thu, 30 Nov 2017 03:17:09 +0000 (21:17 -0600)]
ssp: add Object Size Checking for stdlib.h

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agonewlib: vf[w]scanf: add validity checks
Corinna Vinschen [Thu, 30 Nov 2017 10:55:27 +0000 (11:55 +0100)]
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>
6 years agonewlib: vf[w]scanf: Use SIZE_MAX rather than ~0
Corinna Vinschen [Thu, 30 Nov 2017 10:40:34 +0000 (11:40 +0100)]
newlib: vf[w]scanf: Use SIZE_MAX rather than ~0

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: vfscanf: fix formatting
Corinna Vinschen [Thu, 30 Nov 2017 10:38:32 +0000 (11:38 +0100)]
newlib: vfscanf: fix formatting

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: vf[w]scanf: Only return from a single point to simplify cleanup
Corinna Vinschen [Thu, 30 Nov 2017 10:36:04 +0000 (11:36 +0100)]
newlib: vf[w]scanf: Only return from a single point to simplify cleanup

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: export wmempcpy
Yaakov Selkowitz [Thu, 30 Nov 2017 01:47:13 +0000 (19:47 -0600)]
cygwin: export wmempcpy

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agostring: add wmempcpy
Yaakov Selkowitz [Thu, 30 Nov 2017 01:45:56 +0000 (19:45 -0600)]
string: add wmempcpy

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: add Object Size Checking to sys/socket.h
Yaakov Selkowitz [Wed, 29 Nov 2017 17:38:54 +0000 (11:38 -0600)]
cygwin: add Object Size Checking to sys/socket.h

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: add Object Size Checking to sys/poll.h
Yaakov Selkowitz [Wed, 29 Nov 2017 17:38:17 +0000 (11:38 -0600)]
cygwin: add Object Size Checking to sys/poll.h

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoRTEMS: Add semaphore <sys/lock.h> functions
Sebastian Huber [Tue, 28 Nov 2017 07:00:33 +0000 (08:00 +0100)]
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>
6 years agoRTEMS: Timed wait by ticks <sys/lock.h> functions
Sebastian Huber [Tue, 28 Nov 2017 06:59:44 +0000 (07:59 +0100)]
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>
6 years agoRTEMS: Add set/get name <sys/lock.h> functions
Sebastian Huber [Tue, 28 Nov 2017 06:57:51 +0000 (07:57 +0100)]
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>
6 years agocygwin: create libssp compatibility import library
Yaakov Selkowitz [Tue, 28 Nov 2017 05:56:30 +0000 (23:56 -0600)]
cygwin: create libssp compatibility import library

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: export SSP functions
Yaakov Selkowitz [Tue, 28 Nov 2017 05:55:11 +0000 (23:55 -0600)]
cygwin: export SSP functions

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agossp: add build infrastructure
Yaakov Selkowitz [Tue, 28 Nov 2017 05:54:09 +0000 (23:54 -0600)]
ssp: add build infrastructure

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agossp: add documentation
Yaakov Selkowitz [Wed, 29 Nov 2017 00:11:59 +0000 (18:11 -0600)]
ssp: add documentation

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agossp: add Object Size Checking for unistd.h, part 1
Yaakov Selkowitz [Tue, 28 Nov 2017 05:49:18 +0000 (23:49 -0600)]
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>
6 years agossp: add Object Size Checking for stdio.h, part 1
Yaakov Selkowitz [Tue, 28 Nov 2017 05:24:16 +0000 (23:24 -0600)]
ssp: add Object Size Checking for stdio.h, part 1

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>
6 years agossp: add Object Size Checking for strings.h
Yaakov Selkowitz [Tue, 28 Nov 2017 05:21:35 +0000 (23:21 -0600)]
ssp: add Object Size Checking for strings.h

The implementation is from NetBSD, with the addition of explicit_bzero
for parity with glibc.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agossp: add Object Size Checking for string.h
Yaakov Selkowitz [Tue, 28 Nov 2017 05:14:15 +0000 (23:14 -0600)]
ssp: add Object Size Checking for string.h

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>
6 years agossp: add Object Size Checking common code
Yaakov Selkowitz [Tue, 28 Nov 2017 05:07:10 +0000 (23:07 -0600)]
ssp: add Object Size Checking common code

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>
6 years agossp: add APIs for Stack Smashing Protection
Yaakov Selkowitz [Tue, 28 Nov 2017 05:04:09 +0000 (23:04 -0600)]
ssp: add APIs for Stack Smashing Protection

Compiling with any of the -fstack-protector* flags requires the
__stack_chk_guard data import (which needs to be initialized) and the
__stack_chk_fail{,_local} functions.  While GCC's own libssp can provide
these, it is better that we provide these ourselves.  The implementation
is custom due to being OS-specific.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agonewlib: [w]scanf: Fix behaviour on matching failure
Corinna Vinschen [Wed, 29 Nov 2017 14:01:30 +0000 (15:01 +0100)]
newlib: [w]scanf: Fix behaviour on matching failure

The special handling of %\0 in [w]scanf is flawed.  It's just a
matching failure and should be handled as such.  scanf also
fakes an int input value on %X with X being an invalid conversion
char.  This is also just a matching failure and should be handled
the same way as %\0.

There's no indication of the reason for this "disgusting
backwards compatibility hacks" in the logs, given this
code made it into newlib before setting up the CVS repo.

Just handle these cases identically as matching failures.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygserver: remove all asserts on "this"
Corinna Vinschen [Tue, 28 Nov 2017 18:08:04 +0000 (19:08 +0100)]
cygserver: remove all asserts on "this"

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: fix getconf after commit 032aa2dba5a5bf90c198d930c8d309b5de57cb47
Yaakov Selkowitz [Tue, 28 Nov 2017 17:35:13 +0000 (11:35 -0600)]
cygwin: fix getconf after commit 032aa2dba5a5bf90c198d930c8d309b5de57cb47

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoMake __nonnull macro compatible with glibc
Yaakov Selkowitz [Tue, 28 Nov 2017 10:21:16 +0000 (04:21 -0600)]
Make __nonnull macro compatible with glibc

This form allows for multiple arguments, e.g. __nonnull((1,2)).

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: define _POSIX_TIMEOUTS
Yaakov Selkowitz [Tue, 28 Nov 2017 10:03:29 +0000 (04:03 -0600)]
cygwin: define _POSIX_TIMEOUTS

Since commit 8128f5482f2b1889e2336488e9d45a33c9972d11, we have all the
non-tracing functions listed in posixoptions(7).  The tracing functions
are gated by their own option, and are obsolecent anyway.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: don't allow empty strings in __ASMNAME tags
Corinna Vinschen [Tue, 28 Nov 2017 12:31:20 +0000 (13:31 +0100)]
cygwin: don't allow empty strings in __ASMNAME tags

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: improve _EXFUN tags generation
Corinna Vinschen [Tue, 28 Nov 2017 12:26:37 +0000 (13:26 +0100)]
cygwin: improve _EXFUN tags generation

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: remove accidentally committed debug statments
Corinna Vinschen [Tue, 28 Nov 2017 12:12:07 +0000 (13:12 +0100)]
cygwin: remove accidentally committed debug statments

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: further improve tags generation
Corinna Vinschen [Tue, 28 Nov 2017 12:10:34 +0000 (13:10 +0100)]
cygwin: further improve tags generation

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoFeature test macros overhaul: Cygwin limits.h, part 2
Yaakov Selkowitz [Tue, 28 Nov 2017 04:07:13 +0000 (22:07 -0600)]
Feature test macros overhaul: Cygwin limits.h, part 2

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
https://sourceware.org/ml/newlib/2017/msg01133.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: convert most #ifndef __x86_64__ to #ifdef __i386__
Corinna Vinschen [Mon, 27 Nov 2017 13:36:06 +0000 (14:36 +0100)]
cygwin: convert most #ifndef __x86_64__ to #ifdef __i386__

Address the real offender

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: improve tags generation
Corinna Vinschen [Mon, 27 Nov 2017 12:38:43 +0000 (13:38 +0100)]
cygwin: improve tags generation

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: cleanup fhandler_socket::release_events
Corinna Vinschen [Mon, 27 Nov 2017 12:38:21 +0000 (13:38 +0100)]
cygwin: cleanup fhandler_socket::release_events

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoAdd the Aarch64 SVE specific HWCAP_SVE define
Jeff Johnston [Wed, 22 Nov 2017 19:08:08 +0000 (14:08 -0500)]
Add the Aarch64 SVE specific HWCAP_SVE define

Checking in change from Alan Hayward <Alan.Hayward@arm.com>

Signed-off-by: Jeff Johnston <jjohnstn@redhat.com>
6 years agoRTEMS: Add missing __getreent() to crt0
Sebastian Huber [Mon, 20 Nov 2017 09:10:40 +0000 (10:10 +0100)]
RTEMS: Add missing __getreent() to crt0

Default implementation was removed for RTEMS by
b1a388799dc98e6d1451fb73aa71097cbf9f37d9.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
6 years agoRTEMS: Add missing functions to crt0
Sebastian Huber [Mon, 20 Nov 2017 07:52:09 +0000 (08:52 +0100)]
RTEMS: Add missing functions to crt0

This helps to get some more features from libstdc++.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This page took 0.064244 seconds and 5 git commands to generate.