require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_KSYMS_H_)) {
    eval 'sub _SYS_KSYMS_H_ () {1;}' unless defined(&_SYS_KSYMS_H_);
    if(!defined(&ELFSIZE)  && !defined(&_RUMPKERNEL)) {
	eval 'sub ELFSIZE () { &KERN_ELFSIZE;}' unless defined(&ELFSIZE);
    }
    require 'sys/exec_elf.ph';
    if(defined(&_KSYMS_PRIVATE)) {
	require 'sys/ioccom.ph';
	require 'sys/queue.ph';
	if(defined(&_KERNEL)) {
	    require 'sys/pslist.ph';
	}
	if(defined(&_KERNEL)) {
	}
	eval 'sub SHNOTE () {1;}' unless defined(&SHNOTE);
	eval 'sub SYMTAB () {2;}' unless defined(&SYMTAB);
	eval 'sub STRTAB () {3;}' unless defined(&STRTAB);
	eval 'sub SHSTRTAB () {4;}' unless defined(&SHSTRTAB);
	eval 'sub SHBSS () {5;}' unless defined(&SHBSS);
	eval 'sub SHCTF () {6;}' unless defined(&SHCTF);
	eval 'sub NSECHDR () {7;}' unless defined(&NSECHDR);
	eval 'sub NPRGHDR () {1;}' unless defined(&NPRGHDR);
	eval 'sub SHSTRSIZ () {64;}' unless defined(&SHSTRSIZ);
    }
    eval 'sub kg_sym () { ($_un->{ku_sym});}' unless defined(&kg_sym);
    eval 'sub kg_value () { ($_un->{ku_value});}' unless defined(&kg_value);
    if(defined(&ELFSIZE)) {
    }
    eval 'sub OKIOCGSYMBOL () { &_IOW(ord(\'l\'), 1, \'struct ksyms_ogsymbol\');}' unless defined(&OKIOCGSYMBOL);
    eval 'sub OKIOCGVALUE () { &_IOW(ord(\'l\'), 2, \'struct ksyms_ogsymbol\');}' unless defined(&OKIOCGVALUE);
    eval 'sub KIOCGSIZE () { &_IOR(ord(\'l\'), 3, \'int\');}' unless defined(&KIOCGSIZE);
    eval 'sub KIOCGVALUE () { &_IOWR(ord(\'l\'), 4, \'struct ksyms_gvalue\');}' unless defined(&KIOCGVALUE);
    eval 'sub KIOCGSYMBOL () { &_IOWR(ord(\'l\'), 5, \'struct ksyms_gsymbol\');}' unless defined(&KIOCGSYMBOL);
    if(defined(&_KERNEL) || defined(&_KMEMUSER)) {
	eval 'sub KSYMS_CLOSEST () {0001;}' unless defined(&KSYMS_CLOSEST);
	eval 'sub KSYMS_EXACT () {0002;}' unless defined(&KSYMS_EXACT);
	eval 'sub KSYMS_EXTERN () {0000;}' unless defined(&KSYMS_EXTERN);
	eval 'sub KSYMS_PROC () {0100;}' unless defined(&KSYMS_PROC);
	eval 'sub KSYMS_ANY () {0200;}' unless defined(&KSYMS_ANY);
	if(defined(&_KERNEL)) {
	}
    }
}
1;
