-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Winansi: Drop pre-Vista workaround #6109
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ | |
|
|
||
| #define DISABLE_SIGN_COMPARE_WARNINGS | ||
|
|
||
| /* To bump the minimum Windows version to Windows Vista */ | ||
| /* To bump the minimum Windows version to Windows 8.1 */ | ||
| #include "git-compat-util.h" | ||
|
|
||
| /* Tell gcc not to warn about the (nfd < 0) tests, below. */ | ||
|
|
@@ -41,7 +41,7 @@ | |
| #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ | ||
| # define WIN32_NATIVE | ||
| # if defined (_MSC_VER) && !defined(_WIN32_WINNT) | ||
| # define _WIN32_WINNT 0x0502 | ||
| # define _WIN32_WINNT 0x0603 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically, this is not ours to change, but I guess it could come back to bite us if we don't. So let's keep this change.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By "ours" do you mean Git for Windows or Git? Because it is a Git modification to the vendored code (git@56fb3dd), but I guess it makes sense to drop this all together, since git@e8dfcac made this obsolete.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean both Git and Git for Windows; Vendored-in code is harder to maintain if it is modified from the original version.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could upstream a commit to drop this definition alltogether, which would reduce the modifications to vendored code, but I doubt we'll see many updates to the vendored code.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
True. |
||
| # endif | ||
| # include <winsock2.h> | ||
| # include <windows.h> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,9 @@ int win32_fsync_no_flush(int fd) | |
| { | ||
| IO_STATUS_BLOCK io_status; | ||
|
|
||
| #ifndef FLUSH_FLAGS_FILE_DATA_ONLY | ||
| #define FLUSH_FLAGS_FILE_DATA_ONLY 1 | ||
| #endif | ||
|
Comment on lines
+9
to
+11
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could even drop this altogether, right? If we require a new-enough
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't sure if that is always the case and we can reasonably expect this, so I thought wrapping it in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me. |
||
|
|
||
| DECLARE_PROC_ADDR(ntdll.dll, NTSTATUS, NTAPI, NtFlushBuffersFileEx, | ||
| HANDLE FileHandle, ULONG Flags, PVOID Parameters, ULONG ParameterSize, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, this is not ours to change, it's
nedmalloc. We should probably upstream themimallocvendoring-in, and then dropcompat/nedmalloc/from upstream, too: It's woefully unsupported.As far as this PR is concerned, let's keep this change, it makes it simpler to verify that we haven't missed any
_WIN32_WINNTdefinition.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be great, but somehow I have my doubts about Junio loving the frequency of our mimalloc updates, the churn of our 4-commit update method or the (very useful) commit message of 266c6eb.
I think he might prefer something more like contrib/update-unicode/update_unicode.sh and the corresponding commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh. I can always try to upstream as-is 😁