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

Define __STDC_xxx_MACROS config macros globally via build system

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b21
    • CPU:
      generic
    • OS:
      generic

      Description

      Hotspot uses a number of C99 macros whose existence is controlled by whether a corresponding feature macro is defined. Specifically

      - __STDC_CONSTANT_MACROS
      - __STDC_FORMAT_MACROS
      - __STDC_LIMIT_MACROS

      are "user-level" configuration macros for <inttypes.h> and <stdint.h> that are suggested by the C99 standard. [Note that I say "suggested" because they are only ever mentioned in footnotes, which are non-normative.]

      Presently these configuration macros are (conditionally) defined in Hotspot headers that use the controlled macros, before their inclusion of the relevant standard header. That's problematic, since it introduces possible header ordering problems.

      The only reliable way to address this is to globally define these configuration macros via the build system. We should do that, and remove the unreliable definitions presently in our source code.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kbarrett Kim Barrett
                Reporter:
                kbarrett Kim Barrett
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: