Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8199619

Building HotSpot on Windows should define NOMINMAX

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b10
    • CPU:
      generic
    • OS:
      windows
    • Verification:
      Verified

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: