summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-08 10:19:27 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-08 10:19:27 +0000
commit93af7a870f71dbbb13443b4087703de0221add17 (patch)
treee767c53d4d4f1783640e5410f94655e45b58b3d0 /doio.c
parentc116a00cf797ec2e6795338ee18b88d975e760c5 (diff)
parent2269e8ecc334a5a77bdb915666547431c0171402 (diff)
downloadperl-93af7a870f71dbbb13443b4087703de0221add17.tar.gz
Merge maint-5.004 branch (5.004_03) with mainline.
MANIFEST is out of sync. p4raw-id: //depot/perl@114
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/doio.c b/doio.c
index bb0ac470fb..54b6d56747 100644
--- a/doio.c
+++ b/doio.c
@@ -948,7 +948,7 @@ do_execfree()
}
}
-#ifndef OS2
+#if !defined(OS2) && !defined(WIN32)
bool
do_exec(cmd)
@@ -1039,7 +1039,7 @@ char *cmd;
return FALSE;
}
-#endif /* OS2 */
+#endif /* OS2 || WIN32 */
I32
apply(type,mark,sp)
@@ -1373,29 +1373,25 @@ SV **sp;
infosize = sizeof(struct semid_ds);
else if (cmd == GETALL || cmd == SETALL)
{
+ struct semid_ds semds;
#ifdef __linux__ /* XXX Need metaconfig test */
-/* linux uses :
- int semctl (int semid, int semnun, int cmd, union semun arg)
-
+/* linux (and Solaris2?) uses :
+ int semctl (int semid, int semnum, int cmd, union semun arg)
union semun {
int val;
struct semid_ds *buf;
ushort *array;
};
*/
- union semun semds;
- if (semctl(id, 0, IPC_STAT, semds) == -1)
+ union semun semun;
+ semun.buf = &semds;
+ if (semctl(id, 0, IPC_STAT, semun) == -1)
#else
- struct semid_ds semds;
if (semctl(id, 0, IPC_STAT, &semds) == -1)
#endif
return -1;
getinfo = (cmd == GETALL);
-#ifdef __linux__ /* XXX Need metaconfig test */
- infosize = semds.buf->sem_nsems * sizeof(short);
-#else
infosize = semds.sem_nsems * sizeof(short);
-#endif
/* "short" is technically wrong but much more portable
than guessing about u_?short(_t)? */
}