summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* format_proc_cpuinfo: add enqcmd cpuinfo flagBrian Inglis2020-10-131-0/+1
| | | | | | | | | | | | Add linux-next 5.9 cpuinfo flag for Intel enqcmd/s instructions: x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions: Work submission instruction comes in two flavors. ENQCMD can be called both in ring 3 and ring 0 and always uses the contents of a PASID MSR when shipping the command to the device. ENQCMDS allows a kernel driver to submit commands on behalf of a user process. The driver supplies the PASID value in ENQCMDS. There isn't any usage of ENQCMD in the kernel as of now. The CPU feature flag is shown as "enqcmd" in /proc/cpuinfo.
* drop ambiguous-wide behaviour from Unicode CJK localesThomas Wolff2020-10-131-13/+5
|
* Cygwin: AF_UNIX: open_pipe: call recv_peer_infoKen Brown2020-10-041-1/+5
| | | | | If open_pipe is called with xchg_sock_info true, call recv_peer_info in addition to send_sock_info.
* Cygwin: AF_UNIX: listen_pipe: check for STATUS_SUCCESSKen Brown2020-10-041-2/+5
| | | | | | A successful connection can be indicated by STATUS_SUCCESS or STATUS_PIPE_CONNECTED. Previously we were checking only for the latter.
* Cygwin: AF_UNIX: socket: set the O_RDWR flagKen Brown2020-10-041-0/+1
|
* Cygwin: always recognize AF_UNIX sockets as reparse pointsKen Brown2020-10-042-12/+15
| | | | | | | | | | | | | | | If __WITH_AF_UNIX is defined when Cygwin is built, then a named AF_UNIX socket is represented by a reparse point with a Cygwin-specific tag and GUID. Make such files recognizable as reparse points (but not as sockets) even if __WITH_AF_UNIX is not defined. That way utilities such as 'ls' and 'rm' still behave reasonably. This requires two changes: - Define the GUID __cygwin_socket_guid unconditionally. - Make check_reparse_point_target return PATH_REP on a reparse point of this type if __WITH_AF_UNIX is not defined.
* Cygwin: fix handling of known reparse points that are not symlinksKen Brown2020-10-041-5/+12
| | | | | | | | | | | | | | | | | | Commit aa467e6e, "Cygwin: add AF_UNIX reparse points to path handling", changed check_reparse_point_target so that it could return a positive value on a known reparse point that is not a symlink. But some of the code in check_reparse_point that handles this positive return value was executed unconditionally, when it should have been executed only for symlinks. As a result, posixify could be called on a buffer containing garbage, and check_reparse_point could erroneously return a positive value on a non-symlink. This is now fixed so that posixify is only called if the reparse point is a symlink, and check_reparse_point returns 0 if the reparse point is not a symlink. Also fix symlink_info::check to handle this last case, in which check_reparse_point returns 0 on a known reparse point.
* Cygwin: AF_UNIX: use FILE_OPEN_REPARSE_POINT when neededKen Brown2020-10-042-4/+15
| | | | | | | | | | | | | | The following Windows system calls currently fail with STATUS_IO_REPARSE_TAG_NOT_HANDLED when called on an AF_UNIX socket: - NtOpenFile in get_file_sd - NtOpenFile in set_file_sd - NtCreateFile in fhandler_base::open Fix this by adding the FILE_OPEN_REPARSE_POINT flag to those calls when the file is a known reparse point.
* libc/include/wchar.h: Remove parameter nameTorbjörn SVENSSON2020-10-021-2/+2
| | | | | | | | | | | | | | | | | As discussed in GCC bug 97088 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in prototypes of library functions should use reserved names, or no name at all. This patch removes the 'ptr' parameter name from wint_t _getwchar_r (struct _reent *); wint_t _getwchar_unlocked_r (struct _reent *); to avoid possible clashes with user code in case someone uses before including Newlib's wchar.h (or uses some other conflicting definition) Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
* libc/include/inttypes.h: Remove parameter nameTorbjörn SVENSSON2020-10-021-1/+1
| | | | | | | | | | | | | | | | As discussed in GCC bug 97088 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in prototypes of library functions should use reserved names, or no name at all. This patch removes the 'j' parameter name from extern intmax_t imaxabs(intmax_t); to avoid possible clashes with user code in case someone uses before including Newlib's inttypes.h (or uses some other conflicting definition) Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
* libgloss: aarch64: Add support for Armv8-R AArch64Alex Coplan via Newlib2020-09-304-4/+38
| | | | | | | | | | | This patch adds support for Armv8-R AArch64. Armv8-R AArch64 has no EL3, so we don't set vbar_el3, and adjust the code to set up the MPU for Armv8-R. So build a different flavour of the startup code to support that. We also add a specs file that uses this alternative startup code which can be used with Armv8-R AArch64 models.
* Cygwin: avoid GCC 10 error with -Werror=narrowingJon Turney2020-09-282-3/+1
| | | | | | | | | | | | | ../../../../src/winsup/cygwin/pinfo.cc: In member function 'DWORD pinfo::status_exit(DWORD)': ../../../../src/winsup/cygwin/ntdll.h:21:68: error: narrowing conversion of '-536870295' from 'NTSTATUS' {aka 'int'} to 'unsigned int' [-Wnarrowing] ../../../../src/winsup/cygwin/pinfo.cc:136:10: note: in expansion of macro 'STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION' ../../../../src/winsup/cygwin/sigproc.cc: In member function 'DWORD child_info::proc_retry(HANDLE)': ../../../../src/winsup/cygwin/ntdll.h:21:68: error: narrowing conversion of '-536870295' from 'NTSTATUS' {aka 'int'} to 'unsigned int' [-Wnarrowing] ../../../../src/winsup/cygwin/sigproc.cc:1120:10: note: in expansion of macro 'STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION' NT error statuses seem to be variously DWORD (unsigned) or NTSTATUS (signed)? So use the one which doesn't cause problems here.
* Cygwin: avoid GCC 10 error with -Werror=narrowingJon Turney2020-09-281-2/+2
| | | | | | | | | | ../../../../src/winsup/cygwin/fhandler_console.cc: In member function 'const unsigned char* fhandler_console::write_normal(const unsigned char*, const unsigned char*)': ../../../../src/winsup/cygwin/fhandler_console.cc:2782:8: error: narrowing conversion of '-2' from 'int' to 'long unsigned int' [-Wnarrowing] ../../../../src/winsup/cygwin/fhandler_console.cc:2786:8: error: narrowing conversion of '-1' from 'int' to 'long unsigned int' [-Wnarrowing] ../../../../src/winsup/cygwin/fhandler_console.cc:2836:8: error: narrowing conversion of '-2' from 'int' to 'long unsigned int' [-Wnarrowing] ../../../../src/winsup/cygwin/fhandler_console.cc:2840:8: error: narrowing conversion of '-1' from 'int' to 'long unsigned int' [-Wnarrowing] A mbtowc_p function returns an int, so that seems the correct type to use here.
* Cygwin: avoid GCC 10 error with -Werror=parenthesesJon Turney2020-09-281-1/+1
| | | | | ../../../../src/winsup/cygwin/fhandler_socket_inet.cc: In member function 'ssize_t fhandler_socket_wsock::send_internal(_WSAMSG*, int)': ../../../../src/winsup/cygwin/fhandler_socket_inet.cc:1381:69: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
* Cygwin: check_reparse_point_target: update commentKen Brown2020-09-261-2/+3
| | | | | | Commit aa467e6e, "Cygwin: add AF_UNIX reparse points to path handling", changed the return values of check_reparse_point_target. Update the comment accordingly.
* libc/include/math.h: Remove parameter nameChristophe Lyon2020-09-251-8/+8
| | | | | | | | | | | | | | | | | | | | | As discussed in GCC bug 97088 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in prototypes of library functions should use reserved names, or no name at all. This patch removes the 'x' parameter name from extern int __isinff (float); extern int __isinfd (double); extern int __isnanf (float); extern int __isnand (double); extern int __fpclassifyf (float); extern int __fpclassifyd (double); extern int __signbitf (float); extern int __signbitd (double); to avoid possible clashes with user code in case someone uses before including Newlib's math.h (or uses some other conflicting definition)
* Add C-SKY port for libglossJojo R2020-09-2528-0/+6831
| | | | | | | | | | This patch contain all libgloss for C-SKY Contributor list: - Lifang Xia <lifang_xia@c-sky.com> - Jojo R <jiejie_rong@c-sky.com> - Xianmiao Qu <xianmiao_qu@c-sky.com> - Yunhai Shang <yunhai_shang@c-sky.com>
* Cygwin: winlean.h: remove most of the extended memory APIKen Brown2020-09-244-43/+17
| | | | | | | | | | | | | | | | | This was added as a temporary measure in commit e18f7f99 because it wasn't yet in the mingw-w64 headers. With one exception, it is now in the current release of the headers (version 8.0.0), so we don't need it in winlean.h. The exception is that VirtualAlloc2 is declared conditionally in <w32api/memoryapi.h>, but the compilation of Cygwin requires it to always be declared, even though it will only be executed on systems that support it. So retain the declaration in winlean.h. And add "WINAPI" to the declaration, as in memoryapi.h. Add a check that version >= 8 of the mingw-w64 headers is intalled. Also revert commit 3d136011, which was a related temporary workaround.
* Port of C-SKY for newlibJojo R2020-09-2312-2/+6372
| | | | | | | | | Contributor list:   - Lifang Xia <lifang_xia@c-sky.com>   - Jojo R <jiejie_rong@c-sky.com>   - Xianmiao Qu <xianmiao_qu@c-sky.com>   - Yunhai Shang <yunhai_shang@c-sky.com>
* libm: Make tgamma(-small) = -INFINITYKeith Packard2020-09-181-1/+1
| | | | | | | Need to copy the argument sign to the output for tgamma(finite) overflow case. Signed-off-by: Keith Packard <keithp@keithp.com>
* winsup/doc/faq-what.xml: FAQ 1.2 Windows versions supportedBrian Inglis2020-09-181-5/+5
| | | | | enumerate Vista, 7, 8, 10 progression to be clear, and earliest server 2008; add 8.1, exclude S mode, add Cygwin32 on ARM, specify 64 bit only AMD/Intel
* fhandler_proc.cc(format_proc_cpuinfo): add tsxldtrk, sev_es flagsBrian Inglis2020-09-171-0/+8
| | | | | Add linux-next cpuinfo flags for Intel TSX suspend load address tracking instructions and AMD Secure Encrypted Virtualization with Encrypted State.
* Cygwin: pty: Drop handling for UTF-7 in convert_mb_str().Takashi Yano2020-09-111-48/+38
| | | | | | - Charset conversion for UTF-7, ISO-2022 and ISCII, which are not supported in cygwin, does not work properly as a result. At the expense of the above, the code has been simplified a bit.
* Cygwin: ldd: Also look for not found DLLs when exit status is non-zeroJon Turney2020-09-111-0/+2
| | | | | | | | | | | If the process exited with e.g. STATUS_DLL_NOT_FOUND, also process the file to look for not found DLLs. (We currently only do this when a STATUS_DLL_NOT_FOUND exception occurs, which I haven't managed to observe) This still isn't 100% correct, as it only examines the specified file for missing DLLs, not recursively on the DLLs it depends upon.
* Cygwin: pty: Prevent garbled output for existing non-cygwin apps.Takashi Yano via Cygwin-patches2020-09-111-1/+5
| | | | | | | | | | | | | | | - If pseudo console is disabled, non-cygwin apps do not detect console device. In this case, some apps output UTF-8 regardless of the locale setting. At least git-for-windows, rust-based apps and node.js do that. This patch provides backward compatibility as default behaviour by setting console codepage to the charset of the locale. Even in the cases above, garbled output is prevented with this patch in most cases because mintty uses UTF-8 by default. I beleave this is not really a problem in cygwin side but that in app side, however, some users complain about garbled output with existing apps in MSYS2 (which is based on cygwin) in which pseudo console is disabled by default.
* Cygwin: pty: setup new pty on opening the master, not in constructorCorinna Vinschen2020-09-092-5/+5
| | | | | | | | | Setting up the pty in the master constructor ends up creating a new pty on every stat(2) call on /dev/ptmx. Only do this when actually opening the device, not when using the device class in another, non-opening context. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: pty: Fix input charset for non-cygwin apps with disable_pcon.Takashi Yano via Cygwin-patches2020-09-091-1/+15
| | | | | | - If the non-cygwin apps is executed under pseudo console disabled, multibyte input for the apps are garbled. This patch fixes the issue.
* Cygwin: pty: Revise convert_mb_str() function.Takashi Yano via Cygwin-patches2020-09-091-47/+88
| | | | | | | - Use tmp_pathbuf instead of HeapAlloc()/HeapFree(). - Remove mb_str_free() function. - Consider the case where the multibyte string stops in the middle of a multibyte char.
* Cygwin: document last bug fixKen Brown2020-09-081-0/+3
|
* Cygwin: path_conv::check: handle error from fhandler_process::existsKen Brown2020-09-081-0/+9
| | | | | | | fhandler_process::exists is called when we are checking a path starting with "/proc/<pid>/fd". If it returns virt_none and sets an errno, there is no need for further checking. Just set 'error' and return.
* Cygwin: format_process_fd: add directory checkKen Brown2020-09-081-0/+15
| | | | | | The incoming path is allowed to have the form "$PID/fd/[0-9]*/.*" provided the descriptor symlink points to a directory. Check that this is indeed the case.
* Cygwin: pty: move codepage evaluation to nlsfuncs.ccCorinna Vinschen2020-09-082-182/+57
| | | | | | | | | | The new function __eval_codepage_from_internal_charset is a simplified version of the former code in fhandler_tty.cc. It probably needs some extension, but the gist is to use knowledge of internals to be as quick as possible. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: drop internal O_NOSYMLINK and O_DIROPEN flagsCorinna Vinschen2020-09-079-16/+16
| | | | | | | | | | | | | | | | | | | | Both flags are outdated and collide with official flags in sys/_default_fcntl.h, which may result in weird misbehaviour of file functions. O_NOSYMLINK is not used anyway. O_DIROPEN is used in fhandler_virtual and derived classes. The collision with O_NOFOLLOW results in spurious EISDIR errors when, e. g., reading files in the registry. fhandler_base::open_fs uses O_DIROPEN in the call to fhandler_base::open, but it's not used in this context further down the road. Drop both flags and create an alternative "diropen" bool flag in fhandler_virtual. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2]Keith Packard via Newlib2020-09-0413-118/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current gamma, gamma_r, gammaf and gammaf_r functions return |gamma(x)| instead of ln(|gamma(x)|) due to a change made back in 2002 to the __ieee754_gamma_r implementation. This patch fixes that, making all of these functions map too their lgamma equivalents. To fix the underlying bug, the __ieee754_gamma functions have been changed to return gamma(x), removing the _r variants as those are no longer necessary. Their names have been changed to __ieee754_tgamma to avoid potential confusion from users. Now that the __ieee754_tgamma functions return the correctly signed value, the tgamma functions have been modified to use them. libm.a now exposes the following gamma functions: ln(|gamma(x)|): __ieee754_lgamma_r __ieee754_lgammaf_r lgamma lgamma_r gamma gamma_r lgammaf lgammaf_r gammaf gammaf_r lgammal (on machines where long double is double) gamma(x): __ieee754_tgamma __ieee754_tgammaf tgamma tgammaf tgammal (on machines where long double is double) Additional aliases for any of the above functions can be added if necessary; in particular, I'm not sure if we need to include __ieee754_gamma*_r functions (which would return ln(|(gamma(x)|). Signed-off-by: Keith Packard <keithp@keithp.com> ---- v2: Switch commit message to ASCII
* libm/riscv: Use common fma code when necessaryKeith Packard via Newlib2020-09-042-0/+4
| | | | | | | For RISC-V targets without hardware FMA support, include the common fma implementation to provide that API. Signed-off-by: Keith Packard <keithp@keithp.com>
* libm/riscv: Fix machine-specific sqrt build processKeith Packard via Newlib2020-09-044-20/+16
| | | | | | | | | | | | Like ARM, some RISC-V implementations have hardware sqrt. Support for that can be detected at compile time, which the code did. However, the filenames were incorrect so that both the risc-v specific and general code were getting included in the resulting library. Fix this by following the ARM model and #include'ing the general code when the architecture-specific support is not available. Signed-off-by: Keith Packard <keithp@keithp.com>
* MSP430: Fix calculation of string length in sbrk.cJozef Lawrynowicz2020-09-041-1/+1
|
* Cygwin: create install dir for libsDavid McFarland via Cygwin-patches2020-09-041-1/+1
| | | | This fixes a race in parallel installs.
* loadlocale: don't casecmp digitsCorinna Vinschen2020-09-041-1/+1
| | | | | | strcmp is sufficient here Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* MSP430: Fix message in sbrk.c printing binary characterJozef Lawrynowicz2020-09-031-2/+2
| | | | | | The call to write() in sbrk.c was using the wrong value for the length argument, causing the NUL terminating character of the string to be printed.
* Fix warnings when building for msp430-elfJozef Lawrynowicz2020-09-037-16/+27
| | | | | | | | The MSP430 target supports both 16-bit and 20-bit size_t and intptr_t. Some implicit casts in Newlib expect these types to be "long", (a 32-bit type on MSP430) which causes warnings during compilation such as: "cast from pointer to integer of different size"
* libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.cKeith Packard via Newlib2020-09-024-14/+14
| | | | | | | | | | | This is required to avoid colliding with files built from libm/common that would end up with the same object name. When libm.a was constructed from the individual sub-libraries, the contents of the libm/common files would be replaced by that from libm/machine/arm with the same name. Signed-off-by: Keith Packard <keithp@keithp.com>
* Cygwin: libpthread: Export C11 thread symbols from libpthread.a as wellCorinna Vinschen2020-09-011-1/+2
| | | | | | | ...as on glibc right now. This is supposed to support autoconf scripts checking for existence of these symbols in libpthread. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: mtx_init: drop glibc workaroundCorinna Vinschen2020-09-011-7/+0
| | | | | | | GLibc will change this code in the forseeable future to align more with FreeBSD, so this hack is not actually desired. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: pty: Fix a bug in the code removing set window title sequence.Takashi Yano via Cygwin-patches2020-08-311-8/+5
| | | | | | - Commit 4e08fe42c9f3fdba63a57a8e3a6d705c4e10f50f has a bug which may cause infinite loop in pty_master_fwd_thread(). This patch fixes the issue.
* Cygwin: pty: Disable pseudo console if TERM does not have CSI6n.Takashi Yano via Cygwin-patches2020-08-315-30/+229
| | | | | | | | | | | | | | | | | | | - Pseudo console internally sends escape sequence CSI6n (query cursor position) on startup of non-cygwin apps. If the terminal does not support CSI6n, CreateProcess() hangs waiting for response. To prevent hang, this patch disables pseudo console if the terminal does not have CSI6n. This is checked on the first execution of non-cygwin app using the following steps. 1) Check if the terminal support ANSI escape sequences by looking into terminfo database. If terminfo has cursor_home (ESC [H), the terminal is supposed to support ANSI escape sequences. 2) If the terminal supports ANSI escape sequneces, send CSI6n for a test and wait for a responce for 40ms. 3) If there is a responce within 40ms, CSI6n is supposed to be supported. Also set-title capability is checked, and removes escape sequence for setting window title if the terminal does not have the set- title capability.
* Cygwin: Remove waitloop argument from try_to_debug()Jon Turney2020-08-302-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when using CYGWIN's error_start facility, the faulting process isn't stopped while the error_start process is started when the fault is caused by an exception. (it even seems possible in theory that the faulting process could have exited before the error_start process attaches). This leads to e.g. the core dump written by CYGWIN='error_start=dumper' in response to an exception being non-deterministic. Remove the waitloop argument from try_to_debug(), only used in the exception case, so the faulting process busy-waits until the error_start process attaches. Code archaeology to determine why the code is this way didn't really turn up any answers, but this seems a low-risk change, as this only changes the behaviour when: - a debugger isn't already attached - an error_start is specified in CYGWIN env var - an exception has occurred which will be translated to a signal If error_start invokes something which doesn't attach using DebugActiveProcess(), we will spin indefinitely, but that will also currently occur for any of the existing other uses of try_to_debug(), which default to waitloop=TRUE.
* Cygwin: sigproc.cc: add commentKen Brown2020-08-301-1/+5
|
* Cygwin: Add modfl fix to release notesCorinna Vinschen2020-08-301-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: crt: Add "volatile" to all inline assembly snippets under mathMartin Storsjö2020-08-3011-15/+21
| | | | | | | | On 32 bit x86, clang seems to miss loading input parameters based on asm constraints for inline assembly that uses the x87 floating registers, unless the snippet has got the volatile keyword. Signed-off-by: Martin Storsjö <martin@martin.st>