require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_SEM_H_)) {
    eval 'sub _SYS_SEM_H_ () {1;}' unless defined(&_SYS_SEM_H_);
    require 'sys/cdefs.ph';
    unless(defined(&_SYS_IPC_H_)) {
	require 'sys/ipc.ph';
    }
    require 'sys/queue.ph';
    if((defined(&__BSD_VISIBLE) ? &__BSD_VISIBLE : 0)) {
	eval 'sub KERN_SEMINFO_SEMMNI () {1;}' unless defined(&KERN_SEMINFO_SEMMNI);
	eval 'sub KERN_SEMINFO_SEMMNS () {2;}' unless defined(&KERN_SEMINFO_SEMMNS);
	eval 'sub KERN_SEMINFO_SEMMNU () {3;}' unless defined(&KERN_SEMINFO_SEMMNU);
	eval 'sub KERN_SEMINFO_SEMMSL () {4;}' unless defined(&KERN_SEMINFO_SEMMSL);
	eval 'sub KERN_SEMINFO_SEMOPM () {5;}' unless defined(&KERN_SEMINFO_SEMOPM);
	eval 'sub KERN_SEMINFO_SEMUME () {6;}' unless defined(&KERN_SEMINFO_SEMUME);
	eval 'sub KERN_SEMINFO_SEMUSZ () {7;}' unless defined(&KERN_SEMINFO_SEMUSZ);
	eval 'sub KERN_SEMINFO_SEMVMX () {8;}' unless defined(&KERN_SEMINFO_SEMVMX);
	eval 'sub KERN_SEMINFO_SEMAEM () {9;}' unless defined(&KERN_SEMINFO_SEMAEM);
	eval 'sub KERN_SEMINFO_MAXID () {10;}' unless defined(&KERN_SEMINFO_MAXID);
	eval 'sub CTL_KERN_SEMINFO_NAMES () {{ { 0, 0}, { "semmni",  &CTLTYPE_INT }, { "semmns",  &CTLTYPE_INT }, { "semmnu",  &CTLTYPE_INT }, { "semmsl",  &CTLTYPE_INT }, { "semopm",  &CTLTYPE_INT }, { "semume",  &CTLTYPE_INT }, { "semusz",  &CTLTYPE_INT }, { "semvmx",  &CTLTYPE_INT }, { "semaem",  &CTLTYPE_INT }, };}' unless defined(&CTL_KERN_SEMINFO_NAMES);
    }
    if(defined(&_KERNEL)) {
    }
    eval 'sub SEM_UNDO () {010000;}' unless defined(&SEM_UNDO);
    eval 'sub GETNCNT () {3;}' unless defined(&GETNCNT);
    eval 'sub GETPID () {4;}' unless defined(&GETPID);
    eval 'sub GETVAL () {5;}' unless defined(&GETVAL);
    eval 'sub GETALL () {6;}' unless defined(&GETALL);
    eval 'sub GETZCNT () {7;}' unless defined(&GETZCNT);
    eval 'sub SETVAL () {8;}' unless defined(&SETVAL);
    eval 'sub SETALL () {9;}' unless defined(&SETALL);
    eval 'sub SEM_A () {0200;}' unless defined(&SEM_A);
    eval 'sub SEM_R () {0400;}' unless defined(&SEM_R);
    if(defined(&_KERNEL)) {
	eval 'sub SEMVMX () {32767;}' unless defined(&SEMVMX);
	eval 'sub SEMAEM () {16384;}' unless defined(&SEMAEM);
	unless(defined(&SEMMNI)) {
	    eval 'sub SEMMNI () {10;}' unless defined(&SEMMNI);
	}
	unless(defined(&SEMMNS)) {
	    eval 'sub SEMMNS () {60;}' unless defined(&SEMMNS);
	}
	unless(defined(&SEMUME)) {
	    eval 'sub SEMUME () {10;}' unless defined(&SEMUME);
	}
	unless(defined(&SEMMNU)) {
	    eval 'sub SEMMNU () {30;}' unless defined(&SEMMNU);
	}
	unless(defined(&SEMMSL)) {
	    eval 'sub SEMMSL () { &SEMMNS;}' unless defined(&SEMMSL);
	}
	unless(defined(&SEMOPM)) {
	    eval 'sub SEMOPM () {100;}' unless defined(&SEMOPM);
	}
	eval 'sub SEMUSZ () {($sizeof{\'struct sem_undo\'}+$sizeof{\'struct undo\'}* &SEMUME);}' unless defined(&SEMUSZ);
    }
    unless(defined(&_KERNEL)) {
    } else {
    }
}
1;
