[CDRIVER-2694] Remove BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES check Created: 11/Jun/18  Updated: 28/Oct/23  Resolved: 18/Jul/18

Status: Closed
Project: C Driver
Component/s: Build, libbson
Affects Version/s: None
Fix Version/s: 1.12.0

Type: Improvement Priority: Trivial - P5
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CDRIVER-2695 Share threading config checks between... Closed

 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;



 Comments   
Comment by Githook User [ 18/Jul/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2694 remove solaris pthread_once_t code

Solaris 10 and older requires a special syntax for initializing a
pthread_once_t, but we dropped Solaris entirely in 1.8.0.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1ca350a2c4dff086566dc7d3d894ac765128d60d

Generated at Wed Feb 07 21:16:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.