Skip to content

Commit 1ca350a

Browse files
committed
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.
1 parent 5dac066 commit 1ca350a

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

src/libbson/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ set (CPACK_PACKAGE_VERSION_MINOR ${BSON_MINOR_VERSION})
3636
include (CPack)
3737
TEST_BIG_ENDIAN (BSON_BIG_ENDIAN)
3838

39-
# These need proper checks like automake.
40-
set (BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES 0)
41-
4239
#librt needed on linux for clock_gettime
4340
find_library (RT_LIBRARY rt)
4441
if (RT_LIBRARY)

src/libbson/src/bson/bson-config.h.in

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@
4242
#endif
4343

4444

45-
/*
46-
* Define to 1 if your system requires {} around PTHREAD_ONCE_INIT.
47-
* This is typically just Solaris 8-10.
48-
*/
49-
#define BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES @BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES@
50-
#if BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES != 1
51-
# undef BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES
52-
#endif
53-
54-
5545
/*
5646
* Define to 1 if you have clock_gettime() available.
5747
*/

src/libbson/src/bson/bson-thread-private.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ BSON_BEGIN_DECLS
4646
#define bson_once pthread_once
4747
#define BSON_ONCE_FUN(n) void n (void)
4848
#define BSON_ONCE_RETURN return
49-
#ifdef BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES
50-
#define BSON_ONCE_INIT \
51-
{ \
52-
PTHREAD_ONCE_INIT \
53-
}
54-
#else
5549
#define BSON_ONCE_INIT PTHREAD_ONCE_INIT
56-
#endif
5750
#else
5851
#define bson_mutex_t CRITICAL_SECTION
5952
#define bson_mutex_init InitializeCriticalSection

0 commit comments

Comments
 (0)