Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some backports from 3.4 #61

Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented Nov 23, 2023

After merging git-for-windows/MSYS2-packages#136, I realized that we had not kept the v3.3 branch up to date. So I went through the range-diff between the v3.3 and the v3.4 patches and cherry-picked anything from the latter that struck me as needing to be backported to the former.

dscho and others added 8 commits November 23, 2023 15:08
As mentioned in
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
GitHub workflows should avoid using Actions that use Node.js 12 and
instead upgrade to versions of those Actions that use Node.js 16.

So let's do that.

Signed-off-by: Johannes Schindelin <[email protected]>
We only build once in CI, so dependency tracking isn't needed.
This saves 3-4 minutes in CI.
We just disabled the code that skips environment variables whose values
are empty.

However, this code was introduced a long time ago into Cygwin in
d6b1ac7 (* environ.cc (build_env): Don't put an empty environment
variable into the environment.  Optimize use of "len". * errno.cc
(ERROR_MORE_DATA): Translate to EMSGSIZE rather than EAGAIN.,
2006-09-07), seemingly without any complaints.

Meaning: There might very well be use cases out there where it makes
sense to skip empty-valued environment variables.

Therefore, it seems like a good idea to have a "knob" to turn it back
on. With this commit, we introduce such a knob: by setting
`noemptyenvvalues` the `MSYS` variable (or appending it if that variable
is already set), users can tell the MSYS2 runtime to behave just like in
the olden times.

Signed-off-by: Johannes Schindelin <[email protected]>
With this commit, you can call

	MSYS=noemptyenvvalues my-command

and it does what is expected: to pass no empty-valued environment
variables to `my-command`.

Signed-off-by: Johannes Schindelin <[email protected]>
When calling `cygpath -u C:/msys64/` in an MSYS2 setup that was
installed into `C:/msys64/`, the result should be `/`, not `//`.

Let's ensure that we do not append another trailing slash if the
converted path already ends in a slash.

This fixes msys2/msys2-runtime#112

Signed-off-by: Johannes Schindelin <[email protected]>
…nvironment variables to Windows form for native Win32 applications.

Don't memchr behind end, it+1
…nvironment variables to Windows form for native Win32 applications.

Don't memchr behind end, it2
@dscho dscho self-assigned this Nov 23, 2023
Biswa96 and others added 2 commits November 25, 2023 01:48
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 | {
      | ^

(cherry picked from commit 3bee682)
GCC 13 (and maybe 12, too), warn about pointers used after `free()`.

In `nlsfuncs.cc`, they are used on purpose, though, in
`rebase_locale_buf()`, to adjust pointers that were invalidated because
of a `realloc()` (not a `free()`, actually).

So let's shush GCC about those instances.

However, we must be careful only to do that with GCC >= 12 because older
versions would complain about an unknown warning...

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Nov 29, 2023

Whoopsie. I meant to merge this before git-for-windows/MSYS2-packages#138.

@dscho dscho merged commit 20d047b into git-for-windows:msys2-gfw-3.3-branch Nov 29, 2023
2 checks passed
@dscho dscho deleted the some-backports-from-3.4 branch November 29, 2023 07:37
@jeremyd2019
Copy link

This is something I have thought about for msys2/msys2-runtime. MSYS2 does still have https://packages.msys2.org/base/msys2-runtime-3.3. Would it make sense to do this "upstream" too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants