require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_SHM_H_)) {
    eval 'sub _SYS_SHM_H_ () {1;}' unless defined(&_SYS_SHM_H_);
    require 'sys/cdefs.ph';
    unless(defined(&_SYS_IPC_H_)) {
	require 'sys/ipc.ph';
    }
    if((defined(&__BSD_VISIBLE) ? &__BSD_VISIBLE : 0)) {
	eval 'sub KERN_SHMINFO_SHMMAX () {1;}' unless defined(&KERN_SHMINFO_SHMMAX);
	eval 'sub KERN_SHMINFO_SHMMIN () {2;}' unless defined(&KERN_SHMINFO_SHMMIN);
	eval 'sub KERN_SHMINFO_SHMMNI () {3;}' unless defined(&KERN_SHMINFO_SHMMNI);
	eval 'sub KERN_SHMINFO_SHMSEG () {4;}' unless defined(&KERN_SHMINFO_SHMSEG);
	eval 'sub KERN_SHMINFO_SHMALL () {5;}' unless defined(&KERN_SHMINFO_SHMALL);
	eval 'sub KERN_SHMINFO_MAXID () {6;}' unless defined(&KERN_SHMINFO_MAXID);
	eval 'sub CTL_KERN_SHMINFO_NAMES () {{ { 0, 0}, { "shmmax",  &CTLTYPE_INT }, { "shmmin",  &CTLTYPE_INT }, { "shmmni",  &CTLTYPE_INT }, { "shmseg",  &CTLTYPE_INT }, { "shmall",  &CTLTYPE_INT }, };}' unless defined(&CTL_KERN_SHMINFO_NAMES);
	eval 'sub SHM_R () { &IPC_R;}' unless defined(&SHM_R);
	eval 'sub SHM_W () { &IPC_W;}' unless defined(&SHM_W);
    }
    eval 'sub SHM_RDONLY () {010000;}' unless defined(&SHM_RDONLY);
    eval 'sub SHM_RND () {020000;}' unless defined(&SHM_RND);
    eval 'sub SHM_LOCK () {3;}' unless defined(&SHM_LOCK);
    eval 'sub SHM_UNLOCK () {4;}' unless defined(&SHM_UNLOCK);
    if(defined( &_KERNEL) || defined( &_STANDALONE) || defined( &_LKM)) {
	eval 'sub SHMLBA () { &PAGE_SIZE;}' unless defined(&SHMLBA);
    } else {
	eval 'sub SHMLBA () {( &getpagesize());}' unless defined(&SHMLBA);
    }
    if(defined(&_KERNEL)) {
    }
    if((defined(&__BSD_VISIBLE) ? &__BSD_VISIBLE : 0)) {
    }
    if(defined(&_KERNEL)) {
    } else {
    }
}
1;
