summaryrefslogtreecommitdiff
path: root/rtl/freebsd
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-02-10 17:51:29 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-02-10 17:51:29 +0000
commit52d157da9b16c0cfa5bcdd03f56275dabf5148ee (patch)
tree681ef3060bd34a4e7ef2de5903a59d601e9c723d /rtl/freebsd
parent9cbf2d817e26a43eeb40778991f83e25f4e8ef06 (diff)
downloadfpc-52d157da9b16c0cfa5bcdd03f56275dabf5148ee.tar.gz
* fix for FreeBSD9 compatibility break where sem_t is no longer an opague pointer but a record.
Since it will only waste some stack space, one can the FreeBSD9 structure on all versions. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23589 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/freebsd')
-rw-r--r--rtl/freebsd/ptypes.inc21
1 files changed, 19 insertions, 2 deletions
diff --git a/rtl/freebsd/ptypes.inc b/rtl/freebsd/ptypes.inc
index 8bc19db1bf..dcd8d4b18f 100644
--- a/rtl/freebsd/ptypes.inc
+++ b/rtl/freebsd/ptypes.inc
@@ -22,6 +22,8 @@
{$I ctypes.inc}
{$packrecords c}
+const
+ SEM_SAFE=255;
type
dev_t = cuint32; { used for device numbers }
@@ -135,9 +137,24 @@ type
pthread_key_t = cint;
pthread_rwlock_t = ^pthread_rwlock_t_rec;
pthread_rwlockattr_t = ^pthread_rwlockattr_t_rec;
+
+ psem_t = ^sem_t;
+ ppsem_t= ^psem_t;
+ semid_t= pointer;
+ sem_t = record
+ magic : cuint32;
+ lock : pthread_mutex_t;
+ gtzero : pthread_cond_t;
+ count : cuint32;
+ nwaiters: cuint32;
+ semid : semid_t;
+ sysse : cint;
+ entry : psem_t;
+ backpointer : ppsem_t;
+ spare : array[0..SEM_SAFE] of char;
+
+ end;
- sem_t_rec = record end;
- sem_t = ^sem_t_rec;
rlim_t = int64;
TRlim = rlim_t;
{