require '_h2ph_pre.ph';

unless(defined(&_SYS_PIPE_H_)) {
    eval 'sub _SYS_PIPE_H_ () {1;}' unless defined(&_SYS_PIPE_H_);
    unless(defined(&OLD_PIPE)) {
	unless(defined(&_KERNEL)) {
	    require 'sys/time.ph';
	    require 'sys/select.ph';
	    require 'vm/vm.ph';
	    require 'machine/param.ph';
	}
	if(defined(&_KERNEL)) {
	    if(defined( &__NetBSD__) || defined( &__OpenBSD__)) {
		eval 'sub PIPE_NODIRECT () {1;}' unless defined(&PIPE_NODIRECT);
	    }
	}
	unless(defined(&PIPE_SIZE)) {
	    eval 'sub PIPE_SIZE () {16384;}' unless defined(&PIPE_SIZE);
	}
	unless(defined(&BIG_PIPE_SIZE)) {
	    eval 'sub BIG_PIPE_SIZE () {(64*1024);}' unless defined(&BIG_PIPE_SIZE);
	}
	unless(defined(&PIPE_MINDIRECT)) {
	    eval 'sub PIPE_MINDIRECT () {8192;}' unless defined(&PIPE_MINDIRECT);
	}
	if(defined( &__FreeBSD__)) {
	    eval 'sub PIPENPAGES () {( &BIG_PIPE_SIZE /  &PAGE_SIZE + 1);}' unless defined(&PIPENPAGES);
	} else {
	    eval 'sub PIPENPAGES () {( &BIG_PIPE_SIZE /  &NBPG + 1);}' unless defined(&PIPENPAGES);
	}
	unless(defined(&PIPE_NODIRECT)) {
	}
	eval 'sub PIPE_ASYNC () {0x004;}' unless defined(&PIPE_ASYNC);
	eval 'sub PIPE_WANTR () {0x008;}' unless defined(&PIPE_WANTR);
	eval 'sub PIPE_WANTW () {0x010;}' unless defined(&PIPE_WANTW);
	eval 'sub PIPE_WANT () {0x020;}' unless defined(&PIPE_WANT);
	eval 'sub PIPE_SEL () {0x040;}' unless defined(&PIPE_SEL);
	eval 'sub PIPE_EOF () {0x080;}' unless defined(&PIPE_EOF);
	eval 'sub PIPE_LOCK () {0x100;}' unless defined(&PIPE_LOCK);
	eval 'sub PIPE_LWANT () {0x200;}' unless defined(&PIPE_LWANT);
	eval 'sub PIPE_DIRECTW () {0x400;}' unless defined(&PIPE_DIRECTW);
	eval 'sub PIPE_DIRECTOK () {0x800;}' unless defined(&PIPE_DIRECTOK);
	unless(defined(&PIPE_NODIRECT)) {
	}
	if(defined(&_KERNEL)) {
	}
    }
}
1;
