summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1998-05-24 19:13:21 +0300
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-05-28 17:42:21 +0000
commitf0784f6a4c3e45e13aac90c9b07dd4163084f9a4 (patch)
treef87fde59f27c8e84fce94e8b177fa8875818155d /perl.h
parentdd64f1c34f78dffc99057d229091d8331d2ddf2d (diff)
downloadperl-f0784f6a4c3e45e13aac90c9b07dd4163084f9a4.tar.gz
This change really is:
Subject: [PATCH] 5.004_65: the infamous semctl() Date: Sun, 24 May 1998 16:13:21 +0300 (EET DST) Change 1041 claimed to be this patch but was really: Subject: [PATCH] 5.004_65: t/op/ipc*.t Date: Sat, 16 May 1998 00:52:39 +0300 (EET DST) From: Jarkko Hietaniemi <jhi@iki.fi> p4raw-id: //depot/perl@1043
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index fc9606438a..8645c393fb 100644
--- a/perl.h
+++ b/perl.h
@@ -2090,6 +2090,26 @@ enum {
UNLOCK_SV_MUTEX; \
} while (0)
+#ifdef HAS_SEM
+# include <sys/ipc.h>
+# include <sys/sem.h>
+# ifndef HAS_UNION_SEMUN /* Provide the union semun. */
+ union semun {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ };
+# endif
+# ifdef USE_SEMCTL_SEMUN
+# define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun)
+# else
+# ifdef USE_SEMCTL_SEMID_DS
+# define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun.buf)
+# endif
+# endif
+# ifndef Semctl /* Place our bets on the semun horse. */
+# define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun)
+# endif
+#endif
#endif /* Include guard */
-