summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cygwin: pty: Use system NLS function instead of PTY's own one.Takashi Yano2019-09-154-397/+107
| | | | | | | - Since calling system __loadlocale() caused execution error, PTY used its own NLS function. The cause of the error has been found, the corresponding code has been rewritten using system function.
* Cygwin: pty: Fix bad file descriptor error in some environment.Takashi Yano2019-09-151-2/+0
| | | | | | - The bad file descriptor problem reported in: https://cygwin.com/ml/cygwin-patches/2019-q3/msg00104.html was recurring. Fixed again.
* Cygwin: fix CPU_SET macro visibilityMark Geisert2019-09-141-0/+3
| | | | | | The CPU_SET macros defined in Cygwin's include/sys/cpuset.h must not be visible in an application's namespace unless _GNU_SOURCE has been #defined. Internally this means wrapping them in #if __GNU_VISIBLE.
* Cygwin: console: Fix read() in non-canonical mode.Takashi Yano2019-09-141-291/+315
| | | | | | - In non-canonical mode, cygwin console returned only one character even if several keys are typed before read() called. This patch fixes this behaviour.
* Cygwin: pty: Switch input and output pipes individually.Takashi Yano2019-09-148-101/+173
| | | | | | | | - Previously, input and output pipes were switched together between the traditional pty and the pseudo console. However, for example, if stdin is redirected to another device, it is better to leave input pipe traditional pty side even for non-cygwin program. This patch realizes such behaviour.
* Cygwin: pty: Prevent the helper process from exiting by Ctrl-C.Takashi Yano2019-09-141-0/+1
|
* Cygwin: pty: Fix screen alternation while pseudo console switching.Takashi Yano2019-09-141-8/+14
| | | | | | - If screen alternated while pseudo console switching, it sometimes failed. This might happen when the output of the non-cygwin program is piped to less. This patch fixes this issue.
* Cygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode.Takashi Yano2019-09-144-42/+50
| | | | | | | | - When the I/O pipe is switched to the pseudo console side, the behaviour of Ctrl-C was unstable. This rarely happens, however, for example, shell sometimes crashes by Ctrl-C in that situation. Furthermore, Ctrl-C was ignored if output of non-cygwin program is redirected to pipe. This patch fixes these issues.
* libc/include/devctl.h: Add SOCKCLOSE per FACE Technical Standard, Edition 3.0Joel Sherrill2019-09-101-5/+24
| | | | | | The FACE Technical Standard, Edition 3.0 and later require the definition of the subcommand SOCKCLOSE in <devctl.h>. Reference: https://www.opengroup.org/face
* Cygwin: pty: Make SetConsoleCursorPosition() to be hooked.Takashi Yano2019-09-061-0/+9
| | | | | | - Win32 API SetConsoleCursorPosition() injects ANSI escape sequence to pseudo console. Therefore, it should be added to the API list to be hooked.
* Cygwin: pty: Make sure to show system error messagesTakashi Yano2019-09-051-6/+49
| | | | | | | | - Forcibly attach to pseudo console in advance so that the error messages by system_printf() are displayed to screen reliably. This is needed when stdout is redirected to another pty. In this case, process has two ptys opened. However, process can attach to only one console. So it is necessary to change console attached.
* Cygwin: pty: Fix potential state mismatch regarding pseudo console.Takashi Yano2019-09-051-2/+7
| | | | | | - PTY with pseudo console support sitll has problem which potentially cause state mismatch between state variable and real console state. This patch fixes this issue.
* Cygwin: pty: Fix select() with pseudo console support.Takashi Yano2019-09-054-15/+207
| | | | | | - select() did not work correctly when both read and except are polled simultaneously for the same fd and the r/w pipe is switched to pseudo console side. This patch fixes this isseu.
* Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.Takashi Yano2019-09-053-5/+16
| | | | | | | - Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 shows garbage ^[[H^[[J in some of emacs screens. These screens do not handle ANSI escape sequences. Therefore, clear screen is disabled on these screens.
* Cygwin: pty: Add a workaround for ^C handling.Takashi Yano2019-09-042-1/+6
| | | | | | | | - Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 sometimes cause random crash or freeze by pressing ^C while cygwin and non-cygwin processes are executed simultaneously in the same pty. This patch is a workaround for this issue.
* Cygwin: pty: Limit API hook to the program linked with the APIs.Takashi Yano2019-09-044-71/+66
| | | | | | | | | | | - API hook used for pseudo console support causes slow down. This patch limits API hook to only program which is linked with the corresponding APIs. Normal cygwin program is not linked with such APIs (such as WriteFile, etc...) directly, therefore, no slow down occurs. However, console access by cygwin.dll itself cannot switch the r/w pipe to pseudo console side. Therefore, the code to switch it forcely to pseudo console side is added to smallprint.cc and strace.cc.
* Cygwin: pty: Fix state management for pseudo console support.Takashi Yano2019-09-046-254/+289
| | | | | | | | - Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 has some bugs which cause mismatch between state variables and real pseudo console state regarding console attaching and r/w pipe switching. This patch fixes this issue by redesigning the state management.
* Cygwin: pty: Move function hook_api() into hookapi.cc.Takashi Yano2019-09-043-44/+35
| | | | | | - PTY uses Win32 API hook for pseudo console suppot. The function hook_api() is used for this purpose and defined in fhandler_tty.cc previously. This patch moves it into hookapi.cc.
* Cygwin: pty: Speed up a little hooked Win32 API for pseudo console.Takashi Yano2019-09-041-1/+3
| | | | | - Some Win32 APIs are hooked in pty code for pseudo console support. This causes slow down. This patch improves speed a little.
* Cygwin: pty: Code cleanupTakashi Yano2019-09-041-28/+0
| | | | | | - Cleanup the code which is commented out by #if 0 regarding pseudo console. - Remove #if 1 for experimental code which seems to be stable.
* Adjust nios2 and m68k semihosting for sys/stat.h changes.Sandra Loosemore2019-09-044-12/+12
| | | | | | | | | | | Commit 72ff9acad2ab54e80a19ddaec0106065c817e3f6 caused st_atime, st_ctime, and st_mtime to be defined as macros. This collided with use of these identifiers as field names in struct gdb_stat (which represents the GDB RSP encoding of struct stat) in libgloss semihosting support for nios2 and m68k. This patch renames the affected fields of struct gdb_stat. Signed-off-by: Sandra Loosemore <sandra@codesourcery.com>
* Cygwin: sys/wait.h: Add _wait prototype to avoid compiler warningCorinna Vinschen2019-09-031-0/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fe_dfl_env.c: Fix typo in commentJoel Sherrill2019-09-031-1/+1
|
* riscv/include/fenv.h: Use shared fenv.h.Joel Sherrill2019-09-031-42/+0
| | | | libc/include/fenv.h was a direct copy of this file.
* Cygwin: add W10 pseudo console support to release notesCorinna Vinschen2019-08-292-6/+18
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: pty: add pseudo console support.Takashi Yano2019-08-2912-55/+2016
| | | | | | | - Support pseudo console in PTY. Pseudo console is a new feature in Windows 10 1809, which provides console APIs on virtual terminal. With this patch, native console applications can work in PTYs such as mintty, ssh, gnu screen or tmux.
* Cygwin: get_posix_access: avoid negative subscriptKen Brown2019-08-261-4/+4
| | | | Don't refer to lacl[pos] unless we know that pos >= 0.
* Fix regression in visium caused by sys/stat.h changeJeff Law2019-08-202-6/+6
|
* Cygwin: math: Properly propagate input NANs in a few functionsMartin Storsjö2019-08-206-8/+20
| | | | | | | While the C99 standard doesn't explicitly require this, the standard says it is recommended (F.9.13). Signed-off-by: Martin Storsjö <martin@martin.st>
* Cygwin: math: Fix cosh(-INFINITY) to return +INFINITYMartin Storsjö2019-08-201-1/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Cygwin: math: Fix the return value for tgammal for zero and negative integersMartin Storsjö2019-08-201-2/+5
| | | | | | | For zero, it should return HUGE_VAL (INFINITY), for negative integers, it should return NAN. Signed-off-by: Martin Storsjö <martin@martin.st>
* Revert previous change to sys/stat.h and fix cris libglossJeff Johnston2019-08-192-15/+12
| | | | | | - revert previous fix which altered sys/stat.h - fix libgloss/cris/gensyscalls to undef st_atime, st_mtime, and st_ctime macros which cannot be used with new_stat structure
* Fix regression in cris-elf caused by sys/stat.h changeJeff Johnston2019-08-191-2/+11
|
* Cygwin: select: revamp non-polling code for signalfdCorinna Vinschen2019-08-188-111/+40
| | | | | | | | | | | | Rather than waiting for signalfd_select_wait in a thread, which is racy, create a global event "my_pendingsigs_evt" which is set and reset by wait_sig depending only on the fact if blocked signals are pending or not. This in turn allows to WFMO on this event in select as soon as signalfds are present in the read descriptor set. Select's peek and verify will then check if one of the present signalfds is affected. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert "Cygwin: fix potential SEGV in sigwaitinfo/signalfd scenario"Corinna Vinschen2019-08-172-17/+3
| | | | | | This reverts commit 92115a83a4579635e253be2887d3706d28b477fd. This was utterly wrong.
* stat.h: use POSIX-required timefields throughoutCorinna Vinschen2019-08-161-16/+6
| | | | | | ...except in certain SysV R4 cases for backward compat. This is probably not required anymore, but it doesn't hurt to keep it in.
* fenv: Include documentation in generated .info fileJoel Sherrill2019-08-155-2/+49
|
* Cygwin: ldd: Try harder to get dll namesMark Geisert2019-08-152-2/+44
| | | | | | Borrow a trick from strace to lessen occurrences of "??? => ???" in ldd output. Specifically, if the module name isn't found in the usual place in the mapped image, use the file handle we have to look up the name.
* Cygwin: console: Fix the condition to interrupt select() by SIGWINCHTakashi Yano2019-08-151-1/+3
| | | | | - Add code so that select() is not interrupted by SIGWINCH if it is ignored (SIG_IGN or SIG_DFL).
* Cygwin: console: Fix workaround for horizontal tab positionTakashi Yano2019-08-151-18/+29
| | | | | | - The workaround commit 33a21904a702191cebf0e81b4deba2dfa10a406c does not work as expected if window size is changed while screen is alternated. Fixed.
* memmem.c and strstr.c: do not require -std=c99Giacomo Tesio2019-08-142-5/+10
|
* fenv: Update makedocbook for eae68bfcJon Turney2019-08-131-1/+3
| | | | | | | | | Teach makedocbook how to handle some new things seen in the makedoc markup since eae68bfc: - 'link with' lines appearing in SYNOPSIS sections Also, don't raise a NoneType exception when there's something we don't know how to handle in a SYNOPSIS section, just exit.
* fenv: Fix typo-ed variable name in documentationJon Turney2019-08-131-1/+1
|
* fenv: Fix mangled makedoc markupJon Turney2019-08-134-8/+8
| | | | | | See makedoc.c:657: Variables are marked up as '<[foo]>'. Code is marked up as '<<foo>>'.
* fenv: fe_dfl_env.c doesn't contain any documentationJon Turney2019-08-132-2/+2
| | | | | fe_dfl_env.c doesn't contain any documentation, so drop it from makedoc processing.
* Cygwin: fix potential SEGV in sigwaitinfo/signalfd scenarioCorinna Vinschen2019-08-132-3/+17
| | | | | | | | | | | On sigwaitinfo or reading from a signalfd, signal processing sets up signal handling via sigdelayed even if the handler address is NULL. This doesn't have any impact on sigwaitinfo scenarios (or at least, I wasn't able to come up with a reproducer) but it breaks signalfd scenarios, where eventually a call to call_signal_handler from sigdelayed will try to call the NULL function. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* sched.h: Declare affinity functions only on targets supporting themCorinna Vinschen2019-08-121-0/+6
|
* Cygwin: ps: fix a compiler warningCorinna Vinschen2019-08-121-2/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: console: Fix cursor position restore after screen alternation.Takashi Yano2019-08-121-0/+3
| | | | | | | - If screen is alternated on console, cursor position is not restored correctly in the case of xterm compatible mode is enabled. For example, the shell prompt is shown at incorrect position after using vim. This patch fixes this problem.
* Cygwin: console: Add workaround for windows xterm compatible mode bug.Takashi Yano2019-08-121-0/+19
| | | | | | - The horizontal tab positions are broken after resizing console window. This seems to be a bug of xterm compatible mode of windows console. This workaround fixes this problem.