]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
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>
6 years agoCygwin: pipe_data_available: cleanup code
Corinna Vinschen [Wed, 15 Nov 2017 19:11:05 +0000 (20:11 +0100)]
Cygwin: pipe_data_available: cleanup code

* Don't use a bool var to store three states (-1, 0, 1).
* Correctly check for NT_SUCCESS of a function returning NTSTATUS.
* Straighten out code for better readability.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Add FAQ How do I fix find_fast_cwd warnings?
Brian Inglis [Wed, 15 Nov 2017 06:01:42 +0000 (23:01 -0700)]
Cygwin: Add FAQ How do I fix find_fast_cwd warnings?

6 years agoCygwin: open: Remove unused code to handle HIDDEN and SYSTEM files
Corinna Vinschen [Tue, 14 Nov 2017 20:50:32 +0000 (21:50 +0100)]
Cygwin: open: Remove unused code to handle HIDDEN and SYSTEM files

Commit 603ef545bdbdbf7495e1a0bbabffb8741fc2a5bb broke this snippet and
commit 5b312b4747cc4acda39c187369c02fcea456513b didn't help at all since
FILE_CREATE is exactly *not* the situation the test was originally
supposed to handle.

In fact, none of the open flags used by fhandler_base::open actually
hits this problem anymore, so just drop the code.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: link: Simplify an expression
Corinna Vinschen [Tue, 14 Nov 2017 20:29:08 +0000 (21:29 +0100)]
Cygwin: link: Simplify an expression

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Bump DLL version to 2.10.0, bump API minor to 319
Corinna Vinschen [Tue, 14 Nov 2017 20:36:38 +0000 (21:36 +0100)]
Cygwin: Bump DLL version to 2.10.0, bump API minor to 319

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fcntl.h: Use test macros to guard non-standard open flags
Corinna Vinschen [Tue, 14 Nov 2017 20:31:31 +0000 (21:31 +0100)]
Cygwin: fcntl.h: Use test macros to guard non-standard open flags

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fcntl.h: Define O_NOATIME
Corinna Vinschen [Tue, 14 Nov 2017 20:29:37 +0000 (21:29 +0100)]
Cygwin: fcntl.h: Define O_NOATIME

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fcntl.h: Define O_TMPFILE and implement it
Corinna Vinschen [Tue, 14 Nov 2017 20:28:45 +0000 (21:28 +0100)]
Cygwin: fcntl.h: Define O_TMPFILE and implement it

Difference to Linux: We can't create files which don't show up
in the filesystem due to OS restrictions.  As a kludge, make a
(half-hearted) attempt to hide the file in the filesystem.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: open: cleanup code in preparation of O_TMPFILE
Corinna Vinschen [Tue, 14 Nov 2017 15:28:44 +0000 (16:28 +0100)]
Cygwin: open: cleanup code in preparation of O_TMPFILE

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib/libc/stdlib/realloc.c: fix variable name
Florian Schmidt [Tue, 14 Nov 2017 08:01:14 +0000 (09:01 +0100)]
newlib/libc/stdlib/realloc.c: fix variable name

The variable doesn't follow the convention of having the same name as
the function it's bundled with. Furthermore, it clashes with the
variable of the same name in newlib/libc/stdlib/calloc.c.

Signed-off-by: Florian Schmidt <florian.schmidt@neclab.eu>
6 years agonewlib/.../getreent.c: Allow to be provided by host and do so for RTEMS
Joel Sherrill [Wed, 11 Oct 2017 12:57:44 +0000 (07:57 -0500)]
newlib/.../getreent.c: Allow to be provided by host and do so for RTEMS

RTEMS provides the option to have a global or per-thread reentrancy
as part of application configuration. As part of this, RTEMS provides
the implementation of __getreent() as appropriate. Allow the target
to determine if this method is present in libc.a.

6 years agocygwin: pread: Remove incorrect comment
Corinna Vinschen [Wed, 8 Nov 2017 12:36:34 +0000 (13:36 +0100)]
cygwin: pread: Remove incorrect comment

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: fhandler_disk_file::pread: always print debug info on return
Corinna Vinschen [Wed, 8 Nov 2017 12:30:42 +0000 (13:30 +0100)]
cygwin: fhandler_disk_file::pread: always print debug info on return

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: pread() returns non-zero if read beyond EOF
Xiaofeng Liu [Wed, 8 Nov 2017 12:21:30 +0000 (13:21 +0100)]
cygwin: pread() returns non-zero if read beyond EOF

NtReadFile returns EOF status but doesn't set information to 0.
Set return value explicitly on EOF.

6 years agocygwin: fix stray semicolon
Corinna Vinschen [Tue, 7 Nov 2017 15:34:17 +0000 (16:34 +0100)]
cygwin: fix stray semicolon

introduced by patch 1c50e0d1abd5cc790e72572af6fd6b03f7d1c594

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: add socket bugfix to release notes
Corinna Vinschen [Tue, 7 Nov 2017 15:11:08 +0000 (16:11 +0100)]
cygwin: add socket bugfix to release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoFix two bugs in the limit of large numbers of sockets:
Erik M. Bray [Tue, 7 Nov 2017 13:44:49 +0000 (14:44 +0100)]
Fix two bugs in the limit of large numbers of sockets:

* Fix the maximum number of sockets allowed in the session to 2048,
  instead of making it relative to sizeof(wsa_event).

  The original choice of 2048 was in order to fit the wsa_events array
  in the .cygwin_dll_common shared section, but there is still enough
  room to grow there to have 2048 sockets on 64-bit as well.

