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

Remove BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES check

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial - P5 Trivial - P5
    • 1.12.0
    • None
    • Build, libbson

    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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: