Building HotSpot on Windows should define NOMINMAX

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 11
    • Affects Version/s: 11
    • Component/s: hotspot
    • b10
    • generic
    • windows
    • Verified

      We want to ensure the min and max macros provided by <windef.h> are suppressed. We've been doing that by #undef'ing those names in globalDefinitions.hpp. We've further been poisoning those macro names with "#define min min" and similarly for max, to ensure include ordering doesn't permit the windef.h macros from unexpectedly sneaking in anyway, expecting a clear compile-time error if they do.

      Because of JDK-8199356 we need to remove the macro poisoning. A better solution for the Windows-specific problem would be to remove the #undefs and use the specifically documented for this purpose NOMINMAX macro to suppress the windef.h definitions. That macro should be defined via the build system.

            Assignee:
            Robin Westberg (Inactive)
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: