Skip to content

fix: set windows.h definitions on WIN32 instead of MSVC - #6534

Merged
pajlada merged 3 commits into
Chatterino:masterfrom
Nerixyz:fix/win32-lean-and-mean
Nov 1, 2025
Merged

pajlada merged 3 commits into
Chatterino:masterfrom
Nerixyz:fix/win32-lean-and-mean

Conversation

@Nerixyz

@Nerixyz Nerixyz commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

This PR moves -DNOMINMAX to be conditional on WIN32 instead of MSVC and adds -DWIN32_LEAN_AND_MEAN. The latter was always set when using PCH (through nonstd/expected.h).

We assumed that compiling on Windows implies MSVC, but that's not always the case, as you can use other compilers that aren't/don't simulate MSVC. Although this is unsupported/untested from our side, we can at least fix trivial errors like this.

Fixes #6533.

@Nerixyz Nerixyz mentioned this pull request Oct 9, 2025
4 tasks done
@pajlada
pajlada enabled auto-merge (squash) November 1, 2025 11:01
@pajlada
pajlada merged commit f7bb4c7 into Chatterino:master Nov 1, 2025
19 of 20 checks passed
Pietro228 pushed a commit to Stream-Ally/streamally-chatterino that referenced this pull request Dec 5, 2025
Pietro228 pushed a commit to Stream-Ally/streamally-chatterino that referenced this pull request Dec 5, 2025
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
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.

Possible def leak in headers using windows.h

2 participants