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

Define __STDC_xxx_MACROS config macros globally via build system

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 9
    • infrastructure
    • None
    • b21
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: