Commit Graph

1158 Commits

Author SHA1 Message Date
Sebastian Huber da418955f5 Move common <sys/dirent.h> content to <dirent.h>
Move common content of the various <sys/dirent.h> and the latest FreeBSD
<dirent.h> to <dirent.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-10-11 08:29:16 +02:00
Corinna Vinschen 9bbda85e27 Cygwin: Bump DLL version to 2.11.2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-09-05 13:02:09 +02:00
Corinna Vinschen fc3a8ecca5 Cygwin: Bump DLL version to 2.11.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-31 13:01:23 +02:00
Corinna Vinschen 6706b19a97 Cygwin: Remove union wait
This patch follows glibc.  Original commit message:

Author:	Florian Weimer <fweimer@redhat.com>
Date:   Thu, 14 Apr 2016 06:54:57 +0000

Remove union wait [BZ #19613]

The overloading approach in the W* macros was incompatible with
integer expressions of a type different from int.  Applications
using union wait and these macros will have to migrate to the
POSIX-specified int status type.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-24 20:57:47 +02:00
Sebastian Huber 5d29023c11 Add __nl_item to <sys/_types.h> and use it
Add __nl_item to <sys/_types.h> for FreeBSD compatibility.  Use it in
<langinfo.h> and the Cygwin <nl_types.h>.  Make the enum __nl_item in
<langinfo.h> anonymous.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-08-24 15:00:01 +02:00
J.H. van de Water 4c4c19f548 Keep the denormal-operand exception masked; modify FE_ALL_EXCEPT accordingly.
By excluding the denormal-operand exception from FE_ALL_EXCEPT, it will not
be possible anymore to UNmask this exception by means of the API defined by
/usr/include/fenv.h

Note: terminology has changed since IEEE Std 854-1987; denormalized numbers
are called subnormal numbers nowadays.

This modification has basically been motivated by the fact that it is also
not possible on Linux to manipulate the denormal-operand exception by means
of the interface as defined by /usr/include/fenv.h. This has been the state
of affairs on Linux since 2001 (Andreas Jaeger).

The exceptions required by the standard (IEEE Std 754), in case they can be
supported by the implementation, are:
FE_INEXACT, FE_UNDERFLOW, FE_OVERFLOW, FE_DIVBYZERO and FE_INVALID.

Although it is allowed to define additional exceptions, there is no reason
to support the "denormal-operand exception" in this case (fenv.h), because
the subnormal numbers can be handled almost as fast the normalized numbers
by the hardware of the x86/x86_64 architecture. Said differently, a reason
to trap on the input of subnormal numbers does not exist. At least that is
what William Kahan and others at Intel asserted around 2000.
(that is William Kahan of the K-C-S draft, the precursor to the standard)

This commit modifies winsup/cygwin/include/fenv.h as follows:
 - redefines FE_ALL_EXCEPT from 0x3f to 0x3d
 - removes the definition for FE_DENORMAL
 - introduces __FE_DENORM (0x2) (enum in Linux also uses __FE_DENORM)
 - introduces FE_ALL_EXCEPT_X86 (0x3f), i.e. ALL x86/x86_64 FP exceptions
2018-08-15 18:02:22 +02:00
Corinna Vinschen dbd872f4ad Cygwin: fenv.h: Convert to ASCII-only
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-14 11:48:29 +02:00
Corinna Vinschen 1e0a1f59d9 Cygwin: implement sched_getcpu
* create new function __get_cpus_per_group to evaluate # of CPU groups
* Call from  format_proc_cpuinfo and sched_getcpu
* Bump API minor version

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-07 14:51:10 +02:00
Mark Geisert 7f32efbf73 POSIX Asynchronous I/O support: other files
Updates to misc files to integrate AIO into the Cygwin source tree.
Much of it has to be done when adding any new syscalls.  There are
some updates to limits.h for AIO-specific limits.  And some doc mods.
2018-07-25 09:36:24 +02:00
Mark Geisert a9ffa71a15 POSIX Asynchronous I/O support: aio files
This is the core of the AIO implementation: aio.cc and aio.h.  The
latter is used within the Cygwin DLL by aio.cc and the fhandler* modules,
as well as by user programs wanting the AIO functionality.
2018-07-25 09:36:22 +02:00
Corinna Vinschen 4b97244d12 Cygwin: define pthread_tryjoin_np/pthread_timedjoin_np _GNU_VISIBLE
These functions are GNU extensions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-06-27 18:20:47 +02:00
Corinna Vinschen 732e0b395d Cygwin: Implement pthread_tryjoin_np and pthread_timedjoin_np
- Move pthread_join to thread.cc to have all `join' calls in
  the same file (pthread_timedjoin_np needs pthread_convert_abstime
  which is static inline in thread.cc)
- Bump API version

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-06-27 17:56:59 +02:00
Corinna Vinschen 6c55be9dbb Cygwin: Allow to build without experimental AF_UNIX code by default
Introduce __WITH_AF_UNIX preprocessor flag to enable the new code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-06-26 16:31:17 +02:00
Corinna Vinschen 3dc89bbafe Cygwin: signal.h: improve exception flags definition
- add numbers for readability
- add a preprocessor macro for each flag

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-06-26 10:12:10 +02:00
Ken Brown ebc9171ede Bump Cygwin DLL version to 2.11.0 2018-06-07 09:42:36 +02:00
Ken Brown 2ea436b433 Cygwin: Document clearenv and bump API minor
Also add earlier "What changed" items to new-features.xml.
2018-06-07 09:42:36 +02:00
Ken Brown defaa2ca31 Cygwin: Implement the GNU extension clearenv 2018-06-07 09:42:36 +02:00
Ken Brown 59847b5d73 Declare the pthread_rwlock_* functions if __cplusplus >= 201402L
Some of these functions are used in the <shared_mutex> C++ header.
2018-06-01 12:09:12 +02:00
Corinna Vinschen 23b5ecdaf3 Cygwin: delete /dev/kmsg and thus fhandler_mailslot without substitution
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-25 12:38:14 +02:00
Corinna Vinschen f4a1a186f9 Cygwin: fix socketpair prototype
Last parameter is a vector of 2 ints, not a pointer to int

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-09 14:17:39 +01:00
Corinna Vinschen f6ce72e623 Cygwin: sys/socket.h: define MSG_CMSG_CLOEXEC
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-06 18:23:48 +01:00
Corinna Vinschen 892efccb25 Cygwin: fhandler_socket_unix: store peer credentials in ucred member
* Split out cygwin/_ucred.h file
* drop local credentials

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-28 19:01:29 +01:00
Corinna Vinschen 25ea6af172 Cygwin: cleanup header including within network-releated files
* Rearrange includes and drop unneccessary ones.

* Don't pull in cygwin/socket.h into sys/un.h just to get
  sa_family_t.  Include sys/types.h and use __sa_family_t instead.

* start including Windows headers using the w32api/ path prefix

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-28 18:56:13 +01:00
Corinna Vinschen c70761df66 Cygwin: Define SO_PASSCRED and SCM_CREDENTIALS
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-23 21:00:43 +01:00
Corinna Vinschen 7f7532fafb Cygwin: Create empty fhandler_socket_unix
* Make distinct from AF_LOCAL for testing purposes.  This will have
  to be reverted as soon as fhandler_socket_unix goes life.

* Move saw_reuseaddr flag back to fhandler_socket status

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-23 21:00:43 +01:00
Corinna Vinschen b89b6f4349 Cygwin: socket.h: Add SIOCINQ, equivalent to FIONREAD
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-23 13:33:23 +01:00
Corinna Vinschen a5dfbc6940 Cygwin: inline get_socket_flags()
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-21 22:00:04 +01:00
Corinna Vinschen b08e6690a6 Cygwin: bindresvport: Guard prototypes with __MISC_VISIBLE
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-05 21:06:29 +01:00
Corinna Vinschen 623d3fdf6b Cygwin: bump version to 2.10.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-02 15:32:28 +01:00
Yaakov Selkowitz 8810f929fc cygwin: Declare pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock
These were added in commit 8128f5482f but
without their public declarations.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-22 15:04:11 +01:00
Yaakov Selkowitz cadc12f695 cygwin: add catopen, catgets, catclose
The implementation is taken from FreeBSD with #ifdef __CYGWIN__ modifications.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-19 13:19:21 -06:00
Yaakov Selkowitz 061710370c 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>
2018-01-19 12:08:27 -06:00
Yaakov Selkowitz fa47495755 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>
2018-01-19 12:08:26 -06:00
Yaakov Selkowitz 70ee6b17df ansification: remove _EXFUN, _EXFUN_NOTHROW
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:29 -06:00
Yaakov Selkowitz e6321aa6a6 ansification: remove _PTR
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:16 -06:00
Yaakov Selkowitz eea249da3b ansification: remove _PARAMS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:13 -06:00
Yaakov Selkowitz 1e39db3062 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>
2018-01-17 03:09:35 -06:00
Mark Geisert 24ff42d79a Cygwin: Implement sigtimedwait
Abstract out common code from sigwait/sigwaitinfo/sigtimedwait to
implement the latter.
2017-12-18 19:46:18 +01:00
Corinna Vinschen 08d77e5154 cygwin: document %l[ and bump API minor
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01 18:21:59 +01:00
Corinna Vinschen 10b57ba8d0 cygwin: Document latest changes, bump API minor
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 21:57:16 +01:00
Yaakov Selkowitz f636eae26f cygwin: export wmempcpy
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 04:06:51 -06:00
Yaakov Selkowitz 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
Yaakov Selkowitz 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
Yaakov Selkowitz 6a848db442 cygwin: export SSP functions
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:48 -06:00
Yaakov Selkowitz 032aa2dba5 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>
2017-11-28 04:11:33 -06:00
Corinna Vinschen 76f06705be cygwin: convert most #ifndef __x86_64__ to #ifdef __i386__
Address the real offender

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-27 14:36:06 +01:00
Corinna Vinschen ce0b11f9c4 Cygwin: Bump DLL version to 2.10.0, bump API minor to 319
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:45:32 +01:00
Corinna Vinschen 3bdd484103 cygwin: belatedly bump DLL minor version
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-10-18 16:40:56 +02:00
Yaakov Selkowitz 747f31854a cygwin: fix gethostbyaddr argument types
The first argument of gethostbyaddr needs to accept a generic pointer
to be compatible with e.g. struct in_addr *.  This caused an issue
compiling krb5-1.15.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-10-10 13:51:23 -05:00
Yaakov Selkowitz 0b45b053e8 Feature test macros overhaul: Cygwin netdb.h
herror etc. are MISC, rcmd etc. are BSD, addrinfo functions are
POSIX.1-2001, except for IDN functionality which is GNU.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-10-10 13:50:46 -05:00