summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Fix trace output for getdomainname()Anton Lavrentiev via Cygwin-patches2020-12-071-1/+1
|
* winsup/doc/Makefile.in: create man5 dir and install proc.5Brian Inglis2020-12-041-0/+4
|
* specialnames.xml: add proc(5) Cygwin man pageBrian Inglis2020-12-041-0/+2094
|
* Cygwin: Fix remaining warnings building path testsuiteCorinna Vinschen2020-12-024-11/+11
|
* Cygwin: Fix building of utils testsuiteJon Turney2020-12-022-1/+5
| | | | Avoid referencing undefined max_mount_entry.
* Cygwin: add flag to indicate reparse points unknown to WinAPICorinna Vinschen2020-12-022-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://cygwin.com/pipermail/cygwin/2020-December/246938.html reports a problem where, when adding a Cygwin default symlink to $PATH since Cygwin 3.1.5, $PATH handling appears to be broken. 3.1.5 switched to WSL symlinks as Cygwin default symlinks. A piece of code in path handling skips resolving reparse points if they are the last component in the path. Thus a reparse point in $PATH is not resolved but converted to Windows path syntax verbatim. If you do this with a WSL symlink, certain WinAPI functions fail. The underlying $PATH handling fails to recognize the reparse point in $PATH and returns with STATUS_IO_REPARSE_TAG_NOT_HANDLED. As a result, the calling WinAPI function fails, most prominently so CreateProcess. Fix this problem by adding a PATH_REP_NOAPI bit to path_types and a matching method path_conv::is_winapi_reparse_point(). Right now this flag is set for WSL symlinks and Cygwin AF_UNIX sockets (new type implemented as reparse points). The aforementioned code skipping repare point path resolution calls is_winapi_reparse_point() rather than is_known_reparse_point(), so now path resolution is only skipped for reparse points known to WinAPI. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: path.h: add comments to briefly explain path_typesCorinna Vinschen2020-12-021-5/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: testsuite: libltp: fix warnings showing up with -WallCorinna Vinschen2020-12-024-12/+19
| | | | | | | | This libltp is old as old dirt and still using K&R style. If it's really to be used again at all, it needs a serious refresh. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: /proc/sys FS: don't export NFS and DFS as block devicesCorinna Vinschen2020-12-011-4/+1
| | | | | | | | Network filesystems are not block devices. Apparently this code hasn't been executed anyway, given how network filesystems are hidden behind \Device\Mup. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Fix access to block devices below /proc/sys.Christian Franke2020-11-301-10/+19
| | | | | | | | Use fhandler_dev_floppy instead of fhandler_procsys for such devices. The read()/write() functions from fhandler_procsys do not ensure sector aligned transfers and lseek() fails always. Signed-off-by: Christian Franke <franke@computer.org>
* Cygwin: Have cygmagic not create output if an error occursJon Turney2020-11-251-3/+14
| | | | | Improve the 'cygmagic' script, so it doesn't create the output file if an error occurs, even in one of the backtick-enclosed pipelines it runs.
* Cygwin: Use standard CXXFLAGS when compiling localtime_wrapper.cJon Turney2020-11-251-1/+1
| | | | | This has an separate, explicit compilation rule which omits CXXFLAGS, so expected flags like '-g -O2' aren't being used.
* Cygwin: Drop libgmon.a build dependency on gcrt0.oJon Turney2020-11-251-1/+1
| | | | libgmon.a depends on gcrt0.o, but doesn't include it.
* Cygwin: pty: Fix minor style issue.Takashi Yano via Cygwin-patches2020-11-231-1/+1
|
* Cygwin: pty: Discard "OSC Ps; ? BEL/ST" in pseudo console output.Takashi Yano via Cygwin-patches2020-11-231-0/+30
| | | | | | | - If vim is executed in WSL in mintty, some garbage string caused by "OSC Ps;? BEL/ST" will be shown in some situations. This patch fixes the issue by removing "OSC Ps;? BEL/ST" from pseudo console output.
* Cygwin: pty: Fix a bug in the code removing "CSI > Pm m".Takashi Yano via Cygwin-patches2020-11-231-0/+1
| | | | | | - The code added by 8121b606e843c001d5ca5213d24099e04ebc62ca has a bug which fails to remove multiple "CSI > Pm m" sequences. This patch fixes the bug.
* Cygwin: Remove surplus autoconf auxiliary filesJon Turney2020-11-204-3855/+0
| | | | | | | | | Since we are now only configuring once, in winsup, with AC_CONFIG_AUX_DIR(..), the auxiliary files are taken from the top-level. (Previously we had a random assorment of AC_CONFIG_AUX_DIR(..) and AC_CONFIG_AUX_DIR(../..) in winsup subdirectories, so auxiliary files would be taken from winsup or the top-level.)
* Cygwin: Remove recursive configureJon Turney2020-11-2028-24227/+1389
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's doesn't seem to be much use in independently distributing these subdirectories, so allowing them to be independently configured seems pointless and overcomplicated. The order in which the subdirectories are built is still a little odd, as cygwin is linked with libcygserver, and cygserver is then linked with cygwin. So, we build the cygwin directory first, which invokes a build of libcygserver in the cygserver directory, and then build in the cygserver directory to build the cygserver executable. Drop AC_CONFIGURE_ARGS, since we don't need to recursively call configure with the same arguments anymore. Slightly refine when we build utils: Previously we didn't build any utils if MinGW compiler use was avoided, now we just avoid building those utils which require that compiler. Greatly simplify how winsup_srcdir and target_builddir are set, since we're only configuring from one directory. (These are still kept absolute, since we don't adjust them where used for being used in a subdirectory). Remove configure.cygwin and put it's (greatly reduced) contents inline in the one place it's used now. Remove generated configure and aclocal.m4 in subdirectories.
* Cygwin: fhandler_fifo::cleanup_handlers: improve efficiencyKen Brown2020-11-191-9/+4
| | | | | Traverse the fifo_client_handler list from the top down to try to avoid copying.
* Cygwin: Testsuite Makefile cleanupJon Turney2020-11-181-13/+2
| | | | | | Drop unused variables CC_FOR_TARGET, GCC_INCLUDE, ALL_CFLAGS Stop exporting CC, CFLAGS Drop unused, empty targets force, dll_ofiles, all_target
* Cygwin: Fix 'make check' in utilsJon Turney2020-11-183-10/+12
| | | | | | | | | | | | | | This has a test of the path translation code used in various utilities (mount, cygpath, strace). MOUNT_BINARY is replaced with the absence of MOUNT_TEXT since 26e0b37e. The issys member of mnt_t struct was removed in b677a99b. > $ make check [...] > total tests: 63 > pass : 63 (100.0%) > fail : 0 (0.0%)
* Cygwin: Drop duplicate C++ flags used to build utilsJon Turney2020-11-181-1/+1
| | | | | | '-fno-exceptions -fno-rtti' are already present in the compile command COMPILE.cc set by Makefile.common, so we don't need to add them to CXXFLAGS as well.
* Cygwin: Use grep in text mode to look for version stringsJon Turney2020-11-181-1/+1
| | | | | | | Invoke grep in text mode when looking for version strings inside the cygwin DLL, so it outputs something more informative than: Binary file ../cygwin/cygwin0.dll matches
* RISC-V: Add machine-specific implementation for lrint[f], lround[f], ↵Kito Cheng2020-11-1810-3/+503
| | | | llrint[f] and llround[f].
* RISC-V: Add machine-specific implementation for isnan[f] and copysign[f]Kito Cheng2020-11-186-3/+237
|
* RISC-V: Add missing compile rule for s_finite.c, sf_finite.c, s_isinf.c and ↵Kito Cheng2020-11-182-3/+33
| | | | sf_isinf.c
* malloc/nano-malloc: correctly check for out-of-bounds allocation reqsCorinna Vinschen2020-11-173-2/+31
| | | | | | | | | | | | The overflow check in mEMALIGn erroneously checks for INT_MAX, albeit the input parameter is size_t. Fix this to check for __SIZE_MAX__ instead. Also, it misses to check the req against adding the alignment before calling mALLOc. While at it, add out-of-bounds checks to pvALLOc, nano_memalign, nano_valloc, and Cygwin's (unused) dlpvalloc. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix return type of __locale_ctype_ptr_l()Sebastian Huber2020-11-161-1/+1
| | | | | | | This prevents warnings like this: ctype.h:118:9: warning: return discards 'const' qualifier from pointer target type
* Cygwin: testsuite: fix insecure usage of printf in libltpCorinna Vinschen2020-11-161-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* libc/include/newlib.h: Fix C++ compilation issueJoel Sherrill2020-11-161-2/+2
|
* Cygwin: path_conv::eq_worker: add NULL pointer checksKen Brown2020-11-161-2/+4
| | | | | | | Don't call cstrdup on NULL pointers. This fixes a crash that was observed when cloning an fhandler whose path_conv member had freed its strings.
* Cygwin: Fix testsuite tmpdir creation with non-default cygdrive prefixJon Turney2020-11-122-5/+7
|
* Cygwin: fhandler_fifo: reduce sizeKen Brown2020-11-092-9/+14
| | | | | | | | | | Replace the 'WCHAR pipe_name_buf[48]' class member by 'PWCHAR pipe_name_buf', and allocate space for the latter as needed. Change the default constructor to accommodate this change, and add a destructor that frees the allocated space. Also change get_pipe_name and clone to accommodate this change.
* Cygwin: Ensure temporary directory used by tests existsJon Turney2020-11-083-4/+15
| | | | | | | | | | | | | | | By default, libltp tests will create temporary files in a subdirectory of /tmp, which will (nowadays) be located relative to the test DLL (by assuming that it is in /bin). This will evaluate to the directory $target_builddir/winsup/tmp, which doesn't exist. The location used for these temporary files can be explicitly controlled by setting the TDIRECTORY env var. Arrange to set that env var to the /cygdrive path of a tmp subdirectory of the build directory. Unfortunately, libltp doesn't clean the temporary directory if TDIRECTORY is set, and some tests assume they are started in a clean directory, so we need to do that in tcl.
* Cygwin: Set PATH for tests to pick up cygwin0.dllJon Turney2020-11-081-0/+2
| | | | | | Set the PATH so that tests can pick up cygwin0.dll. Looks like this was dropped by accident in 2e488e95 ("Don't rely on in-build tools"), so restore it as it was prior to 9d89f634.
* Cygwin: Check exit code of a test, rather than stdoutJon Turney2020-11-081-7/+13
| | | | | In winsup.exp, don't consider a command failed if it produced any output (e.g. if the compiler produced warnings). Instead check the exit code.
* Cygwin: Use absolute path to libltp includesJon Turney2020-11-081-1/+1
| | | | | Use an absolute path to libltp includes, to allow for the fact that we'll be compiling tests in a subdirectory.