require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_MSG_H_)) {
    eval 'sub _SYS_MSG_H_ () {1;}' unless defined(&_SYS_MSG_H_);
    require 'sys/ipc.ph';
    eval 'sub MSG_NOERROR () {010000;}' unless defined(&MSG_NOERROR);
    if(defined(&_KERNEL)) {
    }
    if(defined(&_KERNEL)) {
	if(defined(&SYSVMSG)) {
	}
	unless(defined(&MSGSSZ)) {
	    eval 'sub MSGSSZ () {8;}' unless defined(&MSGSSZ);
	}
	unless(defined(&MSGSEG)) {
	    eval 'sub MSGSEG () {2048;}' unless defined(&MSGSEG);
	}
	undef(&MSGMAX) if defined(&MSGMAX);
	eval 'sub MSGMAX () {( &MSGSSZ* &MSGSEG);}' unless defined(&MSGMAX);
	unless(defined(&MSGMNB)) {
	    eval 'sub MSGMNB () {2048;}' unless defined(&MSGMNB);
	}
	unless(defined(&MSGMNI)) {
	    eval 'sub MSGMNI () {40;}' unless defined(&MSGMNI);
	}
	unless(defined(&MSGTQL)) {
	    eval 'sub MSGTQL () {40;}' unless defined(&MSGTQL);
	}
	eval 'sub MSQID {
	    my($ix,$ds) = @_;
    	    eval q((($ix) & 0xffff | ((($ds). ($msg_perm->{seq}) << 16) & 0xffff0000)));
	}' unless defined(&MSQID);
	eval 'sub MSQID_IX {
	    my($id) = @_;
    	    eval q((($id) & 0xffff));
	}' unless defined(&MSQID_IX);
	eval 'sub MSQID_SEQ {
	    my($id) = @_;
    	    eval q(((($id) >> 16) & 0xffff));
	}' unless defined(&MSQID_SEQ);
    }
    if(defined(&_KERNEL)) {
	eval 'sub MSG_LOCKED () {01000;}' unless defined(&MSG_LOCKED);
    }
    unless(defined(&_KERNEL)) {
	require 'sys/cdefs.ph';
    } else {
    }
}
1;
