summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Cygwin: pty: Allow multiple apps to enable pseudo console simultaneously.Takashi Yano via Cygwin-patches2021-01-286-93/+314
| | | | | | | - After commit bb428520, there has been the disadvantage: 7) Pseudo console cannot be activated if it is already activated for another process on same pty. This patch clears this disadvantage.
* Cygwin: pty: Make apps using console APIs be able to debug with gdb.Takashi Yano via Cygwin-patches2021-01-286-42/+279
| | | | | | | | | | - After commit bb428520, there has been the disadvantage: 2) The apps which use console API cannot be debugged with gdb. This is because pseudo console is not activated since gdb uses CreateProcess() rather than exec(). Even with this limitation, attaching gdb to native app, in which pseudo console is already activated, works. This patch clears this disadvantage.
* Cygwin: pty: Keep code page between non-cygwin apps.Takashi Yano via Cygwin-patches2021-01-283-0/+11
| | | | | | | | | - After commit bb428520, there has been the disadvantage: 4) Code page cannot be changed by chcp.com. Acctually, chcp works itself and changes code page of its own pseudo console. However, since pseudo console is recreated for another process, it cannot inherit the code page. This patch clears this disadvantage.
* Cygwin: pty: Inherit typeahead data between two input pipes.Takashi Yano via Cygwin-patches2021-01-285-147/+504
| | | | | | | | | | | | | | | - PTY has a problem that the key input, which is typed during windows native app is running, disappears when it returns to shell. This is beacuse pty has two input pipes, one is for cygwin apps and the other one is for native windows apps. The key input during windows native program is running is sent to the second input pipe while cygwin shell reads input from the first input pipe. This issue had been fixed once by commit 29431fcb, however, the new implementation of pseudo console support by commit bb428520 could not inherit this feature. This patch realize transfering input data between these two pipes bidirectionally by utilizing cygwin-console-helper process. The helper process is launched prior to starting the non-cygwin app, however, exits immediately unlike previous implementation.
* Cygwin: Align *utime*() with POSIX/glibcCorinna Vinschen2021-01-262-5/+5
| | | | | | Followup to previous patch, this time matching definitions in Cygwin Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Align *utime*() with POSIX/glibcSebastian Huber2021-01-263-6/+6
| | | | | | | Change the prototypes to be in line with POSIX/glibc. This may fix issues with new warnings produced by GCC 11. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Cygwin: chown: make sure ctime gets updated when necessaryKen Brown2021-01-251-5/+8
| | | | | | | | | | | | Following POSIX, ensure that ctime is updated if chown succeeds, unless the new owner is specified as (uid_t)-1 and the new group is specified as (gid_t)-1. Previously, ctime was unchanged whenever the owner and group were both unchanged. Aside from POSIX compliance, this fix makes gnulib report that chown works on Cygwin. This improves the efficiency of packages like GNU tar that use gnulib's chown module. Previously such packages would use a gnulib replacement for chown on Cygwin.
* syscalls.cc: Deduplicate removeBen Wijen2021-01-251-13/+4
| | | | | The remove code is already in the _remove_r function. So, just call the _remove_r function.
* Cygwin: console: Add missing guard regarding attach_mutex.Takashi Yano via Cygwin-patches2021-01-251-0/+27
| | | | | - The commit a5333345 did not fix the problem enough. This patch provides additional guard for the issue.
* syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTEBen Wijen2021-01-254-39/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think we don't need an extra flag as we can utilize: access & FILE_WRITE_ATTRIBUTES What do you think? Ben Wijen (1): syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE winsup/cygwin/ntdll.h | 3 ++- winsup/cygwin/syscalls.cc | 22 +++++++-------- winsup/cygwin/wincap.cc | 11 ++++++++ winsup/cygwin/wincap.h | 56 ++++++++++++++++++++------------------- 4 files changed, 53 insertions(+), 39 deletions(-) -- 2.30.0 >From 2d0ff6fec10d03c24d11c747852018b7bc1136ac Mon Sep 17 00:00:00 2001 In-Reply-To: <20210122105201.GD810271@calimero.vinschen.de> References: <20210122105201.GD810271@calimero.vinschen.de> From: Ben Wijen <ben@wijen.net> Date: Tue, 17 Dec 2019 15:15:25 +0100 Subject: [PATCH v3 1/8] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE Implement wincap.has_posix_unlink_semantics_with_ignore_readonly and when set skip setting/clearing of READONLY attribute and instead use FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE
* Cygwin: ptsname_r: always return an error number on failureKen Brown2021-01-222-1/+4
| | | | | | | | | | | | Return EBADF on a bad file descriptor. Previously 0 was returned, in violation of the requirement in https://man7.org/linux/man-pages/man3/ptsname_r.3.html that an error number should be returned on failure. We are intentionally deviating from Linux, on which ENOTTY is returned. Addresses: https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00245.html
* Cygwin: normalize_posix_path: fix error handling when .. is encounteredKen Brown2021-01-222-1/+7
| | | | | | | | | | When .. is in the source path and the path prefix exists but is not a directory, return ENOTDIR instead of ENOENT. This fixes a POSIX compliance issue for realpath(3): https://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html Addresses: https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00214.html
* Cygwin: Move post-dir unlink checkBen Wijen2021-01-222-20/+28
| | | | | | | | Move post-dir unlink check from fhandler_disk_file::rmdir to _unlink_nt_post_dir_check If a directory is not removed through fhandler_disk_file::rmdir we can now make sure the post dir check is performed.
* Cygwin: console: Fix "Bad file descriptor" error in script command.Takashi Yano via Cygwin-patches2021-01-203-7/+105
| | | | | | - After the commit 72770148, script command exits occasionally with the error "Bad file descriptor" if it is started in console on Win7 and non-cygwin process is executed. This patch fixes the issue.
* Cygwin: pty: Reduce buffer size in get_console_process_id().Takashi Yano via Cygwin-patches2021-01-201-2/+2
| | | | | | - The buffer used in get_console_process_id(), introduced by commit 72770148, is too large and ERROR_NOT_ENOUGH_MEMORY occurs in Win7. Therefore, the buffer size has been reduced.
* Cygwin: pty: Lessen the side effect of workaround for rlwarp.Takashi Yano via Cygwin-patches2021-01-191-4/+12
| | | | | - This patch lessens the side effect of the workaround for rlwrap introduced by commit 4e16b033.
* Cygwin: spawn.cc: Fix typo in comment by commit 974e6d76.Takashi Yano via Cygwin-patches2021-01-191-1/+1
|
* Cygwin: rmdir: handle /dev in fhandler_dev::rmdirCorinna Vinschen2021-01-193-2/+8
| | | | | | | The isdev_dev check in rmdir is unclean. Create a virtual method fhandler_dev::rmdir to handle this transparently. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: document a recent bug fixKen Brown2021-01-181-0/+3
| | | | | This documents commit aec64798, "Cygwin: add flag to indicate reparse points unknown to WinAPI".
* Cygwin: pty: Set input_available_event only for cygwin pipe.Takashi Yano via Cygwin-patches2021-01-181-1/+2
| | | | | | | | | - cat exits immediately in the following senario. 1) Execute env CYGWIN=disable_pcon script 2) Execute cmd.exe 3) Execute cat in cmd.exe. This is caused by setting input_available_event for the pipe for non-cygwin app. This patch fixes the issue.
* Cygwin: pty: Make master thread functions be static.Takashi Yano via Cygwin-patches2021-01-182-56/+128
| | | | | | | | | | | | | - The functions pty_master_thread() and pty_master_fwd_thread() should be static (i.e. should not access class member) because the instance is deleted if the master is dup()'ed and the first master is closed. In this case, because the dup()'ed instance still exists, these master threads are also still alive even though the instance has been deleted. As a result, accesing class members in these functions causes accessi violation. Addresses: https://cygwin.com/pipermail/cygwin-developers/2021-January/012030.html
* Cygwin: pty: Prevent pty from changing code page of parent console.Takashi Yano via Cygwin-patches2021-01-186-11/+155
| | | | | | | | | - After commit 232fde0e, pty changes console code page when the first non-cygwin app is executed. If pty is started in real console device, pty changes the code page of root console. This causes very annoying result because changing code page changes the font of command prompt if console is in legacy mode. This patch avoids this by creating a new invisible console for the first pty started in console device.
* cxx.cc: Fix dynamic initialization for static local variablesBen Wijen2021-01-182-11/+1
| | | | | | | | The old implementation for __cxa_guard_acquire did not return 1, therefore dynamic initialization was never performed. If concurrent-safe dynamic initialisation is ever needed, CXX ABI must be followed when re-implementing __cxa_guard_acquire (et al.)
* syscalls.cc: Use EISDIRBen Wijen2021-01-181-1/+1
| | | | This is the non-POSIX value returned by Linux since 2.1.132.
* syscalls.cc: Fix num_linksBen Wijen2021-01-181-2/+3
| | | | | NtQueryInformationFile on fh_ro needs FILE_READ_ATTRIBUTES to succeed.
* Cygwin: Add Ben Wijen to list of contributorsCorinna Vinschen2021-01-181-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: pty: Make close_pseudoconsole() be a static member function.Takashi Yano via Cygwin-patches2021-01-183-13/+18
| | | | | | | - The function close_pseudoconsole() should be static so that it can be safely called in spawn.cc even after the fhandler_pty_slave instance has been deleted. That is, there is a problem with the current code. This patch fixes the issue.
* Cygwin: console: Revise the code to switch xterm mode.Takashi Yano via Cygwin-patches2021-01-184-62/+127
| | | | | | | | | - If application changes the console mode, mode management introduced by commit 10d8c278 will be corrupted. For example, stdout of jansi v2.0.1 or later is piped to less, jansi resets the xterm mode flag ENABLE_VIRTUAL_TERMINA_PROCESSING when jansi is terminated. This causes garbled output in less because less needs this flag enabled. This patch fixes the issue.
* Cygwin: pty: Add workaround for rlwrap 0.40 or later.Takashi Yano via Cygwin-patches2021-01-181-0/+5
| | | | | | - The workaround for rlwrap introduced by commit 8199b0cc does not take effect for rlwrap 0.40 or later. This patch add a workaround for rlwrap 0.40 or later as well.
* Cygwin: fstatat: call fstat64 instead of fstatKen Brown2021-01-122-1/+7
| | | | | | | | | This fixes a bug on 32-bit Cygwin that was introduced in commit 84252946, "Cygwin: fstatat, fchownat: support the AT_EMPTY_PATH flag". Add a comment explaining why fstat should not be called. Addresses: https://cygwin.com/pipermail/cygwin/2021-January/247399.html
* RTEMS: Add <poll.h> and <sys/poll.h>Sebastian Huber2021-01-053-0/+137
| | | | | | | Add the POSIX header file <poll.h> which is used by the GCC 11 Ada runtime support. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Bump up newlib version to 4.1.0newlib-4.1.0Jeff Johnston2020-12-18115-1134/+1140
|
* fixes to make compilation succeedsPaul Zimmermann2020-12-182-1/+2
|
* Update gamma functions from code in picolibcJeff Johnston2020-12-174-28/+47
| | | | - fixes issue with inf sign when x is -0
* fhandler_proc.cc(format_proc_cpuinfo): report Intel SGX bitsBrian Inglis2020-12-171-0/+2
| | | | | | | Update to Linux next 5.10 cpuinfo flags for Intel SDM 36.7.1 Software Guard Extensions, and 38.1.4 SGX Launch Control Configuration. Launch control restricts what software can run with enclave protections, which helps protect the system from bad enclaves.
* RISC-V: Add semihosting supportCraig Blackmore2020-12-1622-1/+697
|
* Add declarations for __ieee754_tgamma functions to fdlibm.hJeff Johnston2020-12-161-0/+2
|
* Cygwin: pty: Revise the workaround for rlwrap.Takashi Yano via Cygwin-patches2020-12-161-2/+2
| | | | | | - Previous workaround has a problem that screen is distorted if up arrow key is pressed at the first line after running "rlwrap cmd". This patch fixes the issue.
* Cygwin: pty: Check response for CSI6n more strictly.Takashi Yano via Cygwin-patches2020-12-161-2/+6
| | | | | | - Previous code to read response for CSI6n allows invalid response such as "CSI Pl; Pc H" other than correct response "CSI Pl; Pc R". With this patch, the response is checked more strictly.
* Cygwin: Make sure newer apps get uname_x even when loading uname dynamicallyCorinna Vinschen2020-12-152-0/+10
| | | | | | | | | if an application built after API version 334 loads uname dynamically, it actually gets the old uname, rather than the new uname_x. Fix this by checking the apps API version in uname and call uname_x instead, if it's a newer app. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* arm: Fix memchr() for Armv8-RSebastian Huber2020-12-141-0/+4
| | | | | | | | The Cortex-R52 processor is an Armv8-R processor with a NEON unit. This fix prevents conflicting architecture profiles A/R errors issued by the linker. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Cygwin: pty: Add a workaround for rlwrap.Takashi Yano via Cygwin-patches2020-12-141-0/+5
| | | | | - If rlwrap is used with non-cygwin apps, it fails to setup pseudo console. This patch adds a workaround for this issue.
* Cygwin: pty: Revise the code for timeout in term_has_pcon_cap().Takashi Yano via Cygwin-patches2020-12-141-3/+3
| | | | | | | | - Sometimes timeout period in term_has_pcon_cap() may not be enough when the machine slows down for some reason. This patch eases the issue. In the new code, effective timeout period is expected to be extended as a result due to slowing-down the wait loop as well when the machine gets into busy.
* Cygwin: pty: Skip term_has_pcon_cap() if pseudo console is disabled.Takashi Yano via Cygwin-patches2020-12-142-3/+1
| | | | | - This patch skips unnecessary term_has_pcon_cap() call if pseudo console is disabled.
* Fix error in powf for x close to 1 and large yFabian Schriever2020-12-111-1/+1
| | | | | | | | | | | This patch fixes the error found by Paul Zimmermann (see https://homepages.loria.fr/PZimmermann/papers/#accuracy) regarding x close to 1 and rather large y (specifically he found the case powf(0x1.ffffeep-1,-0x1.000002p+27) which returns +Inf instead of the correct value). We found 2 more values for x which show the same faulty behaviour, and all 3 are fixed with this patch. We have tested all combinations for x in [+1.fffdfp-1, +1.00020p+0] and y in [-1.000007p+27, -1.000002p+27] and [1.000002p+27,1.000007p+27].
* Bump newlib release to 4.0.0Jeff Johnston2020-12-11115-1136/+1151
|
* cygwin: use CREATE_DEFAULT_ERROR_MODE in spawnJeremy Drake via Cygwin-patches2020-12-101-0/+7
| | | | | This allows native processes to get Windows-default error handling behavior (such as invoking the registered JIT debugger).
* Cygwin: dtable::dup_worker: update comment and debug outputKen Brown2020-12-071-4/+1
| | | | | | The comment and debug output became obsolete in commit 23771fa1f7 when dup_worker started calling fhandler_base::clone instead of build_fh_pc and fhandler_base::operator=.
* Cygwin: Allow to set SO_PEERCRED zero (v2)Mark Geisert2020-12-071-3/+7
| | | | | | | | | | | | | The existing code errors as EINVAL any attempt to set a value for SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to enable the workaround set_no_getpeereid behavior for Python one has to be able to set SO_PEERCRED to zero. Ergo, this patch. Python has no way to specify a NULL pointer for 'optval'. This v2 of patch allows the original working (i.e., allow NULL,0 for optval,optlen to mean turn off SO_PEERCRED) in addition to the new working described above. The sense of the 'if' stmt is reversed for readability.
* Cygwin: Launch cygmagic with bash, not shMark Geisert2020-12-071-2/+2
| | | | | | On some systems /bin/sh is not /bin/bash and cygmagic has bash-isms in it. So even though cygmagic has a /bin/bash shebang, it also needs to be launched with bash from within Makefile.in.