require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_SIGTYPES_H_)) {
    eval 'sub _SYS_SIGTYPES_H_ () {1;}' unless defined(&_SYS_SIGTYPES_H_);
    require 'sys/featuretest.ph';
    require 'machine/int_types.ph';
    require 'machine/ansi.ph';
    if(defined(&_BSD_SIZE_T_)) {
	undef(&_BSD_SIZE_T_) if defined(&_BSD_SIZE_T_);
    }
    if(defined(&_POSIX_C_SOURCE) || defined(&_XOPEN_SOURCE) || defined(&_NETBSD_SOURCE)) {
	eval 'sub __sigmask {
	    my($n) = @_;
    	    eval q((1 << ((($n) - 1) & 31)));
	}' unless defined(&__sigmask);
	eval 'sub __sigword {
	    my($n) = @_;
    	    eval q(((($n) - 1) >> 5));
	}' unless defined(&__sigword);
	eval 'sub __sigaddset {
	    my($s, $n) = @_;
    	    eval q((($s)-> $__bits[ &__sigword($n)] |=  &__sigmask($n)));
	}' unless defined(&__sigaddset);
	eval 'sub __sigdelset {
	    my($s, $n) = @_;
    	    eval q((($s)-> $__bits[ &__sigword($n)] &= ~ &__sigmask($n)));
	}' unless defined(&__sigdelset);
	eval 'sub __sigismember {
	    my($s, $n) = @_;
    	    eval q(((($s)-> $__bits[ &__sigword($n)] &  &__sigmask($n)) != 0));
	}' unless defined(&__sigismember);
	eval 'sub __sigemptyset {
	    my($s) = @_;
    	    eval q((($s)-> $__bits[0] = 0x, ($s)-> $__bits[1] = 0x, ($s)-> $__bits[2] = 0x, ($s)-> $__bits[3] = 0x));
	}' unless defined(&__sigemptyset);
	eval 'sub __sigsetequal {
	    my($s1,$s2) = @_;
    	    eval q((($s1)-> $__bits[0] == ($s2)-> $__bits[0]  && ($s1)-> $__bits[1] == ($s2)-> $__bits[1]  && ($s1)-> $__bits[2] == ($s2)-> $__bits[2]  && ($s1)-> $__bits[3] == ($s2)-> $__bits[3]));
	}' unless defined(&__sigsetequal);
	eval 'sub __sigfillset {
	    my($s) = @_;
    	    eval q((($s)-> $__bits[0] = 0xffffffff, ($s)-> $__bits[1] = 0xffffffff, ($s)-> $__bits[2] = 0xffffffff, ($s)-> $__bits[3] = 0xffffffff));
	}' unless defined(&__sigfillset);
	eval 'sub __sigplusset {
	    my($s, $t) = @_;
    	    eval q( &do { ($t)-> $__bits[0] |= ($s)-> $__bits[0]; ($t)-> $__bits[1] |= ($s)-> $__bits[1]; ($t)-> $__bits[2] |= ($s)-> $__bits[2]; ($t)-> $__bits[3] |= ($s)-> $__bits[3]; }  &while ( 0));
	}' unless defined(&__sigplusset);
	eval 'sub __sigminusset {
	    my($s, $t) = @_;
    	    eval q( &do { ($t)-> $__bits[0] &= ~($s)-> $__bits[0]; ($t)-> $__bits[1] &= ~($s)-> $__bits[1]; ($t)-> $__bits[2] &= ~($s)-> $__bits[2]; ($t)-> $__bits[3] &= ~($s)-> $__bits[3]; }  &while ( 0));
	}' unless defined(&__sigminusset);
	eval 'sub __sigandset {
	    my($s, $t) = @_;
    	    eval q( &do { ($t)-> $__bits[0] &= ($s)-> $__bits[0]; ($t)-> $__bits[1] &= ($s)-> $__bits[1]; ($t)-> $__bits[2] &= ($s)-> $__bits[2]; ($t)-> $__bits[3] &= ($s)-> $__bits[3]; }  &while ( 0));
	}' unless defined(&__sigandset);
	if((defined(&_XOPEN_SOURCE)  && defined(&_XOPEN_SOURCE_EXTENDED)) || ((defined(&_XOPEN_SOURCE) ? &_XOPEN_SOURCE : undef) - 0) >= 500|| ((defined(&_POSIX_C_SOURCE) ? &_POSIX_C_SOURCE : undef) - 0) >= 200809 || defined(&_NETBSD_SOURCE)) {
	    if(defined(&_NETBSD_SOURCE)) {
	    }
	}
    }
}
1;
