if (!defined &_SYS_SEM_H_) {
    eval 'sub _SYS_SEM_H_ {1;}';
    require 'sys/ipc.ph';
    eval 'sub SEM_UNDO {010000;}';
    eval 'sub MAX_SOPS {5;}';
    eval 'sub GETNCNT {3;}';
    eval 'sub GETPID {4;}';
    eval 'sub GETVAL {5;}';
    eval 'sub GETALL {6;}';
    eval 'sub GETZCNT {7;}';
    eval 'sub SETVAL {8;}';
    eval 'sub SETALL {9;}';
    if (defined &KERNEL) {
	eval 'sub SEMVMX {32767;}';
	eval 'sub SEMAEM {16384;}';
	eval 'sub SEM_A {0200;}';
	eval 'sub SEM_R {0400;}';
	eval 'sub SEM_ALLOC {01000;}';
	eval 'sub SEM_DEST {02000;}';
	if (!defined &SEMMNI) {
	    eval 'sub SEMMNI {10;}';
	}
	if (!defined &SEMMNS) {
	    eval 'sub SEMMNS {60;}';
	}
	if (!defined &SEMUME) {
	    eval 'sub SEMUME {10;}';
	}
	if (!defined &SEMMNU) {
	    eval 'sub SEMMNU {30;}';
	}
	if (!defined &SEMMAP) {
	    eval 'sub SEMMAP {30;}';
	}
	if (!defined &SEMMSL) {
	    eval 'sub SEMMSL { &SEMMNS;}';
	}
	if (!defined &SEMOPM) {
	    eval 'sub SEMOPM {100;}';
	}
	eval 'sub SEMUSZ {($sizeof{\'struct sem_undo\'}+$sizeof{\'struct undo\'}* &SEMUME);}';
	eval 'sub SEMU {
	    local($ix) = @_;
	    eval "((( &semu)+$ix *  &SEMUSZ))";
	}';
    }
    if (!defined &KERNEL) {
	require 'sys/cdefs.ph';
    }
}
1;
