require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_COMMON_ANSI_H_)) {
    eval 'sub _SYS_COMMON_ANSI_H_ () {1;}' unless defined(&_SYS_COMMON_ANSI_H_);
    require 'sys/cdefs.ph';
    require 'machine/int_types.ph';
    if(!defined(&__PTRDIFF_TYPE__)) {
	die("__PTRDIFF_TYPE__\ not\ present");
    }
    if(!defined(&__SIZE_TYPE__)) {
	die("__SIZE_TYPE__\ not\ present");
    }
    if(!defined(&__WCHAR_TYPE__)) {
	die("__WCHAR_TYPE__\ not\ present");
    }
    if(!defined(&__WINT_TYPE__)) {
	die("__WINT_TYPE__\ not\ present");
    }
    eval 'sub _BSD_CLOCK_T_ () {\'unsigned int\';}' unless defined(&_BSD_CLOCK_T_);
    eval 'sub _BSD_PTRDIFF_T_ () { &__PTRDIFF_TYPE__;}' unless defined(&_BSD_PTRDIFF_T_);
    eval 'sub _BSD_SSIZE_T_ () { &__PTRDIFF_TYPE__;}' unless defined(&_BSD_SSIZE_T_);
    eval 'sub _BSD_SIZE_T_ () { &__SIZE_TYPE__;}' unless defined(&_BSD_SIZE_T_);
    eval 'sub _BSD_TIME_T_ () { &__int64_t;}' unless defined(&_BSD_TIME_T_);
    eval 'sub _BSD_CLOCKID_T_ () {\'int\';}' unless defined(&_BSD_CLOCKID_T_);
    eval 'sub _BSD_TIMER_T_ () {\'int\';}' unless defined(&_BSD_TIMER_T_);
    eval 'sub _BSD_SUSECONDS_T_ () {\'int\';}' unless defined(&_BSD_SUSECONDS_T_);
    eval 'sub _BSD_USECONDS_T_ () {\'unsigned int\';}' unless defined(&_BSD_USECONDS_T_);
    eval 'sub _BSD_WCHAR_T_ () { &__WCHAR_TYPE__;}' unless defined(&_BSD_WCHAR_T_);
    eval 'sub _BSD_WINT_T_ () { &__WINT_TYPE__;}' unless defined(&_BSD_WINT_T_);
}
1;
