Merge pull request #3931 from yglukhov/pthread-stuff

Fixed includes for pthread types
This commit is contained in:
Andreas Rumpf 2016-03-04 23:20:06 +01:00
commit 0ff56a6589

View file

@ -74,11 +74,14 @@ when defined(Windows):
else:
type
SysLock {.importc: "pthread_mutex_t", pure, final,
header: "<sys/types.h>".} = object
header: """#include <sys/types.h>
#include <pthread.h>""".} = object
SysLockAttr {.importc: "pthread_mutexattr_t", pure, final
header: "<sys/types.h>".} = object
header: """#include <sys/types.h>
#include <pthread.h>""".} = object
SysCond {.importc: "pthread_cond_t", pure, final,
header: "<sys/types.h>".} = object
header: """#include <sys/types.h>
#include <pthread.h>""".} = object
SysLockType = distinct cint
proc SysLockType_Reentrant: SysLockType =
@ -115,4 +118,3 @@ else:
proc deinitSysCond(cond: var SysCond) {.noSideEffect,
importc: "pthread_cond_destroy", header: "<pthread.h>".}