From: Jarkko Hietaniemi Date: Tue, 13 Apr 1999 10:21:33 +0000 (+0000) Subject: Croak if no known ways to semctl() (don't assume union semun). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39398f3f0ecd7e1d0d9f68b83052e76ea7150b75;p=p5sagit%2Fp5-mst-13.2.git Croak if no known ways to semctl() (don't assume union semun). p4raw-id: //depot/cfgperl@3256 --- diff --git a/doio.c b/doio.c index c0667ef..664bd15 100644 --- a/doio.c +++ b/doio.c @@ -1499,6 +1499,7 @@ do_ipcctl(I32 optype, SV **mark, SV **sp) #endif #ifdef HAS_SEM case OP_SEMCTL: +#ifdef Semctl if (cmd == IPC_STAT || cmd == IPC_SET) infosize = sizeof(struct semid_ds); else if (cmd == GETALL || cmd == SETALL) @@ -1514,6 +1515,9 @@ do_ipcctl(I32 optype, SV **mark, SV **sp) /* "short" is technically wrong but much more portable than guessing about u_?short(_t)? */ } +#else + croak("%s not implemented", PL_op_desc[optype]); +#endif break; #endif #if !defined(HAS_MSG) || !defined(HAS_SEM) || !defined(HAS_SHM) @@ -1555,10 +1559,14 @@ do_ipcctl(I32 optype, SV **mark, SV **sp) #endif #ifdef HAS_SEM case OP_SEMCTL: { +#ifdef Semctl union semun unsemds; unsemds.buf = (struct semid_ds *)a; ret = Semctl(id, n, cmd, unsemds); +#else + croak("%s not implemented", PL_op_desc[optype]); +#endif } break; #endif diff --git a/perl.h b/perl.h index 3b608f8..8f5082c 100644 --- a/perl.h +++ b/perl.h @@ -2762,9 +2762,6 @@ typedef struct am_table_short AMTS; # 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 /* Mention