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

Remove BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES check

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: build, libbson
    • Labels:

      Description

      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;
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: