require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NETATALK_AT_H_)) {
    eval 'sub _NETATALK_AT_H_ () {1;}' unless defined(&_NETATALK_AT_H_);
    require 'sys/ansi.ph';
    unless(defined(&sa_family_t)) {
	eval 'sub sa_family_t () { &__sa_family_t;}' unless defined(&sa_family_t);
    }
    eval 'sub ATPROTO_DDP () {0;}' unless defined(&ATPROTO_DDP);
    eval 'sub ATPROTO_AARP () {254;}' unless defined(&ATPROTO_AARP);
    eval 'sub DDP_MAXSZ () {587;}' unless defined(&DDP_MAXSZ);
    eval 'sub ATPORT_FIRST () {1;}' unless defined(&ATPORT_FIRST);
    eval 'sub ATPORT_RESERVED () {128;}' unless defined(&ATPORT_RESERVED);
    eval 'sub ATPORT_LAST () {255;}' unless defined(&ATPORT_LAST);
    eval 'sub ATADDR_ANYNET () {( &uint16_t)0x;}' unless defined(&ATADDR_ANYNET);
    eval 'sub ATADDR_ANYNODE () {( &uint8_t)0x;}' unless defined(&ATADDR_ANYNODE);
    eval 'sub ATADDR_ANYPORT () {( &uint8_t)0x;}' unless defined(&ATADDR_ANYPORT);
    eval 'sub ATADDR_BCAST () {( &uint8_t)0xff;}' unless defined(&ATADDR_BCAST);
    eval 'sub sat_zero () { ($sat_range->{r_zero});}' unless defined(&sat_zero);
    if(defined(&_KERNEL)) {
	require 'sys/protosw.ph';
    }
    if(defined(&_KERNEL) || defined(&_TEST)) {
	eval 'sub ATALK_ADDRSTRLEN () {10;}' unless defined(&ATALK_ADDRSTRLEN);
    }
}
1;
