]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
6 years agoCygwin: fhandler_socket: Add derived ioctl methods
Corinna Vinschen [Thu, 22 Feb 2018 15:30:08 +0000 (16:30 +0100)]
Cygwin: fhandler_socket: Add derived ioctl methods

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fhandler_socket: Move shutdown and close methods into derived classes
Corinna Vinschen [Thu, 22 Feb 2018 15:28:14 +0000 (16:28 +0100)]
Cygwin: fhandler_socket: Move shutdown and close methods into derived classes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: make socketpair an AF_LOCAL-only method
Corinna Vinschen [Thu, 22 Feb 2018 15:25:28 +0000 (16:25 +0100)]
Cygwin: make socketpair an AF_LOCAL-only method

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agodoc/ntsec.xml: Fix typo
David Macek [Wed, 21 Feb 2018 17:09:47 +0000 (18:09 +0100)]
doc/ntsec.xml: Fix typo

6 years agoCygwin: inline get_socket_flags()
Corinna Vinschen [Wed, 21 Feb 2018 21:00:04 +0000 (22:00 +0100)]
Cygwin: inline get_socket_flags()

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fix whitespaces in socket code
Corinna Vinschen [Wed, 21 Feb 2018 20:43:44 +0000 (21:43 +0100)]
Cygwin: fix whitespaces in socket code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: split out fhandler_socket into inet and local classes
Corinna Vinschen [Wed, 21 Feb 2018 20:40:01 +0000 (21:40 +0100)]
Cygwin: split out fhandler_socket into inet and local classes

First cut, still incomplete

* fhandler_socket is now base class for other socket classes
* fhandler_socket_inet handles AF_INET and AF_INET6 sockets
* fhandler_socket_local handles AF_LOCAL/AF_UNIX sockets
* finally get rid of fdsock by using set_socket_handle in accept4
* align file-related calls (fstat,  fstatvfs, fchown, fchmod, facl)
  to Linux.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: net.cc: drop redundant declarations
Corinna Vinschen [Tue, 20 Feb 2018 17:14:57 +0000 (18:14 +0100)]
Cygwin: net.cc: drop redundant declarations

Replace cygwin_inet_aton call with cygwin_inet_pton

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: set/getsockopt: Move implementation into fhandler_socket class
Corinna Vinschen [Tue, 20 Feb 2018 17:01:40 +0000 (18:01 +0100)]
Cygwin: set/getsockopt: Move implementation into fhandler_socket class

This requires to export find_winsock_errno from net.cc.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: clean error mapping
Corinna Vinschen [Tue, 20 Feb 2018 16:59:45 +0000 (17:59 +0100)]
Cygwin: clean error mapping

- Move definition of windows to POSIX error mapping struct into
  cygerrno.h
- Move declaration of winsock errno functions to cygerrno.h
- Input to error mapping functions is DWORD

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Make sure fraction of seconds constants enforce 64 bit computation
Corinna Vinschen [Tue, 20 Feb 2018 14:05:23 +0000 (15:05 +0100)]
Cygwin: Make sure fraction of seconds constants enforce 64 bit computation

Dropping the 'LL' specifier leads to 32 bit truncation during timestamp
computation.  Revert it.  Exempt MSPERSEC which is used for 32 bit values.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fix declaration of fhandler_socket::socketpair
Corinna Vinschen [Fri, 16 Feb 2018 16:34:57 +0000 (17:34 +0100)]
Cygwin: fix declaration of fhandler_socket::socketpair

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fix utils path handling in case cygdrive path is just '/'
Corinna Vinschen [Fri, 16 Feb 2018 16:21:48 +0000 (17:21 +0100)]
Cygwin: fix utils path handling in case cygdrive path is just '/'

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: net: Improve standars conformance comments
Corinna Vinschen [Fri, 16 Feb 2018 15:57:24 +0000 (16:57 +0100)]
Cygwin: net: Improve standars conformance comments

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fhandler_socket: Add :: to potentially colliding WinSock calls
Corinna Vinschen [Fri, 16 Feb 2018 15:41:42 +0000 (16:41 +0100)]
Cygwin: fhandler_socket: Add :: to potentially colliding WinSock calls

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: socketpair: Move socketpair creation inside fhandler_socket class
Corinna Vinschen [Fri, 16 Feb 2018 15:36:19 +0000 (16:36 +0100)]
Cygwin: socketpair: Move socketpair creation inside fhandler_socket class

