Change Windows.h to Linux-compatible windows.h - #17
Open
KojoBailey wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates a Windows header include to use lowercase windows.h to avoid case-sensitivity build failures on case-sensitive filesystems (e.g., Linux), and removes tracked JetBrains .idea/ project metadata from the repository.
Changes:
- Switch
#include <Windows.h>to#include <windows.h>inmem.h. - Remove multiple tracked
.idea/files (IDE project configuration). - Minor formatting normalization (final
#endifline numbering/position in diff).
Reviewed changes
Copilot reviewed 1 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libs/main_lib/src/util/mem.h | Changes Windows.h include to windows.h (case-sensitivity) and normalizes surrounding header lines. |
| .idea/vcs.xml | Removes tracked IDE VCS mapping config. |
| .idea/modules.xml | Removes tracked IDE modules config. |
| .idea/misc.xml | Removes tracked IDE misc/project settings. |
| .idea/JAPI_rewrite.iml | Removes tracked IDE module file. |
| .idea/editor.xml | Removes tracked IDE editor/inspection settings. |
| .idea/dictionaries/project.xml | Removes tracked IDE dictionary file. |
| .idea/copilot.data.migration.edit.xml | Removes tracked IDE Copilot migration state. |
| .idea/copilot.data.migration.ask2agent.xml | Removes tracked IDE Copilot migration state. |
| .idea/copilot.data.migration.ask.xml | Removes tracked IDE Copilot migration state. |
| .idea/copilot.data.migration.agent.xml | Removes tracked IDE Copilot migration state. |
| .idea/.name | Removes tracked IDE project name file. |
| .idea/.gitignore | Removes tracked IDE-local .gitignore file. |
Files not reviewed (12)
- .idea/.gitignore: Generated file
- .idea/.name: Generated file
- .idea/JAPI_rewrite.iml: Generated file
- .idea/copilot.data.migration.agent.xml: Generated file
- .idea/copilot.data.migration.ask.xml: Generated file
- .idea/copilot.data.migration.ask2agent.xml: Generated file
- .idea/copilot.data.migration.edit.xml: Generated file
- .idea/dictionaries/project.xml: Generated file
- .idea/editor.xml: Generated file
- .idea/misc.xml: Generated file
- .idea/modules.xml: Generated file
- .idea/vcs.xml: Generated file
Suppressed comments (4)
libs/main_lib/src/util/mem.h:15
mem.huses Windows-only APIs/types (e.g.,GetModuleHandle,PIMAGE_DOS_HEADER,PIMAGE_NT_HEADERS) but includes<windows.h>unconditionally. If this header is included/compiled for any non-Windows target, it will fail even after fixing header case; consider guarding the include and the Windows-specific helpers behind#if defined(_WIN32)and providing a stub or alternative implementation for other platforms.
This issue also appears in the following locations of the same file:
- line 8
- line 8
#include <cstdint>
#include <windows.h>
#include <stdint.h>
#include <stdlib.h>
#include <vector>
#include <stdio.h>
#define GAME_SCAN(sig) (uint64_t) PatternScan(GetModuleHandle(nullptr), sig)
libs/main_lib/src/util/mem.h:10
- The PR description implies fixing Linux case-sensitivity issues for
Windows.h, but there are still#include <Windows.h>occurrences elsewhere (e.g.,libs/main_lib/src/subsystems/kiero/kiero.cpp,external/toml/toml.hpp, and conditional paths inlibs/imgui/imgui.cpp). If the goal is to make Linux (or MinGW-on-Linux) builds succeed, those remaining includes will likely still break on case-sensitive filesystems; consider updating them in this PR or narrowing the description to justmem.h.
#include <cstdint>
#include <windows.h>
#include <stdint.h>
libs/main_lib/src/util/mem.h:14
- This header calls
strlen()but does not include a header that declares it (e.g.,<cstring>). Relying on transitive includes from<windows.h>is fragile and can break across compilers/SDKs.
#include <cstdint>
#include <windows.h>
#include <stdint.h>
#include <stdlib.h>
#include <vector>
#include <stdio.h>
.idea/modules.xml:1
- This PR removes a large set of
.idea/project files in addition to the<Windows.h>→<windows.h>include change. Since.idea/is already ignored in the repository.gitignore, these deletions look like unrelated cleanup; consider splitting them into a separate PR or updating the PR title/description to reflect the additional scope.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows is case-insensitive whereas Linux is case-sensitive, so
Windows.his not recognised on Linux whereaswindows.his recognised on both, so can just change#include <Windows.h>to#include <windows.h>