Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-08Cygwin: unlink_nt: declare in winsup.hCorinna Vinschen
unlink_nt is used more than once so declare it in a header. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-07Cygwin: dsp: Improve response time of select()/poll().Takashi Yano
With this patch, the response time of select()/poll() has been improved by utilizing semaphore (select_sem) just like pipe and fifo. In addition, notification of exceptional conditions has been added. Fixes: 2c06014f12b0 ("Cygwin: dsp: Implement select()/poll().") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-09-06Cygwin: dsp: Implement select()/poll().Takashi Yano
Previously, sound device /dev/dsp did not support select()/poll(). These have been implemented with this patch. Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-09-05Cygwin: dsp: Fix trivial editorial issue.Takashi Yano
2023-09-05Cygwin: dsp: Reduce wait time for blocking read().Takashi Yano
Previous wait time of 100msec is too long if application specifies smaller buffer. With this patch, the wait time is reduced to 1msec.
2023-09-05Cygwin: dps: Fix a bug that read() could not return -1 on error.Takashi Yano
2023-09-04Cygwin: document FIFO over NFS changeCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-04Revert "Cygwin: mknod: disable creating special files on NFS"Corinna Vinschen
This reverts commit d085592daa5f89ccc9f5b86b2ca26199e7516d61. This reenables creating Cygwin FIFOs on NFS. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-04Cygwin: enable usage of FIFOs on NFSCorinna Vinschen
FIFOs on NFS were never recogized as such in path handling. stat(2) indicated native FIFOs as FIFOs but the path handling code didn't set the matching values in the inner symlink checking code, so the followup behaviour was wrong. Basically for the same reason, Cygwin-created FIFOs were just treated as symlinks with weird content by stat(2) as well as path handling. Add code to enable both types of FIFOs on NFS as Cygwin FIFOs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-03Cygwin: CI: Also deploy documentation for release tagsJon Turney
2023-09-03Cygwin: CI: Add documentation preview deploy stepJon Turney
2023-09-03Cygwin: CI: Simplify and reduce the number of steps in cross-build jobJon Turney
2023-09-02Cygwin: CI: Take note of the testsuite statusJon Turney
2023-09-01Cygwin: cpuinfo: Linux 6.5 additionsBrian Inglis
add AMD 0x8000001f EAX 14 debug_swap SEV-ES full debug state swap Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
2023-09-01Cygwin: Implement sound mixer device.Takashi Yano
This patch adds implementation of OSS-based sound mixer device. This allows applications to change the sound playing volume. NOTE: Currently, the recording volume cannot be changed. Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-09-01Cygwin: document latest sys/cpuset.h fixCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-01Cygwin: sys/cpuset.h: use internal base typesCorinna Vinschen
Use __size_t and __pid_t instead of size_t and pid_t to avoid further dependencies to external headers. Reported-by: Brian Inglis <Brian.Inglis@Shaw.ca> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-01Cygwin: sys/cpuset.h: add cpuset-specific external functionsCorinna Vinschen
The latest incarnation of sys/cpuset.h broke building coreutils. The reason is the inclusion of stdlib.h and string.h and hence premature requests for datatypes not yet defined in the include chain. Avoid this by defining __cpuset_alloc and __cpuset_free as external functions, now defined in sched.cc. Linux is doing this too, just using different names for the functions. Redefine __cpuset_zero_s to use __builtin_memset only on compilers supporting it, otherwise using a simple loop. Drop the stdlib.h and string.h includes. Fixes: 3f2790e04439 ("Cygwin: Make gcc-specific code in <sys/cpuset.h> compiler-agnostic") Reported-by: Denis Excoffier <cygwin@Denis-Excoffier.org> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-01Cygwin: dsp: Fix a few trivial bugs.Takashi Yano
Signed-off-by: Takashi Yano <takashi.yanao@nifty.ne.jp>
2023-08-29libc/stdlib/nano-mallocr.c, typo in variable namePekka Seppänen
Nano malloc uses `size' in assertation whereas the correct variable would be `s'. Given this has existed ever since nano malloc support was added, based on the context ("returned payload area of desired size does not exceed the actual allocated chunk") I presume that indeed `s' (user input) and not `r->size' (computed) shall be used.
2023-08-29Cygwin: execve: drop argument size limitCorinna Vinschen
Before commit 44f73c5a6206 ("Cygwin: Fix segfalt when too many command line args are specified.") we had no actual argument size limit, except for the fact that the child process created another copy of the argv array on the stack, which could result in a stack overflow and a subsequent SEGV. Commit 44f73c5a6206 changed that by allocating the additional argv array via malloc, and it introduced a new SC_ARG_MAX limit along the lines of the typical Linux limit. However, this new limit is artificial. Cygwin allocates all argument and environment data on the cygheap. We only run out of ARG_MAX space if we're out of memory resources. Change argument size handling accordingly: - Drop the args size check from child_info_spawn::worker. - Return -1 from sysconf (SC_ARG_MAX), i. e., the argument size limit is undefined. - Change argv handling in class av, so that a failing cmalloc is not fatal. This allows the parent process to return E2BIG if it's out of cygheap resources. - In the child, add a check around the new malloc call, so that it doesn't result in a SEGV if the child process gets unexpectedly into an ENOMEM situation at this point. In this (unlikely) case, proceed with the original __argv array instead. Add comment to explain why. Fixes: 44f73c5a6206 ("Cygwin: Fix segfalt when too many command line args are specified.") Tested-by: Takashi Yano <takashi.yano@nifty.ne.jp> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-29newlib: fix 'sed' for sys headers path prefixAlexey Lapshin
Precisely remove the prefix from the filepath.
2023-08-28Cygwin: Fix segfalt when too many command line args are specified.Takashi Yano
Previously, the number of command line args was not checked for cygwin process. Due to this, segmentation fault was caused if too many command line args are specified. https://cygwin.com/pipermail/cygwin/2023-August/254333.html Since char *argv[argc + 1] is placed on the stack in dll_crt0_1(), STATUS_STACK_OVERFLOW occurs if the stack does not have enough space. With this patch, char *argv[] is placed in heap instead of stack and ARG_MAX is increased from 32000 to 2097152 which is default value of Linux. The argument length is also compared with ARG_MAX and spawnve() returns E2BIG if it is too long. Reported-by: Ed Morton Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-08-28Cygwin: termios: Refactor the function is_console_app().Takashi Yano
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-08-27Revert "Cygwin: autoload: introduce LoadDLLfunc_pfx_only"Corinna Vinschen
This reverts commit 0e711d6cc9b5206335fe8562817b6d5e6cad876e. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-27Revert "Cygwin: select: workaround FD_WRITE network event handling"Corinna Vinschen
This reverts commit dedbbd74d0a8f3b7dfae6188321703a47bb8a2b3. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-25Cygwin: document disabling mknod/mkfifo on NFSCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-25Cygwin: mknod: disable creating special files on NFSCorinna Vinschen
This simply doesn't work (yet?) but leaves unusable files behind. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-25Cygwin: doc: add new API calls in 3.5Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-24libgloss: add Xtensa portAlexey Lapshin
Supported esp32 and esp32s2 boards: https://github.com/espressif/esp-toolchain-docs/blob/main/gcc/build-and-run-native-app.md
2023-08-19Cygwin: pty: Fix failure to clear switch_to_nat_pipe flag.Takashi Yano
After the commit fbfea31dd9b9, switch_to_nat_pipe is not cleared properly when non-cygwin app is terminated in the case where the pseudo console is disabled. This is because get_winpid_to_hand_over() sometimes returns PID of cygwin process even though it should return only PID of non-cygwin process. This patch fixes the issue by adding a new argument which requests only PID of non-cygwin process to get_console_process_id(). Fixes: fbfea31dd9b9 ("Cygwin: pty: Avoid cutting the branch the pty master is sitting on.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-08-18newlib: add Xtensa portAlexey Lapshin
2023-08-16Cygwin: shared: Fix access permissions setting in open_shared().Takashi Yano
After the commit 93508e5bb841, the access permissions argument passed to open_shared() is ignored and always replaced with (FILE_MAP_READ | FILE_MAP_WRITE). This causes the weird behaviour that sshd service process loses its cygwin PID. This triggers the failure in pty that transfer_input() does not work properly. This patch resumes the access permission settings to fix that. Fixes: 93508e5bb841 ("Cygwin: open_shared: don't reuse shared_locations parameter as output") Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signedd-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-08-16Cygwin: pty: Add missing pinfo check in transfer_input().Takashi Yano
The commit 10d083c745dd has a bug that lacks a check for pinfo pointer value for master_pid. This causes segmentation fault if the process whose pid is master_pid no longer exists. This patch fixes the issue. Fixes: 10d083c745dd ("Cygwin: pty: Inherit typeahead data between two input pipes.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-08-15Cygwin: cXXrtomb, mbrtcXX: use function-specific internal stateCorinna Vinschen
As described in the previous commit b5111e46424b ("struct _reent: add state for unicode functions") every unicode conversion function has to use their own state object, if the state parameter is NULL. Fixes: 4f258c55e87f ("Cygwin: Add ISO C11 functions c16rtomb, c32rtomb, mbrtoc16, mbrtoc32.") Fixes: c49bc478b4a7 ("Cygwin: Add ISO C2X functions c8rtomb, mbrtoc8") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-15struct _reent: add state for unicode functionsCorinna Vinschen
C23 requires that the unicode functions c16rtomb, c8rtomb, mbrtoc16, mbrtoc32 and mbrtoc8 use their own internal state object. c32rtomb only needs an internal state if the lib supports encoding with shift states, but that's the case for newlib and Cygwin. Only Cygwin implements these functions so add the states objects only for Cygwin for now. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-11Cygwin: testsuite: Tweak lseek03 after addition of SEEK_HOLEJon Turney
After addition of SEEK_HOLE, the whence of *4* is not an invalid argument, causing the test to FAIL. See ltp commit 423e636a4c8f ("lseek03: change to fix with the lseek syscall")
2023-08-11Cygwin: testsuite: Add a small delay in kill01Jon Turney
Avoid transient failures by adding a small delay after fork()-ing to allow the child to get into a state where it can recieve signals. Also add same small delay to kill03 and kill04. kill02 has a more elaborate setup where child processes write to a pipe to indicate they have started.
2023-08-10Add wildcard support to recurse into sys include directoriesAlexey Lapshin
2023-08-09Cygwin: fhandler_base::lseek: fix formattingCorinna Vinschen
Fixes: edfa581d3c5a ("Cygwin: lseek: implement SEEK_DATA and SEEK_HOLE for files") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09Cygwin: add SEEK_DATA/SEEK_HOLE addition to release messageCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09Cygwin: lseek: implement SEEK_DATA and SEEK_HOLE for filesCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09Cygwin: lseek: propagate new SEEK_DATA and SEEK_HOLE to fhandlerCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09Cygwin: clipboard: Only SEEK_SET and SEEK_CUR are supportedCorinna Vinschen
Make sure of that, especially given the addition of SEEK_DATA and SEEK_HOLE. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09sys/unistd.h: define GNU extensions SEEK_DATA and SEEK_HOLECorinna Vinschen
SEEK_DATA and SEEK_HOLE are GNU nonstandard extensions also present in Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the next POSIX revision (Issue 8). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09Add stub for getentropyTorbjörn SVENSSON
Example test case that fails with undefined reference to getentropy: Testing g++.robertl/eb77.C, -std=c++20 doing compile Executing on host: /build/gcc-13-2709-g9ac9fde961f/bin/arm-none-eabi-g++ /build/src/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C -mthumb -march=armv6s-m -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -fmessage-length=0 -std=c++20 -pedantic-errors -Wno-long-long -Wl,--start-group -lc -lm -Wl,--end-group --specs=nosys.specs -Wl,--allow-multiple-definition -Wl,-u,_isatty,-u,_fstat -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -Wl,g++_tg.o -lm -o ./eb77.exe (timeout = 800) spawn -ignore SIGHUP /build/gcc-13-2709-g9ac9fde961f/bin/arm-none-eabi-g++ /build/src/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C -mthumb -march=armv6s-m -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -fmessage-length=0 -std=c++20 -pedantic-errors -Wno-long-long -Wl,--start-group -lc -lm -Wl,--end-group --specs=nosys.specs -Wl,--allow-multiple-definition -Wl,-u,_isatty,-u,_fstat -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -Wl,g++_tg.o -lm -o ./eb77.exe pid is 28414 -28414 /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::(anonymous namespace)::__libc_getentropy(void*)': (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::random_device::_M_init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc.a(libc_a-arc4random.o): in function `_rs_stir': (.text._rs_stir+0x8): undefined reference to `getentropy' collect2: error: ld returned 1 exit status pid is -1 close result is 28414 exp6 0 1 output is /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::(anonymous namespace)::__libc_getentropy(void*)': (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::random_device::_M_init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc.a(libc_a-arc4random.o): in function `_rs_stir': (.text._rs_stir+0x8): undefined reference to `getentropy' collect2: error: ld returned 1 exit status status 1 compiler exited with status 1 FAIL: g++.old-deja/g++.robertl/eb77.C -std=c++20 (test for excess errors) Excess errors: (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined reference to `getentropy' (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' (.text._rs_stir+0x8): undefined reference to `getentropy' UNRESOLVED: g++.old-deja/g++.robertl/eb77.C -std=c++20 compilation failed to produce executable Contributed by STMicroelectronics Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2023-08-08Cygwin: CI: XFAIL umask03Jon Turney
umask03 fails in CI due to some not understood weirdness.
2023-08-08Cygwin: testsuite: Fix cygload testJon Turney
Use cygrun to isolate the cygload test from the current DLL, which allows it to pass.
2023-08-08Cygwin: testsuite: Update READMEJon Turney
v2: Polish instructions on adding a test Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-08-08Cygwin: testsuite: Add '-notimeout' option to cygrunJon Turney
Add '-notimeout' option for cygrun. This is very useful when using it to run a test standalone and under a debugger. Also: warn about excess arguments