Add fhandler_socket::socketpair method

Deliberately disable AF_INET socketpairs for now

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: sockets: move common settings into set_socket_handle()
Corinna Vinschen [Fri, 16 Feb 2018 15:23:32 +0000 (16:23 +0100)]
Cygwin: sockets: move common settings into set_socket_handle()

Move setting address family, socket type and descriptor flags
into fhandler_socket::set_socket_handle method.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoadd forward declaration to main() to prevent warnings
Jaap de Wolff [Mon, 12 Feb 2018 11:23:45 +0000 (12:23 +0100)]
add forward declaration to main() to prevent warnings

6 years agoadapt prototypes arm/syscalls.c to usual prototypes, and do not rely on implicit...
Jaap de Wolff [Mon, 12 Feb 2018 11:23:44 +0000 (12:23 +0100)]
adapt prototypes arm/syscalls.c to usual prototypes, and do not rely on implicit conversions

6 years agoadd forward declaration to __cxa_atexit to aeabi_atexit, to prevent warnings
Jaap de Wolff [Mon, 12 Feb 2018 11:23:43 +0000 (12:23 +0100)]
add forward declaration to __cxa_atexit to aeabi_atexit, to prevent warnings

6 years agoAdd prototype to _malloc_lock() and *unlock() to malloc.h, and inlude this from nano...
Jaap de Wolff [Mon, 12 Feb 2018 11:23:42 +0000 (12:23 +0100)]
Add prototype to _malloc_lock() and *unlock() to malloc.h, and inlude this from nano-mallocr.c

6 years agoAdd define _COMPILING_NEWLIB for arm to configure.host, as it is obviously needed
Jaap de Wolff [Mon, 12 Feb 2018 11:23:41 +0000 (12:23 +0100)]
Add define _COMPILING_NEWLIB for arm to configure.host, as it is obviously needed

Signed-off-by: Jaap de Wolff <jaap@stretch.de-wolff.org>
6 years agoCygwin: socket: move socket creation inside fhandler_socket class
Corinna Vinschen [Wed, 14 Feb 2018 21:21:58 +0000 (22:21 +0100)]
Cygwin: socket: move socket creation inside fhandler_socket class

Add fhandler_socket::socket method
Add fhandler_socket::set_socket_handle method, basically duplicating
what fdsock is doing.  This is the first step in getting rid of fdsock.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: improve O_TMPFILE handling
Corinna Vinschen [Wed, 14 Feb 2018 11:55:24 +0000 (12:55 +0100)]
Cygwin: improve O_TMPFILE handling

Windows does not remove FILE_ATTRIBUTE_TEMPORARY by itself after a
file has been closed.  It's just some attribute which can be set or
removed at will, despite its purpose.

Apparently there are tools out there which use FILE_ATTRIBUTE_TEMPORARY
accidentally or wrongly, even Microsoft's own tools are affected.  In
the end, the filesystem is potentially full of files with this attribute
set.

Implement O_TMPFILE files with FILE_ATTRIBUTE_TEMPORARY and
FILE_ATTRIBUTE_HIDDEN set.  This combination is pretty unlikely.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: fix file-related functions on unix sockets
Corinna Vinschen [Wed, 14 Feb 2018 09:20:42 +0000 (10:20 +0100)]
Cygwin: fix file-related functions on unix sockets

* Fix an incorrect condition to recognize AF_LOCAL sockets in
  file-related functions (fchmod, fchown, fstat, fsttavfs, facl, link).

* Return successfully when called on unnamed or abstract AF_LOCAL sockets,
  except link, just as on Linux.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: improve a comment in fhandler_socket::getsockname
Corinna Vinschen [Wed, 14 Feb 2018 09:31:02 +0000 (10:31 +0100)]
Cygwin: improve a comment in fhandler_socket::getsockname

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: /proc/<pid>/stat: Fix time handling
Corinna Vinschen [Mon, 12 Feb 2018 21:10:08 +0000 (22:10 +0100)]
Cygwin: /proc/<pid>/stat: Fix time handling

* Use 64 bit timestamps
* Use System boot and process start time to compute starttime value per
  Linux proc.5 description.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Drop HZ usage in favor of MSPERSEC and CLOCKS_PER_SEC
Corinna Vinschen [Mon, 12 Feb 2018 21:08:42 +0000 (22:08 +0100)]
Cygwin: Drop HZ usage in favor of MSPERSEC and CLOCKS_PER_SEC

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Define MSPERSEC and fix USPERSEC comment
Corinna Vinschen [Mon, 12 Feb 2018 20:21:58 +0000 (21:21 +0100)]
Cygwin: Define MSPERSEC and fix USPERSEC comment

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Fix x86 compiler warning
Corinna Vinschen [Wed, 7 Feb 2018 16:34:59 +0000 (17:34 +0100)]
Cygwin: Fix x86 compiler warning

The previous patch introduced a compiler warning on x86.

Given time_t is only 4 bytes on x86 we get a long vs. unsigned long
comparison in timeval_to_ms.  Fix it by careful casting.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: sockets: Handle SO_RCVTIMEO and SO_SNDTIMEO
Corinna Vinschen [Wed, 7 Feb 2018 15:16:51 +0000 (16:16 +0100)]
Cygwin: sockets: Handle SO_RCVTIMEO and SO_SNDTIMEO

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: setsockopt/getsockopt: Add missing optlen checks
Corinna Vinschen [Wed, 7 Feb 2018 14:37:48 +0000 (15:37 +0100)]
Cygwin: setsockopt/getsockopt: Add missing optlen checks

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Cleanup time handling
Corinna Vinschen [Wed, 7 Feb 2018 12:07:44 +0000 (13:07 +0100)]
Cygwin: Cleanup time handling

* Redefine NSPERSEC to NS100PERSEC
* Define NSPERSEC as nanosecs per second
* Define USPERSEC as microsecs per second
* Use above constants throughout where appropriate
* Rename to_us to timespec_to_us and inline
* Rename it_bad to timespec_bad and inline

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: setsockopt/getsockopt: Clean up code
Corinna Vinschen [Tue, 6 Feb 2018 17:42:00 +0000 (18:42 +0100)]
Cygwin: setsockopt/getsockopt: Clean up code

Rearrange setsockopt/getsockopt into per level/per optname
preprocessing switch, actual call,  per level/per optname
postprocessing switch for better readability as well as
extensibility.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: bindresvport: Guard prototypes with __MISC_VISIBLE
Corinna Vinschen [Mon, 5 Feb 2018 20:06:29 +0000 (21:06 +0100)]
Cygwin: bindresvport: Guard prototypes with __MISC_VISIBLE

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: bindresvport: Try hard to find unused port
Corinna Vinschen [Mon, 5 Feb 2018 20:05:09 +0000 (21:05 +0100)]
Cygwin: bindresvport: Try hard to find unused port

Workaround the problem that bind doesn't fail with EADDRINUSE
if a socket with the same local address is still in TIME_WAIT.

Use IP Helper functions to check if such a socket exist and don't
even try this port, if so.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: bindresvport: check correctness of address family
Corinna Vinschen [Mon, 5 Feb 2018 20:00:15 +0000 (21:00 +0100)]
Cygwin: bindresvport: check correctness of address family

Assuming the address parameter is non-NULL, the test in
cygwin_bindresvport_sa only tests if the address family is
supported at all, which is insufficient.

Check if the incoming address family matches the socket
address family and for being AF_INET in cygwin_bindresvport
since the latter doesn't support any other family.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: bindresvport_sa: Ignore incoming port number
Corinna Vinschen [Mon, 5 Feb 2018 18:27:55 +0000 (19:27 +0100)]
Cygwin: bindresvport_sa: Ignore incoming port number

Ignore port number just like glibc, otherwise suffer EADDRINUSE
in subsequent connect calls.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: Use SO_EXCLUSIVEADDRUSE
Corinna Vinschen [Mon, 5 Feb 2018 18:22:47 +0000 (19:22 +0100)]
Cygwin: Use SO_EXCLUSIVEADDRUSE

We're still using ~SO_REUSEADDR because SO_EXCLUSIVEADDRUSE wasn't
defined in Mingw.  But it is in Mingw-w64, so fix it.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoCygwin: bump version to 2.10.1
Corinna Vinschen [Fri, 2 Feb 2018 14:32:28 +0000 (15:32 +0100)]
Cygwin: bump version to 2.10.1

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agonewlib: drop Cygwin license from sys/select.h cygwin-2_10_0-release
Corinna Vinschen [Fri, 2 Feb 2018 10:27:58 +0000 (11:27 +0100)]
newlib: drop Cygwin license from sys/select.h

This license was accidentally retained when moving the file from Cygwin to newlib.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoFix vprintf and vfscanf for GCC PR 14577
Jon Beniston [Thu, 1 Feb 2018 09:06:00 +0000 (09:06 +0000)]
Fix vprintf and vfscanf for GCC PR 14577

6 years agoepiphany: Additional setjmp() and longjmp() syms
Sebastian Huber [Wed, 31 Jan 2018 07:14:44 +0000 (08:14 +0100)]
epiphany: Additional setjmp() and longjmp() syms

At least with Binutils 2.30 and GCC 7.3 we need symbol definitions
without the leading underscore.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
6 years agossp: do not use __ssp_protected_ symbol prefixes
Yaakov Selkowitz [Wed, 24 Jan 2018 03:53:04 +0000 (21:53 -0600)]
ssp: do not use __ssp_protected_ symbol prefixes

This is a NetBSD-specific detail which does not apply to Newlib, causing
linking issues in certain scenarios:

https://cygwin.com/ml/cygwin/2018-01/msg00189.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoDisable powf/log2?f/exp2?f optimization for single-precision Arm FPU
Thomas Preudhomme [Tue, 23 Jan 2018 10:43:54 +0000 (10:43 +0000)]
Disable powf/log2?f/exp2?f optimization for single-precision Arm FPU

New optimized powf, logf, log2f, expf and exp2f yield worse performance
on Arm targets with only single precision instructions because the
double precision arithmetic is then implemented via softfloat routines.
This patch uses the old implementation when double precision
instructions are not available on Arm targets.

Testing: Built newlib with GCC's rmprofile Arm multilibs and compared
before/after -> only the above functions are changed and calls to them
(name change from logf to __ieee754_logf and similar). Testing the
changed function on a panel of values yields the same result before the
original patches to improve them and after this one. Double checking the
performance by looping the same panel of values being tested on Arm
Cortex-M4 does show the performance regression is fixed.

6 years agoDefine internal function mythreadname() -- revised
Mark Geisert [Wed, 24 Jan 2018 08:34:23 +0000 (00:34 -0800)]
Define internal function mythreadname() -- revised

 This new function returns the name of the calling thread; works for both
 cygthreads and pthreads.  All calls to cygthread::name(/*void*/) replaced
 by calls to mythreadname(/*void*/).

6 years agocygwin: 2.10.0 release text: fix formatting
Corinna Vinschen [Mon, 22 Jan 2018 14:32:29 +0000 (15:32 +0100)]
cygwin: 2.10.0 release text: fix formatting

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agocygwin: Declare pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock
Yaakov Selkowitz [Mon, 22 Jan 2018 05:51:51 +0000 (23:51 -0600)]
cygwin: Declare pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock

These were added in commit 8128f5482f2b1889e2336488e9d45a33c9972d11 but
without their public declarations.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: update docs for 2.10.0
Yaakov Selkowitz [Fri, 19 Jan 2018 06:36:15 +0000 (00:36 -0600)]
cygwin: update docs for 2.10.0

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: add gencat tool
Yaakov Selkowitz [Fri, 19 Jan 2018 05:28:27 +0000 (23:28 -0600)]
cygwin: add gencat tool

This is needed for compiling catalog files used in catgets(3) calls.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: add catopen, catgets, catclose
Yaakov Selkowitz [Fri, 19 Jan 2018 05:26:41 +0000 (23:26 -0600)]
cygwin: add catopen, catgets, catclose

The implementation is taken from FreeBSD with #ifdef __CYGWIN__ modifications.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoGuard langinfo.h nl_item from multiple typedefs
Yaakov Selkowitz [Fri, 19 Jan 2018 05:53:18 +0000 (23:53 -0600)]
Guard langinfo.h nl_item from multiple typedefs

This is a prerequisite of adding nl_types.h support to Cygwin.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoFix syntax error in exit.c
Orlando Arias [Fri, 19 Jan 2018 16:45:01 +0000 (11:45 -0500)]
Fix syntax error in exit.c

This patch fixes a syntax error in exit.c that was introduced during the
ANSI-fication of newlib. The patch fixes a compile-time issue that arises when
newlib is configured with the --enable-lite-exit feature.

6 years agocygwin: make <sys/socket.h> completely visible from <netinet/in.h>
Yaakov Selkowitz [Tue, 16 Jan 2018 03:19:59 +0000 (21:19 -0600)]
cygwin: make <sys/socket.h> completely visible from <netinet/in.h>

While POSIX mandates that certain socket types shall be defined by the
inclusing of <netinet/in.h>, it also says that this header may also make
visible all <sys/socket.h> symbols.  Glibc does this, and without out it,
some packages end up requiring an additional #include <sys/socket.h>.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: remove inclusion of <sys/time.h> from <sys/socket.h>
Yaakov Selkowitz [Fri, 19 Jan 2018 18:06:00 +0000 (12:06 -0600)]
cygwin: remove inclusion of <sys/time.h> from <sys/socket.h>

POSIX does not mention the inclusion of <sys/time.h> in <sys/socket.h>
or <netinet/in.h>, nor is there anything in the latter two that would
require the former.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoBump release to 3.0.0 for yearly snapshot newlib-3.0.0 newlib-snapshot-20180118
Jeff Johnston [Thu, 18 Jan 2018 18:07:45 +0000 (13:07 -0500)]
Bump release to 3.0.0 for yearly snapshot

- major release required due to removal of K&R support

6 years agoRISC-V: isatty: return 0 on error
Chih-Mao Chen [Thu, 16 Nov 2017 08:08:16 +0000 (16:08 +0800)]
RISC-V: isatty: return 0 on error

6 years agoRISC-V: Fix alignment issue in sigjmp_buf
Kito Cheng [Fri, 17 Nov 2017 06:50:52 +0000 (14:50 +0800)]
RISC-V: Fix alignment issue in sigjmp_buf

