Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2694

Remove BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES check

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 1.12.0
    • Affects Version/s: None
    • Component/s: Build, libbson

      We have a config check that is now always false:

      /*
       * Define to 1 if your system requires {} around PTHREAD_ONCE_INIT.
       * This is typically just Solaris 8-10.
       */
      #define BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES 0
      #if BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES != 1
      # undef BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES
      #endif
      

      Since we switched to CMake, BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES is always 0. Even before then, we had dropped Solaris, and all known platforms do not need braces in a statement like this one:

      pthread_once_t once = PTHREAD_ONCE_INIT;
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: