thread/Posix{Cond,Mutex}: don't ues PTHREAD_*_INITIALIZER on NetBSD

On NetBSD, PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER are
not compatible with C++11 "constexpr" (see Mantis ticket 0004110).  As
a workaround, don't ues "constexpr", and use the functions
pthread_mutex_init(), pthread_mutex_destroy(), pthread_cond_init() and
pthread_cond_destroy() instead.  This adds some runtime overhead, but
is portable to POSIX implementations that have awkward initializer
macros.
This commit is contained in:
Max Kellermann
2014-09-13 11:26:17 +02:00
parent ab7b38d4b9
commit e304d0f8ee
4 changed files with 30 additions and 1 deletions

1
NEWS
View File

@@ -1,4 +1,5 @@
ver 0.18.15 (not yet released)
* work around build failure on NetBSD
ver 0.18.14 (2014/09/11)
* protocol