Commit Graph

11525 Commits

Author SHA1 Message Date
Corinna Vinschen 65c13851b3 cygwin: pthread timed locks: actually timeout on timeout
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 23:14:21 +02:00
Corinna Vinschen f378384804 cygwin: pthread_rwlock_rdlock: don't set errno, just return error code
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 23:09:57 +02:00
Corinna Vinschen 8128f5482f cygwin: Implement pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 21:31:38 +02:00
Corinna Vinschen eb206317a8 cygwin: Bump DLL version to 2.9.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:17:45 +02:00
Corinna Vinschen 37738448a0 cygwin: Implement pthread_mutex_timedlock
- pthread_mutex::lock now takes a PLARGE_INTEGER timeout pointer
  and uses that in the call to cygwait.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:13:21 +02:00
Corinna Vinschen 68217c3178 cygwin: simplify pthread timedwait handling
- Introduce inline helper pthread_convert_abstime.  It converts
  an absolute timespec to a Windows LARGE_INTEGER timestamp,
  depending on the used clock.

- Use this function from pthread_cond_timedwait and semaphore::timedwait

- Merge semaphore::_wait and semaphore::_timedwait into single _wait
  method, taking a LARGER_INTEGER timestamp.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:08:31 +02:00
Corinna Vinschen a346a26790 cygwin/signal.h: Remove SI_QUEUE unimplemented comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 14:56:24 +02:00
Corinna Vinschen f41d402bd4 Revert "cygwin/signal.h: Remove SI_QUEUE unimplemented comment"
This reverts commit 54ed68a781.
2017-08-03 14:55:21 +02:00
Corinna Vinschen 54ed68a781 cygwin/signal.h: Remove SI_QUEUE unimplemented comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 14:54:02 +02:00
Yaakov Selkowitz 109a3a02a3 cygwin: add explicit_bzero, elf.h changes to release
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 04:38:01 -05:00
Yaakov Selkowitz 4aaec3cb88 Add elf.h to newlib
This is copied from musl (MIT license).  This is newer and more thorough
than that of FreeBSD currently shipped only on Cygwin.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 01:18:55 -05:00
Yaakov Selkowitz 2c83bc950f cygwin: Export explicit_bzero
This was added to newlib together with timingsafe_*cmp but never exported.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 01:09:49 -05:00
Corinna Vinschen 60546ae529 cygwin: generate Alt-Numpad characters independent of NumLock state
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-01 14:10:50 +02:00
Corinna Vinschen 8c4f86dd8e cygwin: add console issues to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 23:08:19 +02:00
Corinna Vinschen e6c75c1de1 cygwin: select: use UNICODE console functions
For historical reasons peek_console was calling the functions
PeekConsoleInputA and ReadConsoleInputA.  However, these functions are
not working correctly under at least codepage 65001 (UTF-8) on systems
prior to Windows 10.

Use PeekConsoleInputW and ReadConsoleInputW instead, which work
correctly under all systems and all codepages.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 22:57:06 +02:00
Corinna Vinschen 7b9bfb4136 cygwin: console: Use memset to clear an array
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 11:44:02 +02:00
Corinna Vinschen 9374e7f65d cygwin: clear screen using wide char function
FillConsoleOutputCharacterA doesn't work correctly in codepage 65001
(UTF-8).  Looks like the character conversion function from ascii char
to unicode char works incorrectly then.  Use FillConsoleOutputCharacterW
instead.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 11:43:35 +02:00
Corinna Vinschen 4bccfcca5b cygwin: add release notes for reparse point patches
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 23:04:34 +02:00
Corinna Vinschen 3e80cefb16 cygwin: unify reparse point checking code into single function
So far we had two functions checking the content of a reparse point,
readdir_check_reparse_point in fhandler_disk_file.cc for the sake of
readdir, and symlink_info::check_reparse_point for the sake of
generic path checking.

* Rename check_reparse_point_target helper to check_reparse_point_string
  and convert to static function.
* Create new check_reparse_point_target helper containing the core
  reparse point checking code
* Just call check_reparse_point_target from readdir_check_reparse_point
  and symlink_info::check_reparse_point and only perform the unique
  task in those functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 17:33:20 +02:00
Corinna Vinschen 42f1be581c cygwin: fix formatting in check_reparse_point_target
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 17:32:20 +02:00
Corinna Vinschen be1485191f cygwin: Fix resource leak in readdir reparse point handling
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 17:26:17 +02:00
Corinna Vinschen d2ae2f00b8 cygwin: add fflush fix to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:41:36 +02:00
Corinna Vinschen a674199fc9 cygwin: Bump DLL version to 2.8.3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:38:15 +02:00
Corinna Vinschen 9cc89b0438 cygwin: Use errno instead of _impure_ptr->_errno
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:30:47 +02:00
Corinna Vinschen 78ade082fe Revert "errno: Stop using _impure_ptr->_errno completely"
This reverts commit 44b1746a41.

Bad idea.  _impure_ptr->_errno is used by newlib

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:28:39 +02:00
Corinna Vinschen e09a25c01b cygwin: 2.8.2: add missing release message text
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-12 10:49:10 +02:00
Yaakov Selkowitz 5fac663b29 cygwin: document signal.h fixes
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-07-12 03:24:50 -05:00
Corinna Vinschen 2d9c69da1c cygwin: export fls, flsl, flsll
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-11 10:31:44 +02:00
Yaakov Selkowitz 187066dcad Cygwin: fix guard on struct siginfo_t
Add line breaks to make it clearer that the struct packing applies to more
than one struct.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-07-10 07:53:26 -05:00
David Macek bf61b38d98 Rename __in and __out in headers to avoid collision with Windows APIs
* string.h: Local variables in expansion of strdupa and strndupa
* sys/wait.h: Fields in anonymous union in expansion of __wait_status_to_int
2017-07-07 16:37:44 +02:00
Brian Inglis 74dd44c0de fix URL shortcuts launch with cygstart, create shortcuts directly in SM/Programs/Cygwin 2017-07-06 18:36:38 +02:00
Brian Inglis cff8513220 fix cygwin-doc postinstall/preremove no SMPrograms/Cygwin dir 2017-07-06 10:01:54 +02:00
Sebastian Huber 461152e4eb Add ffsl(), ffsll(), fls(), flsl(), flsll()
Use compiler builtin for ffs().  Remove duplicate implementation from
Cygwin.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-07-05 13:49:48 +02:00
Yaakov Selkowitz 8a508f301c Cygwin: fix signal.h with _POSIX_C_SOURCE=1
struct sigaction is POSIX.1-1990 but siginfo_t, which is used by its
sa_sigaction member, is POSIX.1b-1993.  Therefore it needs to be guarded
as well, and as part of a union, the struct size is protected.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-07-04 19:22:23 -05:00
Corinna Vinschen 56c1cfa009 add scandirat patch to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-04 15:13:31 +02:00
Corinna Vinschen 1a942680bf cygwin: scandirat: fix path given to scandir
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-04 15:11:06 +02:00
Corinna Vinschen 055daff132 Bump DLL minor version
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-04 15:10:27 +02:00
Brian Inglis d54ee34e23 replace shortcut parameter assignments with read loops, run with sh 2017-06-27 09:37:28 +02:00
Corinna Vinschen 0220e40e8f cygwin: doc: Fix doc install path in postinstall script
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-23 20:24:49 +02:00
Jon Turney 95e66aae33 Update documentation of cygwin setup proxy configuration details 2017-06-22 16:04:20 +01:00
Jon Turney f4fb7b93ef Update and sort list of cygwin setup command line options. 2017-06-22 16:04:20 +01:00
Corinna Vinschen 92fc6ea7e3 Note regtool fix in release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-22 14:48:43 +02:00
Fujii Hironori 4d336756fa cygwin: regtool: encode error messages correctly
Error messages of regtool can't be read, which are encoded in,
for instance, SHIFT_JIS in Japanese Windows.  Fix by using
wide chars instead of multibyte.
2017-06-20 13:17:49 +02:00
Corinna Vinschen c5ca43f359 Revert "cygserver: Revamp thread sleep handling"
This reverts commit b80b2c0119.
2017-06-20 13:09:07 +02:00
Corinna Vinschen 185cd97d24 cygwin: readdir: Activate check for remote reparse points
Fix and move comment accordingly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-20 10:06:45 +02:00
Joe_Lowe 7a4e299a18 Compatibility improvements to reparse point handling. 2017-06-20 09:57:36 +02:00
Yaakov Selkowitz f698efbce1 cygwin: export strverscmp, add versionsort
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-06-19 08:16:42 -05:00
Erik M. Bray 5ca286666a Ensure that send() interrupted by a signal returns sucessfully
When SA_RESTART is not set on a socket, a blocking send() that is
interrupted mid-transition by a signal should return success (and
report just how many bytes were actually transmitted).

The err variable used here was not always guaranteed to be set
correctly in the loop, so better to just remove it and call
WSAGetLastError() explicitly.
2017-06-19 12:51:39 +02:00
Yaakov Selkowitz a5cc86ba13 cygwin: document XSI sigpause
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-06-14 14:30:44 -05:00
Yaakov Selkowitz dde6af6f82 Export XSI sigpause
There are two common sigpause variants, both of which take an int argument.
If you request _XOPEN_SOURCE or _GNU_SOURCE, you get the System V version,
which removes the given signal from the process's signal mask; otherwise
you get the BSD version, which sets the process's signal mask to the given
value.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-06-14 14:23:52 -05:00