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

Building HotSpot on Windows should define NOMINMAX

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 11
    • 11
    • 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.

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

              Created:
              Updated:
              Resolved: