aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-12-16Cygwin: Update 3.4.3 release noteJon Turney1-0/+3
(cherry picked from commit 5366b3403c7008314ec45c1fff042d02df6be41e)
2022-12-16Revert "Cygwin: x86_64: add wmemset assembler entry point"Jon Turney1-8/+0
This reverts commit 188d5f6c9ad5cbbd6f0fcb9aaf15bc9870597910. (cherry picked from commit 98fa366cb68a0c297bbb4a64a2d86649709aeabb)
2022-12-14Cygwin: add release message for latest path handling patchCorinna Vinschen1-0/+6
5ba5e09b9d39 ("Cygwin: path handling: never substitute virtual drive with target path") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-14libgloss: bfin: switch to CPPASCOMPILE for .S->.oMike Frysinger2-16/+16
We're compiling .S files, so use CPPAS instead of CC to compile since the point of CPPAS is to preprocess+assemble .S files.
2022-12-13libc: arm: fix setjmp abi non-conformanceVictor L. Do Nascimento3-38/+46
As per the arm Procedure Call Standard for the Arm Architecture section 6.1.2 [1], VFP registers s16-s31 (d8-d15, q4-q7) must be preserved across subroutine calls. The current setjmp/longjmp implementations preserve only the core registers, with the jump buffer size too small to store the required co-processor registers. In accordance with the C Library ABI for the Arm Architecture section 6.11 [2], this patch sets _JBTYPE to long long adjusting _JBLEN to 20. It also emits vfp load/store instructions depending on architectural support, predicated at compile time on ACLE feature-test macros. [1] https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst [2] https://github.com/ARM-software/abi-aa/blob/main/clibabi32/clibabi32.rst
2022-12-13Cygwin: Makefile: build new-cygwin1.dll in a single stepCorinna Vinschen1-17/+2
The complicated build routine was only required because we needed the .cygheap section at the end of the file, and the debug sections broke this. Now that the cygheap is out of the way, we really don't have to do this anymore, and the build can just generate a DLL with integrated debug info. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-13Cygwin: Makefile: only regenerate cygwin_version.c if it changesCorinna Vinschen1-1/+9
Make sure to create a new cygwin_version.c if it either doesn't exist yet, or if it would be different from the former file. This avoids unnecessary DLL rebuilding. Fixes: 97eb64b909bc ("Cygwin: uname: generate default release string from git as well") Fixes: 4949a82cde98 ("Cygwin: uname: fix building in non-git source dir") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-13newlib: info: tweak iconv node to avoid collisionsMike Frysinger2-2/+2
We have "Iconv" and "iconv" nodes which generates Iconv.html and iconv.html files. On a case-insensitive filesystem, these collide. Rename the "Iconv" node to match the chapter name that it's already using to avoid the issue.
2022-12-12Cygwin: path handling: never substitute virtual drive with target pathCorinna Vinschen1-62/+87
Move the drive substitution code after the call to GetFinalPathNameByHandleW into a local function revert_virtual_drive and add code to handle non-remote virtual drives, i. e., those created with the subst command. (Try to) make sure that virtual drives are never treated like symlinks. Fixes: 19d59ce75d53 ("Cygwin: path_conv: Rework handling native symlinks as inner path components") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-11Cygwin: add 3.4.2 release notesCorinna Vinschen1-0/+5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-09Cygwin: pty: Use GetTickCount64() instead of GetTickCount().Takashi Yano3-7/+7
Suggested-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2022-12-09Cygwin: pipe: Fix performance degradation for non-cygwin pipe.Takashi Yano2-1/+18
https://cygwin.com/pipermail/cygwin/2022-December/252628.html After the commit 9e4d308cd592, the performance of read from non-cygwin pipe has been degraded. This is because select_sem mechanism does not work for non-cygwin pipe. This patch fixes the issue. Fixes: 9e4d308cd592 ("Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag for read pipe.") Reported-by: tryandbuy <tryandbuy@proton.me> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2022-12-09Cygwin: improve release text for FILE issueCorinna Vinschen1-1/+3
Add a note in terms of 3.4.0 compatibility. Suggested-by: Markus Mützel <markus.muetzel@gmx.de> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-08Cygwin: define FILE as struct __sFILE64, not as __sFILECorinna Vinschen2-7/+17
Until Cygwin 3.3.6, we define __LARGE64_FILES unconditionally, so we were using the type __sFILE64 even for 64 bit. That was lazy and wrong. so commit 2902b3a09e0a ("Cygwin: drop requirement to build newlib's stdio64") tried to fix that. Unfortunately this patch forgot to take the exposure of the typename __sFILE64 in userspace into account. This leads to trouble in C++ due to name mangling. Commit 0f376ae22036 tried to fix this by just renaming __sFILE to __sFILE64 by using a macro. While __sFILE and __sFILE64 are the same size, they are not exactly congruent. To avoid backward compatibility problems, make sure to define FILE as the real __sFILE64, and make sure that __sFILE is not defined at all on Cygwin. Fixes: 0f376ae22036 ("Cygwin: rename __sFILE to __sFILE64 for backward compatibility") Fixes: 2902b3a09e0a ("Cygwin: drop requirement to build newlib's stdio64") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-08Cygwin: add __sFILE64 fix to 3.4.1 release notesCorinna Vinschen1-0/+4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-08Cygwin: rename __sFILE to __sFILE64 for backward compatibilityCorinna Vinschen1-0/+6
Until Cygwin 3.3.6, we define __LARGE64_FILES unconditionally, so we were using the type __sFILE64 even for 64 bit. That was lazy and wrong. so commit 2902b3a09e0a ("Cygwin: drop requirement to build newlib's stdio64") tried to fix that. Unfortunately this patch forgot to take the exposure of the typename __sFILE64 in userspace into account. This leads to trouble in C++ due to name mangling. Fix this by redefining __sFILE to __sFILE64. The type name is very much internal, so it doesn't really matter, except for the fact that it needs to stay backward compatible so as not to break building against C++ libs built under older versions of Cygwin. Fixes: 2902b3a09e0a ("Cygwin: drop requirement to build newlib's stdio64") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-08Cygwin: drop unused local declaration of fopen64Corinna Vinschen1-1/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-07Cygwin: uname: fix building in non-git source dirCorinna Vinschen2-3/+14
commit 97eb64b909bc broke building outside of a git dir, because the git describe command would fail. Fix this by checking if we're in a git tree at all and just generate an empty string as version string. Use this in uname_x to generate a fallback version. Fixes: 97eb64b909bc ("Cygwin: uname: generate default release string from git as well" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-07Cygwin: uname: generate default release string from git as wellCorinna Vinschen2-15/+24
When building a release with cygport, we get uname version info from cygport, which in turn gets version info from `git describe'. During development, the release info for local builds was not that helpful yet. Fix that, by creating version info from `git describe' if CYGPORT_RELEASE_INFO isn't given. Make sure to always force rebuild of the version info to pick up source file changes as well as git actions. Rearrange code slightly to generate machine info first, release info after that. Use snprintf to generate release string safely. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-07Cygwin: add missing pragmaCorinna Vinschen1-0/+1
Add missing "#pragma GCC diagnostic push" to the pragma bracket guarding the srandom call. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-07libc: fix fropen/fwopen compile warningsAlexey Lapshin1-4/+2
This patch fixes warnings that appears when compiling: #define fwopen(__cookie,__fn) funopen(__cookie, (int (*)())0, __fn, (fpos_t (*)())0, (int (*)())0) Expands to: funopen(__null, (int (*)())0, &app_printf, (fpos_t (*)())0, (int (*)())0) argument of type "int (*)()" is incompatible with parameter of type "int (*)(void *__cookie, char *__buf, int __n)"C/C++(167) invalid conversion from 'fpos_t (*)()' {aka 'long int (*)()'} to 'fpos_t (*)(void*, fpos_t, int)' {aka 'long int (*)(void*, Discussion is here: https://github.com/espressif/arduino-esp32/issues/7407
2022-12-07Cygwin: link mcountFunc.o to libgmon.aCorinna Vinschen2-2/+13
Commit 188d5f6c9ad5 erroneously moved the mcountFunc.S file to the TARGET_FILES target, rather than keeping it in GMON_FILES. The result is that the __fentry__ entry point is now entirely undefined, so `gcc -pg' is broken. Create new target-specific GMON_TARGET_FILES and move mcountFunc.S into it. Add $(GMON_TARGET_FILES) to GMON_FILES. Fixes: 188d5f6c9ad5 ("Cygwin: x86_64: add wmemset assembler entry point") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-07Cygwin: Add 3.5.0 release fileCorinna Vinschen1-0/+5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: don't autoload some kernel32 functionsCorinna Vinschen1-6/+3
DiscardVirtualMemory, PrefetchVirtualMemory and GetSystemTimePreciseAsFileTime are available since Windows 8.1. Merge PseudoConsole functions into kernel32 function block. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop special handling for SID authority 18Corinna Vinschen1-12/+0
This was only required up to Windows 8. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: flock: drop checking for artificial console handlesCorinna Vinschen1-4/+2
They have been used up to Windows 7 only. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: fix a few comments mentioning Windows 7 or 8Corinna Vinschen5-11/+5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: simplify FAST_CWD accessCorinna Vinschen2-198/+42
Dropping Windows 7 and 8 also drops the need to handle three different FAST_CWD structures. Simplify code accordingly. While at it, use dynamic allocation of the FAST_CWD structure based on the length of the CWD path. This may help in future to enable working with systems and native apps with long paths enabled (Win 10 1607 and later), see https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincaps for Windows 7 and Windows 8Corinna Vinschen1-57/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::def_guard_pagesCorinna Vinschen3-14/+6
Only required for Windows 7. Define constant value DEFAULT_GUARD_PAGE_COUNT instead. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::mmap_storage_highCorinna Vinschen3-21/+2
Only required for Windows 7 and Windows 8. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::cons_need_small_input_record_bufCorinna Vinschen3-34/+9
Only required for Windows 7. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::has_broken_attach_consoleCorinna Vinschen5-82/+7
Only required for Windows 7. This in turn allows to drop the helper_pid and related methods from fhandler_pty_common. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::has_query_process_handle_infoCorinna Vinschen4-90/+1
Only required for Windows 7. This allows to remove fhandler_pipe::get_query_hdl_per_system(), too. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::has_broken_whoamiCorinna Vinschen2-14/+0
Unused for some time. Was only required for Windows 7 anyway. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::has_microsoft_accountsCorinna Vinschen3-15/+1
Only required for Windows 7. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::has_precise_system_timeCorinna Vinschen4-31/+5
Only required for Windows 7. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: drop wincap::needs_query_informationCorinna Vinschen3-22/+1
Only required for Windows 7 and 8. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04Cygwin: bump DLL version to 3.5.0cygwin-3.5.0-devCorinna Vinschen1-1/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-03Cygwin: add release message for commit previous commit 8d138c3f66c2cygwin-3.4.0Corinna Vinschen1-0/+3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-03Cygwin: fix LC_CTYPE in global locale to be a real C.UTF-8 localeCorinna Vinschen3-1/+21
https://cygwin.com/pipermail/cygwin/2022-December/252571.html Cygwin's default locale is "C.UTF-8" as far as LC_CTYPE settings are concerned. However, while __global_locale contains fixed mbtowc and wctomb pointers, the lc_ctype_T pointer is still pointing to _C_ctype_locale, representing the standard "C" locale. The problem with this is that the codeset name as well as MB_CUR_MAX is wrong. Fix this by introducing a new lc_ctype_T structure called _C_utf8_ctype_locale, setting the default codeset to "UTF-8" and MB_CUR_MAX to 6. Use this as lc_ctype_T pointer in __global_locale by default on Cygwin. Fixes: a6a477fa8190 ("POSIX-1.2008 per-thread locales, groundwork part 1") Co-Authored-By: Takashi Yano <takashi.yano@nifty.ne.jp> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-03Cygwin: add latest primary group changes to release notesCorinna Vinschen1-0/+9
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: FAQ: convert ulinks to FAQ to xrefsCorinna Vinschen4-19/+17
Using ulinks here makes the result work on cygwin.com only, while xrefs to FAQs are creating realtive links. Add xreflabel where appropriate. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: FAQ: describe test releases, deprecate developer snapshotsCorinna Vinschen3-63/+53
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: uinfo: don't special case current userCorinna Vinschen1-18/+6
fetch_account_from_windows shortcuts the current user in that it takes the user's domain SID and just adds the matching RID from the token's primary group to create a group SID. How wrong this is can be very simply reproduced: Assuming you run a native process, like cmd, with primary group set to the Administrators builtin group. Run Cygwin's id(1) as child process. id(1) will print a non-existent group as primary group and also add it to the group list. This can only be avoided by not special casing the current user and thus not creating a group SID from partial information. Fixes: 6cc7c925ce86 ("(pwdgrp::fetch_account_from_windows): Default primary group for the current user to primary group from user token.") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: uinfo: prefer token primary groupCorinna Vinschen1-4/+13
internal_getlogin overwrites the process token primary group if it differs from the primary group as stored in the passwd DB. However, this also overwrites the primary group of the process if it has been deliberately changed by a former process (e. g., newgrp), and the current process has a non-Cygwin process as parent. Our docs claim we restrict overwriting the primary group to local, non-domain user accounts anyway, and it was actually meant this way. So check for exactly that before overwriting the primary group in the token: It's only allowed if the user is a local account and the primary group in the token is still the default group "None". Fixes: 6cc7c925ce861 ("(internal_getlogin): Give primary group from user token more weight.") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: uinfo: Drop long disabled nss_prefix and nss_separatorCorinna Vinschen4-229/+14
Originally the code was written to allow three ways of prefixing accounts and to freely define a domain/account separator. This code has been disabled even before being officially released, and it was never re-enabled. Given there has been no complaints for eight years now, drop this code eventually. Just add a macro to define the domain/account separator statically. Fixes: cc332c9e271b ("(cygheap_pwdgrp::nss_init_line): Disable db_prefix and db_separator settings. Add comment") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-01Cygwin: exec: don't access cygheap before it's initializedCorinna Vinschen1-1/+2
This is a long-standing thinko. When you exec a process, dll_crt0_0 in the child process calls child_info_spawn::handle_spawn(). handle_spawn() initialises the cygheap. Now consider calling strace. Strace is a non-Cygwin process dynamically loading cygwin1.dll via LoadLibrary. This in turn initializes the DLL: - dll_crt0_0 finds that the process it attaches to has been exec'd, so child_info_spawn::handle_spawn() is called. - If the DLL is being dynamically loaded, handle_spawn() calls child_info_spawn::get_parent_handle(). This in turn tries to set the moreinfo->myself_pinfo value inside the cygheap to NULL. - However, at this time, the cygheap has not yet been initialized. This only occurs in the cygheap_fixup_in_child() call after get_parent_handle() returns. --> SEGV This thinko never had a negative side effect, because the cygheap was pre-allocated at DLL load time until commit 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL"). With 2f9b8ff00cce, the cygheap actually doesn't exist until after the call to cygheap_fixup_in_child(). Fix this problem by moving the assignment after the call to cygheap_fixup_in_child(). Fixes: 3de7be4c1deb ("* DevNotes: Add entry cgf-000007. [...]") Fixes: 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-01Cygwin: multiple_cygwin_problem: drop obsolete check for "cygheap"Corinna Vinschen1-1/+1
After decoupling cygheap from the DLL loading address, the check for a different _cygheap_start has gone. So the matching string check in multiple_cygwin_problem is obsolete now. Fixes: 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-11-29Cygwin: serial: Fix a copy-paste error in DTR setupCarlo Bramini1-2/+2
In commit 2dab880c963ce0204c3513d664f610b587a3e6a6 I did a mistake when I copied the new fhandler_serial::switch_modem_lines() from my modified 3.3.6 branch to the current master and I left a copy paste error. This patch fixes that error. Fixes: 2dab880c963c ("Cygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sys")