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

Do not redefine _CRT_SECURE_NO_WARNINGS if it's defined #289

Merged
merged 1 commit into from
Apr 24, 2024

Commits on Apr 24, 2024

  1. Do not redefine _CRT_SECURE_NO_WARNINGS if it's defined

    Old test checked `defined(_WIN32) || defined(_WIN64)`, which is redundant. `_WIN32` is always defined for `_WIN64` builds as well (https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170&redirectedfrom=MSDN):
    ```
    _WIN32 Defined as 1 when the compilation target is 32-bit ARM, 64-bit ARM, x86, or x64. Otherwise, undefined
    ```
    
     `_CRT_SECURE_NO_WARNINGS` could be defined externally, this code would produce this warning:
    ```
    1>D:\abseil-cpp\absl\time\internal\cctz\src\time_zone_libc.cc(16,9): warning C4005: '_CRT_SECURE_NO_WARNINGS': macro redefinition
    ```
    The PR addresses the issue.
    pps83 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    f0201e9 View commit details
    Browse the repository at this point in the history