と書いてある。#include#include #include #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) /* 共用体 semun の定義は <sys/sem.h> に含まれている */ #else /* X/OPEN に従うならば自分自身で以下のように定義しなければならない */ union semun { int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */ unsigned short int *array; /* array for GETALL, SETALL */ struct seminfo *__buf; /* buffer for IPC_INFO */ }; #endif int semctl (int semid, int semnum, int cmd, union semun arg)
と書いてある。/* The user should define a union like the following to use it for arguments for `semctl'. union semun { int val; <= value for SETVAL struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET unsigned short int *array; <= array for GETALL & SETALL struct seminfo *__buf; <= buffer for IPC_INFO }; Previous versions of this file used to define this union but this is incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether one must define the union or not. */ #define _SEM_SEMUN_UNDEFINED 1