Commit Graph

7915 Commits

Author SHA1 Message Date
Corinna Vinschen cdbec10e79 cygwin: add strptime %F fix to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-29 21:12:21 +02:00
Brian Inglis d8e2463c75 winsup/cygwin/libc/strptime.cc(__strptime) fix %F width 2017-08-29 21:10:06 +02:00
Corinna Vinschen 4dfaef8141 cygwin: document %s support in strptime
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-29 11:16:13 +02:00
Corinna Vinschen cf8bf843f8 cygwin: export strnstr
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-25 18:00:46 +02:00
Brian Inglis 8324ab5e2a winsup/cygwin/libc/strptime.cc(__strptime) add %s support to strptime 2017-08-25 11:39:11 +02:00
Corinna Vinschen b706c6b479 cygwin: only expose /dev/con{in,out,sole} when started from a Windows console
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-23 17:43:41 +02:00
Ken Brown 3012e251fa Document renameat2 2017-08-19 19:43:15 +02:00
Ken Brown f665b1cef3 cygwin: Implement renameat2
Define the RENAME_NOREPLACE flag in <cygwin/fs.h> as defined on Linux
in <linux/fs.h>.  The other RENAME_* flags defined on Linux are not
supported.
2017-08-19 18:06:49 +02:00
Eric Blake 7b3d8b9485 headers: avoid bareword attributes
Always use the __-decorated form of an attribute name in public
headers, as the bareword form is in the user's namespace, and we
don't want compilation to break just because the user defines the
bareword to mean something else.

Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-17 07:10:03 -05:00
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
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
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
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