6 years agoansification: remove ansidecl.h from makedoc
Yaakov Selkowitz [Mon, 4 Dec 2017 09:59:06 +0000 (03:59 -0600)]
ansification: remove ansidecl.h from makedoc

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: fix makedoc for ANSI C
Yaakov Selkowitz [Mon, 4 Dec 2017 09:25:26 +0000 (03:25 -0600)]
ansification: fix makedoc for ANSI C

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _HAVE_STDC
Yaakov Selkowitz [Mon, 4 Dec 2017 05:58:31 +0000 (23:58 -0600)]
ansification: remove _HAVE_STDC

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _EXFUN, _EXFUN_NOTHROW
Yaakov Selkowitz [Mon, 4 Dec 2017 05:54:48 +0000 (23:54 -0600)]
ansification: remove _EXFUN, _EXFUN_NOTHROW

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _EXFNPTR, _EXPARM
Yaakov Selkowitz [Mon, 4 Dec 2017 04:52:13 +0000 (22:52 -0600)]
ansification: remove _EXFNPTR, _EXPARM

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _DEFUN
Yaakov Selkowitz [Mon, 4 Dec 2017 03:43:30 +0000 (21:43 -0600)]
ansification: remove _DEFUN

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _VOLATILE, _SIGNED
Yaakov Selkowitz [Mon, 4 Dec 2017 03:48:55 +0000 (21:48 -0600)]
ansification: remove _VOLATILE, _SIGNED

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _VOID
Yaakov Selkowitz [Mon, 4 Dec 2017 03:12:33 +0000 (21:12 -0600)]
ansification: remove _VOID

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _DEFUN_VOID
Yaakov Selkowitz [Mon, 4 Dec 2017 03:00:43 +0000 (21:00 -0600)]
ansification: remove _DEFUN_VOID

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _CAST_VOID
Yaakov Selkowitz [Mon, 4 Dec 2017 02:56:37 +0000 (20:56 -0600)]
ansification: remove _CAST_VOID

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _PTR
Yaakov Selkowitz [Mon, 4 Dec 2017 02:53:22 +0000 (20:53 -0600)]
ansification: remove _PTR

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _VOID_PTR
Yaakov Selkowitz [Mon, 4 Dec 2017 02:45:02 +0000 (20:45 -0600)]
ansification: remove _VOID_PTR

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _PARAMS
Yaakov Selkowitz [Mon, 4 Dec 2017 02:41:16 +0000 (20:41 -0600)]
ansification: remove _PARAMS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _NOARGS
Yaakov Selkowitz [Mon, 4 Dec 2017 02:32:27 +0000 (20:32 -0600)]
ansification: remove _NOARGS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _DOTS
Yaakov Selkowitz [Mon, 4 Dec 2017 02:28:42 +0000 (20:28 -0600)]
ansification: remove _DOTS

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _CONST
Yaakov Selkowitz [Mon, 4 Dec 2017 02:25:16 +0000 (20:25 -0600)]
ansification: remove _CONST

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoansification: remove _AND
Yaakov Selkowitz [Mon, 4 Dec 2017 01:31:41 +0000 (19:31 -0600)]
ansification: remove _AND

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: add asm/bitsperlong.h, dummy asm/posix_types.h headers
Yaakov Selkowitz [Wed, 17 Jan 2018 09:03:23 +0000 (03:03 -0600)]
cygwin: add asm/bitsperlong.h, dummy asm/posix_types.h headers

These changes are necessary for cross-compiling the Linux kernel.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoMake __always_inline macro compatible with glibc
Yaakov Selkowitz [Tue, 16 Jan 2018 19:24:42 +0000 (13:24 -0600)]
Make __always_inline macro compatible with glibc

For example, this is used when cross-compiling the Linux kernel on Cygwin.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agocygwin: add LFS_CFLAGS etc. to confstr/getconf
Yaakov Selkowitz [Tue, 16 Jan 2018 03:15:28 +0000 (21:15 -0600)]
cygwin: add LFS_CFLAGS etc. to confstr/getconf

These are used, for instance, when cross-compiling the Linux kernel.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agonewlib: fvprintf: fix get_arg for !_MB_CAPABLE
Ivan Grokhotkov [Tue, 9 Jan 2018 06:07:25 +0000 (14:07 +0800)]
newlib: fvprintf: fix get_arg for !_MB_CAPABLE

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.

6 years agofix incompatible pointer type for va_list in nano versions of printf and scanf for...
Alexander Fedotov [Mon, 25 Dec 2017 13:28:22 +0000 (16:28 +0300)]
fix incompatible pointer type for va_list in nano versions of printf and scanf for target like PowerPC

6 years agoRISC-V: Add gdb sim and newlib nano support. Fix a few misc minor bugs.
Jim Wilson [Tue, 26 Dec 2017 20:30:27 +0000 (12:30 -0800)]
RISC-V: Add gdb sim and newlib nano support.  Fix a few misc minor bugs.

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>
This page took 0.080925 seconds and 5 git commands to generate.