* Return an error and set errno=ENOBUF if a socket can't be created
  due to this limit being reached.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoMake ffsl() and ffsll() BSD-visible
Sebastian Huber [Fri, 29 Sep 2017 05:29:03 +0000 (07:29 +0200)]
Make ffsl() and ffsll() BSD-visible

Since glibc 2.27, they are visible via _DEFAULT_SOURCE (__USE_MISC):

https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man3/ffs.3?id=247bbcf00c9a425ab0ad6e303ec8718e4ba844a6

In FreeBSD, they are guarded by __BSD_VISIBLE.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agocygwin: ftruncate64: add missing braces
Corinna Vinschen [Thu, 2 Nov 2017 18:13:09 +0000 (19:13 +0100)]
cygwin: ftruncate64: add missing braces

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: add 2.9.1 release messages file
Corinna Vinschen [Thu, 2 Nov 2017 17:09:39 +0000 (18:09 +0100)]
cygwin: add 2.9.1 release messages file

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoposix_fallocate() *returns* error codes but does not set errno
Erik M. Bray [Thu, 2 Nov 2017 15:45:35 +0000 (16:45 +0100)]
posix_fallocate() *returns* error codes but does not set errno

Also updates the fhandler_*::ftruncate implementations to adhere to the same
semantics.  The error handling semantics of those syscalls that use
fhandler_*::ftruncate are moved to the implementations of those syscalls (
in particular ftruncate() and friends still set errno and return -1 on error
but that logic is handled in the syscall implementation).

7 years agoposix_fadvise() *returns* error codes but does not set errno
Erik M. Bray [Thu, 2 Nov 2017 15:45:34 +0000 (16:45 +0100)]
posix_fadvise() *returns* error codes but does not set errno

Also updates the fhandler_*::fadvise implementations to adhere to the same
semantics.

7 years agonewlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS
Joel Sherrill [Fri, 27 Oct 2017 21:32:39 +0000 (16:32 -0500)]
newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS

The *-*-rtems* targets defined this even though the conditional
was no longer present in i386/setjmp.S.

7 years agoRTEMS: Remove internal timecounter API
Sebastian Huber [Tue, 24 Oct 2017 09:16:22 +0000 (11:16 +0200)]
RTEMS: Remove internal timecounter API

Change copyright.  Original BSD content moved to
<machine/_kernel_time.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agowinsup/utils/dump_setup.cc: Remove the function 'base'
Ken Brown [Tue, 24 Oct 2017 22:21:53 +0000 (18:21 -0400)]
winsup/utils/dump_setup.cc: Remove the function 'base'

This was called only on filenames in /etc/setup/installed.db, which
are all basenames anyway.  Moreover, base wasn't correctly handling
filenames containing colons.

7 years agoFixed semihosting for AArch64 when heapinfo parameters are not provided by debugger
Alexander Fedotov [Wed, 11 Oct 2017 11:52:20 +0000 (14:52 +0300)]
Fixed semihosting for AArch64 when heapinfo parameters are not provided by debugger

7 years agofix internal __ieee754_expf and __ieee754_logf calls
Szabolcs Nagy [Tue, 17 Oct 2017 11:41:20 +0000 (12:41 +0100)]
fix internal __ieee754_expf and __ieee754_logf calls

The recently added new math code inlines error handling instead of using
error handling wrappers around __ieee754* internal symbols, and thus the
__ieee754* symbols are no longer provided.

However __ieee754_expf and __ieee754_logf are used in the implementation
of a number of other math functions.  These symbols are safe to redirect
to the external expf and logf symbols, because those names are always
reserved when single precision math functions are reserved and the
additional error handling code is either not reached or there will be
an error in the final result that will override an internal spurious
errno setting.

For consistency all of __ieee754_expf, __ieee754_logf and __ieee754_powf
are redirected using a macro.

7 years agocygwin: belatedly bump DLL minor version
Corinna Vinschen [Wed, 18 Oct 2017 14:40:56 +0000 (16:40 +0200)]
cygwin: belatedly bump DLL minor version

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: unlink: workaround NFS non-ability to move file in certain cases
Corinna Vinschen [Wed, 18 Oct 2017 14:27:17 +0000 (16:27 +0200)]
cygwin: unlink: workaround NFS non-ability to move file in certain cases

Under some not quite clear conditions, NFS fails to use its
unlink workaround to rename a file to ".nfsXYZ".  The problem has been
reproduced with the GAWK testext.awk testcase.  To workaround this in
Cygwin, we now call try_to_bin on NFS, too.  For some reason NFS doesn't
fail to rename the .cygXYZ file to .nfsXYZ after this Cygwin rename.
Fix comment in unlink_nt accordingly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: unlink: don't try "final trick" in try_to_bin on NFS
Corinna Vinschen [Wed, 18 Oct 2017 14:22:14 +0000 (16:22 +0200)]
cygwin: unlink: don't try "final trick" in try_to_bin on NFS

Doesn't work.  Just another STATUS_SHARING_VIOLATION.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: unlink: fix "final trick" overwrite method on remote drives
Corinna Vinschen [Wed, 18 Oct 2017 14:21:12 +0000 (16:21 +0200)]
cygwin: unlink: fix "final trick" overwrite method on remote drives

The "final trick" code in try_to_bin accidentally never worked on
remote drives because it relies on rootdir.  Which isn't set for
remote unlinks.  The code now creates a full path for remote files.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: unlink: improve debug messages in try_to_bin
Corinna Vinschen [Wed, 18 Oct 2017 14:18:12 +0000 (16:18 +0200)]
cygwin: unlink: improve debug messages in try_to_bin

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This page took 0.070189 seconds and 5 git commands to generate.