aboutsummaryrefslogtreecommitdiff
path: root/winsup
AgeCommit message (Collapse)AuthorFilesLines
2023-07-31Cygwin: belatedly bump CYGWIN_VERSION_API_MINOR for new posix_spawn funcsCorinna Vinschen1-1/+3
Commit c743751aafa84 ("Cygwin: Export posix_spawn_file_actions_add{f}chdir_np") added two new functions but we forgot to bump the API version. Catch up. Fixes: c743751aafa84 ("Cygwin: Export posix_spawn_file_actions_add{f}chdir_np") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-27Cygwin: fnmatch: fix range comparison in C localeCorinna Vinschen1-1/+1
Commit c36064bbd0c5 introduced operating on character pointers instead of operating on characters, to allow collating symbols. This patch neglected to change the expression for range comparison in case we're in the C locale. Thus it suddenly compared pointers instead of characters. Fix that. Fixes: c36064bbd0c5 ("Cygwin: fnmatch: support collating symbols in [. .] brackets") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-26Rename _NL_CTYPE_OUTDIGITSx_MB/WC to _NL_CTYPE_OUTDIGITx_MB/WCCorinna Vinschen2-20/+24
The extended _NL_foo names were originally designed after their GLibc counterparts. However, the OUTDIGIT macros were accidentally defined as OUTDIGITS, plural. Fix them. Fixes: d47d5b850bed ("Extend locale support to maintain wide char values of native strings") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-26Cygwin: add AT_EMPTY_PATH fix to release messageCorinna Vinschen1-0/+4
Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-26Cygwin: Fix and streamline AT_EMPTY_PATH handlingCorinna Vinschen1-36/+11
The GLIBC extension AT_EMPTY_PATH allows the functions fchownat and fstatat to operate on dirfd alone, if the given pathname is an empty string. This also allows to operate on any file type, not only directories. Commit fa84aa4dd2fb4 broke this. It only allows dirfd to be a directory in calls to these two functions. Fix that by handling AT_EMPTY_PATH right in gen_full_path_at. A valid dirfd and an empty pathname is now a valid combination and, noticably, this returns a valid path in path_ret. That in turn allows to remove the additional path generation code from the callers. Fixes: fa84aa4dd2fb ("Cygwin: fix errno values set by readlinkat") Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de> Tested-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-26Cygwin: use new _AT_NULL_PATHNAME_ALLOWED flagCorinna Vinschen1-5/+4
Convert gen_full_path_at to take flag values from the caller, rather than just a bool indicating that empty paths are allowed. This is in preparation of a better AT_EMPTY_PATH handling in a followup patch. Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-26Cygwin: gen_full_path_at: drop never reached codeCorinna Vinschen1-5/+0
The check if the local variable p is NULL is useless. The preceeding code always sets p to a valid pointer, or it crashes if path_ret is invalid (which would be a bug in Cygwin). Fixes: c57b57e5c43a ("* cygwin.din: Sort.") Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-22Cygwin: testsuite: Drop using DejaGnu to run testsJon Turney9-148/+46
A more sophisticated (and modern) test harness would probably be useful, but switching to Automake's built-in test harness gets us parallel test execution, colourization of failures, simplifies matters, seems adequate for the current testuite, and means we don't need to write any icky Tcl. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-21Cygwin: get_posix_access: do not merge permissions for just created filesCorinna Vinschen1-1/+1
When creating the POSIX ACL rewrite, the code merging permissions from everyone/group to group/user ACEs was accidentally called for newly generated files as well. This could result in broken permissions, if umask used unusual values like "0100", granted permissions to everyone/group not granted to group/user. Make sure to skip permission merging if the file got just created and we only want to set correct permissions for the first time. Fixes: bc444e5aa4ca ("Reapply POSIX ACL changes.") Reported-by: Jon Turney <jon.turney@dronecode.org.uk> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-21Cygwin: Fix uninitialized use of fh in strace output in stat_worker()Jon Turney1-2/+3
Move strace output to fix uninitalized use of fh introduced in previous commit. ../../../../src/winsup/cygwin/syscalls.cc: In function ‘int stat_worker(path_conv&, stat*)’: ../../../../src/winsup/cygwin/syscalls.cc:1971:69: error: ‘fh’ may be used uninitialized [-Werror=maybe-uninitialized] Fixes: 42b44044b34d ("Cygwin: Fix Windows file handle leak in stat("file", -1)") Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-21Cygwin: Fix Windows file handle leak in stat("file", -1)Jon Turney1-3/+4
Don't leak a Windows file handle if stat() is called with a valid filename, but invalid stat buffer pointer. We do not destroy fh (which closes a Windows handle it has opened) if an exception happens in the __try block. Avoid this by re-ordering things so that we don't construct the fhandler object until after we've attempted to use the struct stat buffer. Fixes: 73151c54d581 ("syscalls.cc (stat_worker): Don't call build_fh_pc with invalid pc.") Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-21Cygwin: testsuite: Drop setting TDIRECTORYJon Turney3-15/+2
Drop setting TDIRECTORY, just use /tmp in the 'test installation' now that we have it. This effectively reverts f3ed5f2fe029d74372aca68b18936e164ff47cf7 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-18Cygwin: don't wait infinitely on a pthread cancel eventCorinna Vinschen1-6/+3
Starting with commit 42faed412857 ("* thread.h (class pthread): Add bool member canceled."), pthread::testcancel waits infinitely on cancel_event after it checked if the canceled variable is set. However, this might introduce a deadlock, if the thread calling pthread_cancel is terminated after setting canceled to true, but before calling SetEvent on cancel_event. In fact, it's not at all necessary to wait infinitely. By definition, the thread is only canceled if cancel_event is set. The canceled variable is just a helper to speed up code. We can safely assume that the thread hasn't been canceled yet, if canceled is set, but cancel_event isn't. Fixes: 42faed412857 ("* thread.h (class pthread): Add bool member canceled.") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-18Cygwin: testsuite: Make cancel3 and cancel5 more robustJon Turney2-4/+32
Despite our efforts, sometimes the async cancellation gets deferred. Notice this by calling pthread_testcancel(), and then try to work out if async cancellation was ever successful by checking if all threads ran for the full expected time, or if some were stopped early. Also, increase the time we allow for the async cancellation to get delivered to 30 seconds. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-18Cygwin: Restore signal handlers on thread cancellation during system()Jon Turney1-4/+15
Add back the restoration of signal handlers modified during system() on thread cancellation. Removed in 3cb9da14 which describes it as 'ill-conceived' (additional context doesn't appear to be available). We use the internal implementation helpers for the pthread cleanup chain, so we can neatly tuck it inside the object, and keep the point when we restore the signal handlers the same. (The pthread_cleanup_push/pop() functions are implemented as macros which must appear in the same lexical scope.) Fixes: 3cb9da14617c ("Put signals on hold and use system_call_cleanup class to set and restore signals rather than doing it prior to to running the program. Remove the ill-conceived pthread_cleanup stuff.") Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-18Cygwin: pthread: Take note of schedparam in pthread_createJon Turney1-0/+1
Take note of schedparam in any pthread_attr_t passed to pthread_create. postcreate() (racily, after the thread is actually created), sets the scheduling priority if it's inherited, but precreate() doesn't store any scheduling priority explicitly set via a non-default attr to pthread_create, so schedparam.sched_priority has the default value of 0. (I think this is another long-standing bug exposed by 4b51e4c1. Now we don't lie about the actual thread priority, it's apparent it's not really being set in this case.) Fixes testcase priority2. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Drop Adminstrator privileges while running testsJon Turney2-3/+4
Test access05 and symlink03 expect operations to fail which succeed when we have Adminstrator privileges. There's perhaps a bit of incoherency here: some XFAILed tests expect to run as root (so maybe we need the ability to selectively cygdrop?). Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Minor fixes to umask03Jon Turney1-8/+13
Change TCIDs to they match the filename Fix use of "%0" rather than "%o" Record failure on mismatched permissions, rather than immediately breaking See ltp commits fa31d55d, 923b23ff and b846e7bb https://github.com/linux-test-project/ltp/commit/fa31d55d3486830313bd044f7333697ce6124d22 https://github.com/linux-test-project/ltp/commit/923b23ff1fd1b77bd895949f9a6b4508c6485f33 https://github.com/linux-test-project/ltp/commit/b846e7bb9c1e6b00af25fdd28d88a5847fb0b052 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Fix a buffer overflow in symlink01Jon Turney1-1/+1
full_path needs to hold a overlong pathname of length PATH_MAX+1, plus a terminating null. See ltp commit 44d51c3f https://github.com/linux-test-project/ltp/commit/44d51c3f0670961149ba486a678cfc13b37cce2c Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Busy-wait in cancel3 and cancel5Jon Turney2-12/+36
These tests async thread cancellation of a thread that doesn't have any cancellation points. Unfortunately, since 2b165a45 the async cancellation silently fails when the thread is inside the kernel function Sleep(), so it just exits normally after 10 seconds. (See the commentary in pthread::cancel() in thread.cc, where it checks if the target thread is inside the kernel, and silently converts the cancellation into a deferred one) Work around this by busy-waiting rather than Sleep()ing for 10 seconds. This is still somewhat fragile: the async cancel could still fail, if it happens to occur while we're inside the kernel function that time() calls. v2: Do nothing more efficiently Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Fix for limited thread priority valuesJon Turney3-5/+62
Since commit 4b51e4c1, we return the actual thread priority, not what we originally stored in the thread attributes. Windows only supports 7 thread priority levels, which we map onto the 32 required by POSIX. So, only a subset of values will be returned exactly by by pthread_getschedparam() after pthread_setschedparam(). Adjust tests priority1, priority2 and inherit1 so they only check for round-tripping priority values which can be exactly represented. For CI, this needs to handle process priority class "below normal priority" as well. Also check that the range of priority values is at least 32, as required by POSIX. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Also check direct call in systemcallJon Turney1-1/+9
Check direct call to system(), as well as one in a subprocess. (This is a lot easier to debug when it's completely broken by the environment the test is running in) Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Just log result of second open of /dev/dspJon Turney1-14/+6
Do not rate successful second open of /dev/dsp as an error, just log the result. Based on this patch by Gerd Spalink: https://cygwin.com/pipermail/cygwin-patches/2004q3/004848.html Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Skip devdsp test when no audio devices presentJon Turney2-0/+18
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Remove const from writable string in fcntl07bJon Turney1-1/+1
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Add a simple timeout mechanismJon Turney1-2/+15
Astonishingly, we don't have this already, so tests which hang just stop the testsuite dead in it's tracks... Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-14Cygwin: testsuite: Setup test prereqs in 'installation' the tests run inJon Turney3-4/+28
Do some setup in the Cygwin 'installation' at testsuite/testinst/: * Ensure /tmp exists * Use BusyBox to provide executables needed by tests which use system() (sh, sleep, ls) This enables tests which use system(), or require /tmp to exist to pass. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-13Cygwin: Update release/3.4.8 for latest <sys/cpuset.h> commitMark Geisert1-0/+3
2023-07-10Cygwin: Make gcc-specific code in <sys/cpuset.h> compiler-agnosticMark Geisert1-4/+5
The current version of <sys/cpuset.h> cannot be compiled by Clang due to the use of builtin versions of malloc, free, and memset. Their presence here was a dubious optimization anyway, so their usage has been converted to standard library functions. The use of __builtin_popcountl remains because Clang implements it just like gcc does. If/when some other compiler (Rust? Go?) runs into this issue we can deal with specialized handling then. The "#include <sys/cdefs>" here to define __inline can be removed since both of the new includes sub-include it. Addresses: https://cygwin.com/pipermail/cygwin/2023-July/253927.html Fixes: 9cc910dd33a5 (Cygwin: Make <sys/cpuset.h> safe for c89 compilations) Signed-off-by: Mark Geisert <mark@maxrnd.com>
2023-07-08Cygwin: fstat(): Fix st_rdev returned by fstat() for /dev/tty.Takashi Yano5-9/+33
While st_rdev returned by fstat() for /dev/tty should be FH_TTY, the current cygwin1.dll returns FH_PTYS+minor or FH_CONS+minor. Similarly, fstat() does not return correct value for /dev/console, /dev/conout, /dev/conin or /dev/ptmx. This patch fixes the issue by: 1) Introduce dev_referred_via in fhandler_termios. 2) Add new argument, which has dev_t value referred by open(), for constructors of fhandler_pty_slave and fhandler_pty_master to set the value of dev_referred_via. 3) Set st_rdev using dev_referred_via in fhandler_termios::fstat() if it is available. Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-07-08Cygwin: stat(): Fix "Bad address" error on stat() for /dev/tty.Takashi Yano2-1/+13
As reported in https://cygwin.com/pipermail/cygwin/2023-June/253888.html, "Bad address" error occurs when stat() is called after the commit 3721a756b0d8 ("Cygwin: console: Make the console accessible from other terminals."). There are two problems in the current code. One is fhandler_console:: fstat() calls get_ttyp()->getsid(). However, fh_alloc() in dtable.cc omits to initialize the fhandler_console instance when stat() is called. Due to this, get_ttyp() returns NULL and access violation occurs. The other problem is fh_alloc() assigns fhandler_console even if the CTTY is not a console. So the first problem above occurs even if the CTTY is a pty. This patch fixes the issue by: 1) Call set_unit() to initialize _tc if the get_ttyp() returns NULL. 2) Assign fhandler_pty_slave for /dev/tty if CTTY is a pty in fh_alloc(). Fixes: 3721a756b0d8 ("Cygwin: console: Make the console accessible from other terminals."). Fixes: 23771fa1f7028 ("dtable.cc (fh_alloc): Make different decisions when generating fhandler for not-opened devices. Add kludge to deal with opening /dev/tty.") Reported-by: Bruce Jerrick <bmj001@gmail.com> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-07-04Cygwin: Fix latest release message being in the wrong release file.Corinna Vinschen2-3/+5
Fixes: 6422e76637d3 ("Cygwin: Make <sys/cpuset.h> safe for c89 compilations") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-04Cygwin: Make <sys/cpuset.h> safe for c89 compilationsMark Geisert2-22/+30
Four modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline" on code lines * Add "#include <sys/cdefs.h>" to make sure __inline is defined * Don't declare loop variables on for-loop init clauses Tested by first reproducing the reported issue with home-grown test programs by compiling with gcc option "-std=c89", then compiling again using the modified <sys/cpuset.h>. Other "-std=" options tested too. Addresses: https://cygwin.com/pipermail/cygwin-patches/2023q3/012308.html Fixes: 315e5fbd99ec ("Cygwin: Fix type mismatch on sys/cpuset.h") Signed-off-by: Mark Geisert <mark@maxrnd.com>
2023-06-27Cygwin: thread: Reset _my_tls.tid if it's pthread_null in init_mainthread().Takashi Yano1-1/+1
Currently, _my_tls.tid is set to pthread_null if pthread::self() is called before pthread::init_mainthread(). As a result, pthread:: init_mainthread() does not set _my_tls.tid appropriately. Due to this, pthread_join() fails in LDAP environment if the program is the first program which loads cygwin1.dll. https://cygwin.com/pipermail/cygwin/2023-June/253792.html With this patch, _my_tls.tid is re-initialized in pthread:: init_mainthread() if it is pthread_null. Reported-by: Mümin A. <muminaydin06@gmail.com> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-06-20fhandler/proc.cc: use wincap.has_user_shstkBrian Inglis1-4/+4
In test for AMD/Intel Control flow Enforcement Technology user mode shadow stack support replace Windows version tests with test of wincap member addition has_user_shstk with Windows version dependent value Fixes: 41fdb869f998 ("fhandler/proc.cc(format_proc_cpuinfo): Add Linux 6.3 cpuinfo") Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
2023-06-20wincap.cc: set wincap member has_user_shstk true for 2004+Brian Inglis1-0/+10
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
2023-06-20wincap.h: add wincap member has_user_shstkBrian Inglis1-0/+2
Indicate support of user mode hardware-enforced shadow stack Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
2023-06-16Cygwin: use new XATTR_{NAME,SIZE}_MAX instead of MAX_EA_{NAME,VALUE}_LENPhilippe Cerfon1-9/+11
Signed-off-by: Philippe Cerfon <philcerf@gmail.com>
2023-06-16Cygwin: export XATTR_{NAME,SIZE,LIST}_MAXPhilippe Cerfon1-0/+7
These are used for example by CPython. Signed-off-by: Philippe Cerfon <philcerf@gmail.com> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-06-06Do not rely on `getenv ("HOME")`'s path conversionJohannes Schindelin1-1/+7
In the very early code path where `dll_crt0_1 ()` calls `user_shared->initialize ()`, the Cygwin runtime calls `internal_pwsid ()` to initialize the user name in preparation for reading the `fstab` file. In case `db_home: env` is defined in `/etc/nsswitch.conf`, we need to look at the environment variable `HOME` and use it, if set. When all of this happens, though, the `pinfo_init ()` function has had no chance to run yet (and therefore, `environ_init ()`). At this stage, therefore, `getenv ()`'s `findenv_func ()` call still finds `getearly ()` and we get the _verbatim_ value of `HOME`. That is, the Windows form. But we need the "POSIX" form. To add insult to injury, later calls to `getpwuid (getuid ())` will receive a cached version of the home directory via `cygheap->pg.pwd_cache.win.find_user ()` thanks to the first `internal_pwsid ()` call caching the result via `add_user_from_cygserver ()`, read: we will never receive the converted `HOME` but always the Windows variant. So, contrary to the assumptions made in 27376c60a9 (Allow deriving the current user's home directory via the HOME variable, 2023-03-28), we cannot assume that `getenv ("HOME")` returned a "POSIX" path. This is a real problem. Even setting aside that common callers of `getpwuid ()` (such as OpenSSH) are unable to handle Windows paths in the `pw_dir` attribute, the Windows path never makes it back to the caller unscathed. The value returned from `fetch_home_env ()` is not actually used as-is. Instead, the `fetch_account_from_windows ()` method uses it to write a pseudo `/etc/passwd`-formatted line that is _then_ parsed via the `pwdgrp::parse_passwd ()` method which sees no problem with misinterpreting the colon after the drive letter as a field separator of that `/etc/passwd`-formatted line, and instead of a Windows path, we now have a mere drive letter. Let's detect when the `HOME` value is still in Windows format in `fetch_home_env ()`, and convert it in that case. For good measure, interpret this "Windows format" not only to include absolute paths with drive prefixes, but also UNC paths. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-06-06uinfo: special-case IIS APPPOOL accountsJohannes Schindelin1-9/+98
The account under which Azure Web Apps run is an IIS APPOOL account that is generated on the fly. These are special because the virtual machines on which thes Apps run are not domain-joined, yet the accounts are domain accounts. To support the use case where such a Web App needs to call `ssh` (e.g. to deploy from a Git repository that is accessible only via SSH), we do need OpenSSH's `getpwuid (getuid ())` invocation to work. But currently it does not. Concretely, `getuid ()` returns -1 for these accounts, and OpenSSH fails to find the correct home directory (_especially_ when that home directory was overridden via a `db_home: env` line in `/etc/nsswitch.conf`). This can be verified e.g. in a Kudu console (for details about Kudu consoles, see https://github.com/projectkudu/kudu/wiki/Kudu-console): the domain is `IIS APPPOOL`, the account name is the name of the Azure Web App, the SID starts with 'S-1-5-82-`, and `pwdgrp::fetch_account_from_windows()` runs into the code path where "[...] the domain returned by LookupAccountSid is not our machine name, and if our machine is no domain member, we lose. We have nobody to ask for the POSIX offset." Since these IIS APPPOOL accounts are relatively similar to AzureAD accounts in this scenario, let's imitate the latter to support also the former. Reported-by: David Ebbo <david.ebbo@gmail.com> Helped-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-06-02Cygwin: pty: Additional fix for transferring input at exit.Takashi Yano1-2/+8
The commit 9fc746d17dc3 does not fix transferring input at exit appropriately. If the more than one non-cygwin apps are executed simultaneously and one of them is terminated, the pty master failed to send input to the other non-cygwin apps. This patch fixes that. Fixes: 9fc746d17dc3 ("Cygwin: pty: Fix transferring type-ahead input between input pipes.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-06-01Cygwin: pty: Fix transferring type-ahead input between input pipes.Takashi Yano1-17/+3
After the commit e5fcc5837c95, transferring type-ahead input between the pipe for cygwin app and the pipe for non-cygwin app will not be done appropriately when the stdin of the non-cygwin app is not pty. Due to this issue, sometimes the keyboard input might be lost which should be sent to cygwin app. This patch fixes the issue. Fixes: e5fcc5837c95 ("Cygwin: pty: Fix reading CONIN$ when stdin is not a pty.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-05-24Cygwin: Adjust CWD magic to accommodate for the latest Windows previewsJohannes Schindelin1-3/+17
Reportedly Windows 11 build 25*** from Insider changed the current working directory logic a bit, and Cygwin's "magic" (or: "technologically sufficiently advanced") code needs to be adjusted accordingly. This fixes https://github.com/git-for-windows/git/issues/4429 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-05-12fhandler/proc.cc(format_proc_cpuinfo): Add Linux 6.3 cpuinfoBrian Inglis1-7/+22
cpuid 0x00000007:0 ecx:7 shstk Shadow Stack support & Windows [20]20H1/[20]2004+ => user_shstk User mode program Shadow Stack support AMD SVM 0x8000000a:0 edx:25 vnmi virtual Non-Maskable Interrrupts Sync AMD 0x80000008:0 ebx flags across two output locations
2023-05-01Cygwin: Fix compiling with w32api-headers v11.0.0Biswapriyo Nath1-0/+2
This solves redefinition of FILE_CS_FLAG_CASE_SENSITIVE_DIR in winnt.h and fixes the following compiler errors ntdll.h:523:3: error: expected identifier before numeric constant 523 | FILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x01 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ntdll.h:522:1: note: to match this ‘{’ 522 | { | ^
2023-05-01Cygwin: doc: Upate a link from gitweb to cgitJon Turney1-2/+2
Also, reword 'considerable patch' to be more idomatic.
2023-04-24Cygwin: locales: drop unused has_modifier macroCorinna Vinschen1-2/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-04-24Cygwin: locales: ignore @cjkwide and @cjksingle just like @cjknarrowCorinna Vinschen1-13/+21
When the @cjkwide and @cjksingle modifiers have been added, the patches missed to add checks for the new modifiers in the Cygwin locale code. Along the same lines, commit c3e7f7609e46 forgot to add a test for @cjksingle. Merge check for cjk* modifiers into a macro set andf use that throughout. Fix comments. Fixes: f92f048528e6f ("Locale modifier @cjkwide to adjust ambiguous-width in non-CJK locales") Fixes: c8204b106988f ("Locale modifier "@cjksingle" to enforce single-width CJK width.") Fixes: c3e7f7609e46 ("Cygwin: locales: fix behaviour for @cjk* and @euro locales") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-04-19Cygwin: posix_spawnp: don't fallback to shCorinna Vinschen2-2/+8
Per the discussion starting with https://cygwin.com/pipermail/cygwin/2023-April/253495.html stop falling back to sh if the file given to posix_spawnp is no executable. This is not necessarily the last word on it, given https://www.austingroupbugs.net/view.php?id=1674, but for now, opt for following the proposal in the Austin Group bug entry, as well as PASSing the GNULIB test-posix_spawnp-script test. Fixes: c7c1a1ca1b33 ("Add support for new posix_spawn function.") Fixes: 3fbfcd11fb09 ("Cygwin: posix_spawn: add Cygwin-specific code fixing process synchronisation") Reported-by: Bruno Haible <bruno@clisp.org> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>