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

Detect word size for Windows properly #123

Closed
wants to merge 1 commit into from
Closed

Detect word size for Windows properly #123

wants to merge 1 commit into from

Commits on Nov 14, 2023

  1. Detect word size for Windows properly

    In Windows SDK the _INTEGRAL_MAX_BITS is always 64 even when building for
    x86_32 targets, also _INTEGRAL_MAX_BITS means the max bits of integer, which
    does not necessarily equal to the word size, so it should be used at all.
    
    According to MSDN:
    _WIN32 Defined as 1 when the compilation target is 32-bit ARM, 64-bit ARM, x86,
    or x64. Otherwise, undefined.
    _WIN64 Defined as 1 when the compilation target is 64-bit ARM or x64. Otherwise,
    undefined.
    So we can use them as a more reliable way for word size on Windows.
    zcbenz committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    9e928b3 View commit details
    Browse the repository at this point in the history