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

Define macros only when necessary in cpp files

    • Type: Icon: Technical Debt Technical Debt
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.0.4, 4.4.10, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 2
    • Storage - Ra 2021-10-18

      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.

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

              Created:
              Updated:
              Resolved: