require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SIGNAL_H_)) {
    eval 'sub _SIGNAL_H_ () {1;}' unless defined(&_SIGNAL_H_);
    require 'sys/cdefs.ph';
    require 'sys/featuretest.ph';
    if(defined(&_POSIX_C_SOURCE) || defined(&_XOPEN_SOURCE) || defined(&_NETBSD_SOURCE)) {
	require 'sys/types.ph';
    }
    require 'sys/signal.ph';
    if(defined(&_NETBSD_SOURCE)) {
	unless(defined(&__SYS_SIGLIST_DECLARED)) {
	    eval 'sub __SYS_SIGLIST_DECLARED () {1;}' unless defined(&__SYS_SIGLIST_DECLARED);
	}
    }
    if(defined(&_NETBSD_SOURCE)) {
    }
    if(defined(&_POSIX_C_SOURCE) || defined(&_XOPEN_SOURCE) || defined(&_NETBSD_SOURCE)) {
	if(((defined(&_POSIX_C_SOURCE) ? &_POSIX_C_SOURCE : undef) - 0) >= 199506 || ((defined(&_XOPEN_SOURCE) ? &_XOPEN_SOURCE : undef) - 0) >= 500|| defined(&_NETBSD_SOURCE)) {
	    unless(defined(&__LIBPTHREAD_SOURCE__)) {
		eval 'sub pthread_sigmask () { &__libc_thr_sigsetmask;}' unless defined(&pthread_sigmask);
	    }
	}
	unless(defined(&__LIBC12_SOURCE__)) {
	    if(defined(&__c99inline) || defined(&__SIGSETOPS_BODY)) {
		if(defined(&__SIGSETOPS_BODY)) {
		    undef(&__c99inline) if defined(&__c99inline);
		    eval 'sub __c99inline () {1;}' unless defined(&__c99inline);
		}
		unless(defined(&__errno)) {
		}
		unless(defined(&___errno)) {
		    eval 'sub ___errno () {(* &__errno());}' unless defined(&___errno);
		}
	    }
	}
	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)) {
	    unless(defined(&__LIBC12_SOURCE__)) {
	    }
	}
	if(((defined(&_POSIX_C_SOURCE) ? &_POSIX_C_SOURCE : undef) - 0) >= 199309 || ((defined(&_XOPEN_SOURCE) ? &_XOPEN_SOURCE : undef) - 0) >= 500|| defined(&_NETBSD_SOURCE)) {
	    unless(defined(&__LIBC12_SOURCE__)) {
		require 'sys/timespec.ph';
	    }
	}
	if(defined(&_NETBSD_SOURCE)) {
	    unless(defined(&__PSIGNAL_DECLARED)) {
		eval 'sub __PSIGNAL_DECLARED () {1;}' unless defined(&__PSIGNAL_DECLARED);
	    }
	}
    }
}
1;
