require '_h2ph_pre.ph';

unless(defined(&_AGP_H)) {
    eval 'sub _AGP_H () {1;}' unless defined(&_AGP_H);
    eval 'sub AGPIOC_BASE () {ord(\'A\');}' unless defined(&AGPIOC_BASE);
    eval 'sub AGPIOC_INFO () { &_IOR ( &AGPIOC_BASE, 0,  &agp_info*);}' unless defined(&AGPIOC_INFO);
    eval 'sub AGPIOC_ACQUIRE () { &_IO ( &AGPIOC_BASE, 1);}' unless defined(&AGPIOC_ACQUIRE);
    eval 'sub AGPIOC_RELEASE () { &_IO ( &AGPIOC_BASE, 2);}' unless defined(&AGPIOC_RELEASE);
    eval 'sub AGPIOC_SETUP () { &_IOW ( &AGPIOC_BASE, 3,  &agp_setup*);}' unless defined(&AGPIOC_SETUP);
    eval 'sub AGPIOC_RESERVE () { &_IOW ( &AGPIOC_BASE, 4,  &agp_region*);}' unless defined(&AGPIOC_RESERVE);
    eval 'sub AGPIOC_PROTECT () { &_IOW ( &AGPIOC_BASE, 5,  &agp_region*);}' unless defined(&AGPIOC_PROTECT);
    eval 'sub AGPIOC_ALLOCATE () { &_IOWR( &AGPIOC_BASE, 6,  &agp_allocate*);}' unless defined(&AGPIOC_ALLOCATE);
    eval 'sub AGPIOC_DEALLOCATE () { &_IOW ( &AGPIOC_BASE, 7, \'int\');}' unless defined(&AGPIOC_DEALLOCATE);
    eval 'sub AGPIOC_BIND () { &_IOW ( &AGPIOC_BASE, 8,  &agp_bind*);}' unless defined(&AGPIOC_BIND);
    eval 'sub AGPIOC_UNBIND () { &_IOW ( &AGPIOC_BASE, 9,  &agp_unbind*);}' unless defined(&AGPIOC_UNBIND);
    eval 'sub AGP_DEVICE () {"/dev/agpgart";}' unless defined(&AGP_DEVICE);
    unless(defined(&TRUE)) {
	eval 'sub TRUE () {1;}' unless defined(&TRUE);
    }
    unless(defined(&FALSE)) {
	eval 'sub FALSE () {0;}' unless defined(&FALSE);
    }
    unless(defined(&__KERNEL__)) {
	require 'linux/types.ph';
	require 'asm/types.ph';
    } else {
	eval 'sub AGPGART_MINOR () {175;}' unless defined(&AGPGART_MINOR);
	eval 'sub AGP_UNLOCK () {
	    eval q( &up(( ($agp_fe->{agp_mutex}))););
	}' unless defined(&AGP_UNLOCK);
	eval 'sub AGP_LOCK () {
	    eval q( &down(( ($agp_fe->{agp_mutex}))););
	}' unless defined(&AGP_LOCK);
	eval 'sub AGP_LOCK_INIT () {
	    eval q( &sema_init(( ($agp_fe->{agp_mutex})), 1));
	}' unless defined(&AGP_LOCK_INIT);
	unless(defined(&_AGP_BACKEND_H)) {
	}
	eval 'sub AGP_FF_ALLOW_CLIENT () {0;}' unless defined(&AGP_FF_ALLOW_CLIENT);
	eval 'sub AGP_FF_ALLOW_CONTROLLER () {1;}' unless defined(&AGP_FF_ALLOW_CONTROLLER);
	eval 'sub AGP_FF_IS_CLIENT () {2;}' unless defined(&AGP_FF_IS_CLIENT);
	eval 'sub AGP_FF_IS_CONTROLLER () {3;}' unless defined(&AGP_FF_IS_CONTROLLER);
	eval 'sub AGP_FF_IS_VALID () {4;}' unless defined(&AGP_FF_IS_VALID);
    }
}
1;
