// FIXME: temporary non-standard hack to ease transition
# define _MTX_INITIALIZER_NP {(void*)-1, -1, 0, 0, 0, 0}
# define ONCE_FLAG_INIT {0}
# define TSS_DTOR_ITERATIONS 1
#elif defined(HAVE_PTHREAD)
typedef pthread_cond_t cnd_t;
typedef pthread_t thrd_t;
typedef pthread_key_t tss_t;
typedef pthread_mutex_t mtx_t;
typedef pthread_once_t once_flag;
// FIXME: temporary non-standard hack to ease transition
# define _MTX_INITIALIZER_NP PTHREAD_MUTEX_INITIALIZER
# define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
# ifdef INIT_ONCE_STATIC_INIT
# define TSS_DTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS
# else
# define TSS_DTOR_ITERATIONS 1 // assume TSS dtor MAY be called at least once.
# endif
#else
# error Not supported on this platform.
#endif