Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8115

Define macros only when necessary in cpp files

    XMLWordPrintable

Details

    • Technical Debt
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • WT10.0.1, 5.0.4, 4.4.10, 5.1.0-rc0
    • None
    • None
    • 2
    • Storage - Ra 2021-10-18

    Description

      In workgen and the cpp testing framework, we define the following macros:

      #define __STDC_LIMIT_MACROS  // needed to get UINT64_MAX in C++
      #define __STDC_FORMAT_MACROS // needed to get PRIuXX macros in C++ 

      They are required for older gcc versions. We should probably define them only if they are not already defined, i.e:

      #ifndef __STDC_LIMIT_MACROS
      #define __STDC_LIMIT_MACROS
      #endif
      #ifndef __STDC_FORMAT_MACROS
      #define __STDC_FORMAT_MACROS
      #endif 

      Definition of done:

      Check the cpp files compile using aws-perf from Jenkins.

      Attachments

        Activity

          People

            etienne.petrel@mongodb.com Etienne Petrel
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: