require '_h2ph_pre.ph';

unless(defined(&_LINUX_INIT_H)) {
    eval 'sub _LINUX_INIT_H () {1;}' unless defined(&_LINUX_INIT_H);
    require 'linux/config.ph';
    unless(defined(&MODULE)) {
	unless(defined(&__ASSEMBLY__)) {
	    eval 'sub __initcall {
	        local($fn) = @_;
    		eval q( &static  &initcall_t  &__initcall_$fn  &__init_call = $fn);
	    }' unless defined(&__initcall);
	    eval 'sub __exitcall {
	        local($fn) = @_;
    		eval q( &static  &exitcall_t  &__exitcall_$fn  &__exit_call = $fn);
	    }' unless defined(&__exitcall);
	    eval 'sub __setup {
	        local($str, $fn) = @_;
    		eval q( &static \'char\'  &__setup_str_$fn->[]  &__initdata = $str;  &static \'struct kernel_param\'  &__setup_$fn  &__attribute__(( &unused))  &__initsetup = {  &__setup_str_$fn, $fn });
	    }' unless defined(&__setup);
	}
	eval 'sub __init () { &__attribute__ (( &__section__ (".text.init")));}' unless defined(&__init);
	eval 'sub __exit () { &__attribute__ (( &unused,  &__section__(".text.exit")));}' unless defined(&__exit);
	eval 'sub __initdata () { &__attribute__ (( &__section__ (".data.init")));}' unless defined(&__initdata);
	eval 'sub __exitdata () { &__attribute__ (( &unused,  &__section__ (".data.exit")));}' unless defined(&__exitdata);
	eval 'sub __initsetup () { &__attribute__ (( &unused, &__section__ (".setup.init")));}' unless defined(&__initsetup);
	eval 'sub __init_call () { &__attribute__ (( &unused, &__section__ (".initcall.init")));}' unless defined(&__init_call);
	eval 'sub __exit_call () { &__attribute__ (( &unused, &__section__ (".exitcall.exit")));}' unless defined(&__exit_call);
	eval 'sub __INIT () {. &section ".text.init","ax";}' unless defined(&__INIT);
	eval 'sub __FINIT () {. &previous;}' unless defined(&__FINIT);
	eval 'sub __INITDATA () {. &section ".data.init","aw";}' unless defined(&__INITDATA);
	eval 'sub module_init {
	    local($x) = @_;
    	    eval q( &__initcall($x););
	}' unless defined(&module_init);
	eval 'sub module_exit {
	    local($x) = @_;
    	    eval q( &__exitcall($x););
	}' unless defined(&module_exit);
    } else {
	eval 'sub __init () {1;}' unless defined(&__init);
	eval 'sub __exit () {1;}' unless defined(&__exit);
	eval 'sub __initdata () {1;}' unless defined(&__initdata);
	eval 'sub __exitdata () {1;}' unless defined(&__exitdata);
	eval 'sub __initcall {
	    local($fn) = @_;
    	    eval q();
	}' unless defined(&__initcall);
	eval 'sub __INIT () {1;}' unless defined(&__INIT);
	eval 'sub __FINIT () {1;}' unless defined(&__FINIT);
	eval 'sub __INITDATA () {1;}' unless defined(&__INITDATA);
	eval 'sub module_init {
	    local($x) = @_;
    	    eval q(\'int\'  &init_module  &__attribute__(( &alias($x)));  &static  &inline  &__init_module_func_t  &__init_module_inline( &void) {  &return $x; });
	}' unless defined(&module_init);
	eval 'sub module_exit {
	    local($x) = @_;
    	    eval q( &void  &cleanup_module  &__attribute__(( &alias($x)));  &static  &inline  &__cleanup_module_func_t  &__cleanup_module_inline( &void) {  &return $x; });
	}' unless defined(&module_exit);
	eval 'sub __setup {
	    local($str,$func) = @_;
    	    eval q();
	}' unless defined(&__setup);
    }
    if(defined(&CONFIG_HOTPLUG)) {
	eval 'sub __devinit () {1;}' unless defined(&__devinit);
	eval 'sub __devinitdata () {1;}' unless defined(&__devinitdata);
	eval 'sub __devexit () {1;}' unless defined(&__devexit);
	eval 'sub __devexitdata () {1;}' unless defined(&__devexitdata);
    } else {
	eval 'sub __devinit () { &__init;}' unless defined(&__devinit);
	eval 'sub __devinitdata () { &__initdata;}' unless defined(&__devinitdata);
	eval 'sub __devexit () { &__exit;}' unless defined(&__devexit);
	eval 'sub __devexitdata () { &__exitdata;}' unless defined(&__devexitdata);
    }
}
1;
