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

Improve MinGW compatibility #49

Merged
merged 7 commits into from
Jun 28, 2024
Merged

Improve MinGW compatibility #49

merged 7 commits into from
Jun 28, 2024

Conversation

illwieckz
Copy link
Member

@illwieckz illwieckz commented Jun 25, 2024

  • Provide ready-to-use cmake toolchain file for MinGW,
  • Fix build on 32-bit MinGW,
  • Avoid a warning by not redefining Win32 functions on MinGW,
  • Use more Win32 code with MinGW.

- Do not redefine sprintf_s, vsnprintf_s, strlwr, strupr on MinGW,
  use them.
- Deduplicate vsnprintf_s and _vsnprintf_s.

> vsnprintf_s is identical to _vsnprintf_s and is included for conformance
> to the ANSI standard. _vnsprintf is retained for backward compatibility.
> -- https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l?view=msvc-170
Copy link
Member

@slipher slipher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the printf stuff should be 1 commit IMO. Making every line a separate commit seems excessive.

cmake/cross-toolchain-mingw32.cmake Show resolved Hide resolved
crnlib/crn_arealist.cpp Outdated Show resolved Hide resolved
crnlib/lzma_Types.h Show resolved Hide resolved
@illwieckz
Copy link
Member Author

All the printf stuff should be 1 commit IMO. Making every line a separate commit seems excessive.

Squashed.

@slipher
Copy link
Member

slipher commented Jun 28, 2024

LGTM

@illwieckz illwieckz merged commit b3ff8db into master Jun 28, 2024
3 checks passed
@illwieckz illwieckz deleted the illwieckz/mingw branch June 28, 2024 13:37
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.

2 participants