require '_h2ph_pre.ph';

no warnings 'redefine';

require 'openssl/opensslconf.ph';
unless(defined(&HEADER_E_OS2_H)) {
    eval 'sub HEADER_E_OS2_H () {1;}' unless defined(&HEADER_E_OS2_H);
    if(defined(&__cplusplus)) {
    }
    eval 'sub OPENSSL_SYS_UNIX () {1;}' unless defined(&OPENSSL_SYS_UNIX);
    if(defined( &__MWERKS__)  && defined( &macintosh) || defined( &OPENSSL_SYSNAME_MAC)) {
	undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	eval 'sub OPENSSL_SYS_MACINTOSH_CLASSIC () {1;}' unless defined(&OPENSSL_SYS_MACINTOSH_CLASSIC);
    }
    if(defined( &OPENSSL_SYSNAME_WIN16) || defined( &OPENSSL_SYSNAME_MSDOS)) {
	undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	eval 'sub OPENSSL_SYS_MSDOS () {1;}' unless defined(&OPENSSL_SYS_MSDOS);
    }
    if(defined( &OPENSSL_SYSNAME_WIN16)) {
	undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	eval 'sub OPENSSL_SYS_WIN16 () {1;}' unless defined(&OPENSSL_SYS_WIN16);
    }
    if(defined( &OPENSSL_SYSNAME_UWIN)) {
	undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	eval 'sub OPENSSL_SYS_WIN32_UWIN () {1;}' unless defined(&OPENSSL_SYS_WIN32_UWIN);
    } else {
	if(defined( &__CYGWIN32__) || defined( &OPENSSL_SYSNAME_CYGWIN32)) {
	    undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	    eval 'sub OPENSSL_SYS_WIN32_CYGWIN () {1;}' unless defined(&OPENSSL_SYS_WIN32_CYGWIN);
	} else {
	    if(defined( &_WIN32) || defined( &OPENSSL_SYSNAME_WIN32)) {
		undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
		eval 'sub OPENSSL_SYS_WIN32 () {1;}' unless defined(&OPENSSL_SYS_WIN32);
	    }
	    if(defined( &OPENSSL_SYSNAME_WINNT)) {
		undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
		eval 'sub OPENSSL_SYS_WINNT () {1;}' unless defined(&OPENSSL_SYS_WINNT);
	    }
	    if(defined( &OPENSSL_SYSNAME_WINCE)) {
		undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
		eval 'sub OPENSSL_SYS_WINCE () {1;}' unless defined(&OPENSSL_SYS_WINCE);
	    }
	}
    }
    if(defined( &OPENSSL_SYS_WIN16) || defined( &OPENSSL_SYS_WIN32) || defined( &OPENSSL_SYS_WINNT) || defined( &OPENSSL_SYS_WINCE)) {
	undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	eval 'sub OPENSSL_SYS_WINDOWS () {1;}' unless defined(&OPENSSL_SYS_WINDOWS);
	unless(defined(&OPENSSL_SYS_MSDOS)) {
	    eval 'sub OPENSSL_SYS_MSDOS () {1;}' unless defined(&OPENSSL_SYS_MSDOS);
	}
    }
    if(defined(&OPENSSL_SYS_WINDOWS)) {
	unless(defined(&OPENSSL_OPT_WINDLL)) {
	    if(defined( &_WINDLL) ) {
		eval 'sub OPENSSL_OPT_WINDLL () {1;}' unless defined(&OPENSSL_OPT_WINDLL);
	    }
	}
    }
    if(defined( &__VMS) || defined( &VMS) || defined( &OPENSSL_SYSNAME_VMS)) {
	undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	eval 'sub OPENSSL_SYS_VMS () {1;}' unless defined(&OPENSSL_SYS_VMS);
	if(defined( &__DECC)) {
	    eval 'sub OPENSSL_SYS_VMS_DECC () {1;}' unless defined(&OPENSSL_SYS_VMS_DECC);
	}
 elsif(defined( &__DECCXX)) {
	    eval 'sub OPENSSL_SYS_VMS_DECC () {1;}' unless defined(&OPENSSL_SYS_VMS_DECC);
	    eval 'sub OPENSSL_SYS_VMS_DECCXX () {1;}' unless defined(&OPENSSL_SYS_VMS_DECCXX);
	} else {
	    eval 'sub OPENSSL_SYS_VMS_NODECC () {1;}' unless defined(&OPENSSL_SYS_VMS_NODECC);
	}
    }
    if(defined( &__EMX__) || defined( &__OS2__)) {
	undef(&OPENSSL_SYS_UNIX) if defined(&OPENSSL_SYS_UNIX);
	eval 'sub OPENSSL_SYS_OS2 () {1;}' unless defined(&OPENSSL_SYS_OS2);
    }
    if(defined(&OPENSSL_SYS_UNIX)) {
	if(defined( &linux) || defined( &__linux__) || defined( &OPENSSL_SYSNAME_LINUX)) {
	    eval 'sub OPENSSL_SYS_LINUX () {1;}' unless defined(&OPENSSL_SYS_LINUX);
	}
	if(defined(&OPENSSL_SYSNAME_MPE)) {
	    eval 'sub OPENSSL_SYS_MPE () {1;}' unless defined(&OPENSSL_SYS_MPE);
	}
	if(defined(&OPENSSL_SYSNAME_SNI)) {
	    eval 'sub OPENSSL_SYS_SNI () {1;}' unless defined(&OPENSSL_SYS_SNI);
	}
	if(defined(&OPENSSL_SYSNAME_ULTRASPARC)) {
	    eval 'sub OPENSSL_SYS_ULTRASPARC () {1;}' unless defined(&OPENSSL_SYS_ULTRASPARC);
	}
	if(defined(&OPENSSL_SYSNAME_NEWS4)) {
	    eval 'sub OPENSSL_SYS_NEWS4 () {1;}' unless defined(&OPENSSL_SYS_NEWS4);
	}
	if(defined(&OPENSSL_SYSNAME_MACOSX)) {
	    eval 'sub OPENSSL_SYS_MACOSX () {1;}' unless defined(&OPENSSL_SYS_MACOSX);
	}
	if(defined(&OPENSSL_SYSNAME_MACOSX_RHAPSODY)) {
	    eval 'sub OPENSSL_SYS_MACOSX_RHAPSODY () {1;}' unless defined(&OPENSSL_SYS_MACOSX_RHAPSODY);
	    eval 'sub OPENSSL_SYS_MACOSX () {1;}' unless defined(&OPENSSL_SYS_MACOSX);
	}
	if(defined(&OPENSSL_SYSNAME_SUNOS)) {
	    eval 'sub OPENSSL_SYS_SUNOS () {1;}' unless defined(&OPENSSL_SYS_SUNOS);
	}
	if(defined( &_CRAY) || defined( &OPENSSL_SYSNAME_CRAY)) {
	    eval 'sub OPENSSL_SYS_CRAY () {1;}' unless defined(&OPENSSL_SYS_CRAY);
	}
	if(defined( &_AIX) || defined( &OPENSSL_SYSNAME_AIX)) {
	    eval 'sub OPENSSL_SYS_AIX () {1;}' unless defined(&OPENSSL_SYS_AIX);
	}
    }
    if(defined(&OPENSSL_SYSNAME_VOS)) {
	eval 'sub OPENSSL_SYS_VOS () {1;}' unless defined(&OPENSSL_SYS_VOS);
    }
    if(defined(&OPENSSL_SYSNAME_VXWORKS)) {
	eval 'sub OPENSSL_SYS_VXWORKS () {1;}' unless defined(&OPENSSL_SYS_VXWORKS);
    }
    if(defined(&OPENSSL_SYS_MSDOS)) {
	eval 'sub OPENSSL_UNISTD_IO () {< ($io->{h})>;}' unless defined(&OPENSSL_UNISTD_IO);
	eval 'sub OPENSSL_DECLARE_EXIT () { &extern  &void  &exit;;}' unless defined(&OPENSSL_DECLARE_EXIT);
    } else {
	eval 'sub OPENSSL_UNISTD_IO () { &OPENSSL_UNISTD;}' unless defined(&OPENSSL_UNISTD_IO);
	eval 'sub OPENSSL_DECLARE_EXIT () {1;}' unless defined(&OPENSSL_DECLARE_EXIT);
    }
    if(defined( &OPENSSL_SYS_VMS_NODECC)) {
	eval 'sub OPENSSL_EXPORT () { &globalref;}' unless defined(&OPENSSL_EXPORT);
	eval 'sub OPENSSL_IMPORT () { &globalref;}' unless defined(&OPENSSL_IMPORT);
	eval 'sub OPENSSL_GLOBAL () { &globaldef;}' unless defined(&OPENSSL_GLOBAL);
    }
 elsif(defined( &OPENSSL_SYS_WINDOWS)  && defined( &OPENSSL_OPT_WINDLL)) {
	eval 'sub OPENSSL_EXPORT () { &extern  &__declspec( &dllexport);}' unless defined(&OPENSSL_EXPORT);
	eval 'sub OPENSSL_IMPORT () { &extern  &__declspec( &dllimport);}' unless defined(&OPENSSL_IMPORT);
	eval 'sub OPENSSL_GLOBAL () {1;}' unless defined(&OPENSSL_GLOBAL);
    } else {
	eval 'sub OPENSSL_EXPORT () { &extern;}' unless defined(&OPENSSL_EXPORT);
	eval 'sub OPENSSL_IMPORT () { &extern;}' unless defined(&OPENSSL_IMPORT);
	eval 'sub OPENSSL_GLOBAL () {1;}' unless defined(&OPENSSL_GLOBAL);
    }
    eval 'sub OPENSSL_EXTERN () { &OPENSSL_IMPORT;}' unless defined(&OPENSSL_EXTERN);
    if(defined(&OPENSSL_EXPORT_VAR_AS_FUNCTION)) {
	eval 'sub OPENSSL_IMPLEMENT_GLOBAL {
	    my($type,$name) = @_;
    	    eval q( &extern $type  &_hide_$name; $type * &_shadow_$name( &void) {  &return & &_hide_$name; }  &static $type  &_hide_$name);
	}' unless defined(&OPENSSL_IMPLEMENT_GLOBAL);
	eval 'sub OPENSSL_DECLARE_GLOBAL {
	    my($type,$name) = @_;
    	    eval q($type * &_shadow_$name( &void));
	}' unless defined(&OPENSSL_DECLARE_GLOBAL);
	eval 'sub OPENSSL_GLOBAL_REF {
	    my($name) = @_;
    	    eval q((*( &_shadow_$name())));
	}' unless defined(&OPENSSL_GLOBAL_REF);
    } else {
	eval 'sub OPENSSL_IMPLEMENT_GLOBAL {
	    my($type,$name) = @_;
    	    eval q( &OPENSSL_GLOBAL $type  &_shadow_$name);
	}' unless defined(&OPENSSL_IMPLEMENT_GLOBAL);
	eval 'sub OPENSSL_DECLARE_GLOBAL {
	    my($type,$name) = @_;
    	    eval q( &OPENSSL_EXPORT $type  &_shadow_$name);
	}' unless defined(&OPENSSL_DECLARE_GLOBAL);
	eval 'sub OPENSSL_GLOBAL_REF {
	    my($name) = @_;
    	    eval q( &_shadow_$name);
	}' unless defined(&OPENSSL_GLOBAL_REF);
    }
    if(defined(&__cplusplus)) {
    }
}
1;
