require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&ZCONF_H)) {
    eval 'sub ZCONF_H () {1;}' unless defined(&ZCONF_H);
    if(defined(&Z_PREFIX)) {
	eval 'sub deflateInit_ () { &z_deflateInit_;}' unless defined(&deflateInit_);
	eval 'sub deflate () { &z_deflate;}' unless defined(&deflate);
	eval 'sub deflateEnd () { &z_deflateEnd;}' unless defined(&deflateEnd);
	eval 'sub inflateInit_ () { &z_inflateInit_;}' unless defined(&inflateInit_);
	eval 'sub inflate () { &z_inflate;}' unless defined(&inflate);
	eval 'sub inflateEnd () { &z_inflateEnd;}' unless defined(&inflateEnd);
	eval 'sub deflateInit2_ () { &z_deflateInit2_;}' unless defined(&deflateInit2_);
	eval 'sub deflateSetDictionary () { &z_deflateSetDictionary;}' unless defined(&deflateSetDictionary);
	eval 'sub deflateCopy () { &z_deflateCopy;}' unless defined(&deflateCopy);
	eval 'sub deflateReset () { &z_deflateReset;}' unless defined(&deflateReset);
	eval 'sub deflateParams () { &z_deflateParams;}' unless defined(&deflateParams);
	eval 'sub deflateBound () { &z_deflateBound;}' unless defined(&deflateBound);
	eval 'sub deflatePrime () { &z_deflatePrime;}' unless defined(&deflatePrime);
	eval 'sub inflateInit2_ () { &z_inflateInit2_;}' unless defined(&inflateInit2_);
	eval 'sub inflateSetDictionary () { &z_inflateSetDictionary;}' unless defined(&inflateSetDictionary);
	eval 'sub inflateSync () { &z_inflateSync;}' unless defined(&inflateSync);
	eval 'sub inflateSyncPoint () { &z_inflateSyncPoint;}' unless defined(&inflateSyncPoint);
	eval 'sub inflateCopy () { &z_inflateCopy;}' unless defined(&inflateCopy);
	eval 'sub inflateReset () { &z_inflateReset;}' unless defined(&inflateReset);
	eval 'sub inflateBack () { &z_inflateBack;}' unless defined(&inflateBack);
	eval 'sub inflateBackEnd () { &z_inflateBackEnd;}' unless defined(&inflateBackEnd);
	eval 'sub compress () { &z_compress;}' unless defined(&compress);
	eval 'sub compress2 () { &z_compress2;}' unless defined(&compress2);
	eval 'sub compressBound () { &z_compressBound;}' unless defined(&compressBound);
	eval 'sub uncompress () { &z_uncompress;}' unless defined(&uncompress);
	eval 'sub adler32 () { &z_adler32;}' unless defined(&adler32);
	eval 'sub crc32 () { &z_crc32;}' unless defined(&crc32);
	eval 'sub get_crc_table () { &z_get_crc_table;}' unless defined(&get_crc_table);
	eval 'sub zError () { &z_zError;}' unless defined(&zError);
	eval 'sub alloc_func () { &z_alloc_func;}' unless defined(&alloc_func);
	eval 'sub free_func () { &z_free_func;}' unless defined(&free_func);
	eval 'sub in_func () { &z_in_func;}' unless defined(&in_func);
	eval 'sub out_func () { &z_out_func;}' unless defined(&out_func);
	eval 'sub Byte () { &z_Byte;}' unless defined(&Byte);
	eval 'sub uInt () { &z_uInt;}' unless defined(&uInt);
	eval 'sub uLong () { &z_uLong;}' unless defined(&uLong);
	eval 'sub Bytef () { &z_Bytef;}' unless defined(&Bytef);
	eval 'sub charf () { &z_charf;}' unless defined(&charf);
	eval 'sub intf () { &z_intf;}' unless defined(&intf);
	eval 'sub uIntf () { &z_uIntf;}' unless defined(&uIntf);
	eval 'sub uLongf () { &z_uLongf;}' unless defined(&uLongf);
	eval 'sub voidpf () { &z_voidpf;}' unless defined(&voidpf);
	eval 'sub voidp () { &z_voidp;}' unless defined(&voidp);
    }
    if(defined( &__MSDOS__)  && !defined( &MSDOS)) {
	eval 'sub MSDOS () {1;}' unless defined(&MSDOS);
    }
    if((defined( &OS_2) || defined( &__OS2__))  && !defined( &OS2)) {
	eval 'sub OS2 () {1;}' unless defined(&OS2);
    }
    if(defined( &_WINDOWS)  && !defined( &WINDOWS)) {
	eval 'sub WINDOWS () {1;}' unless defined(&WINDOWS);
    }
    if(defined( &_WIN32) || defined( &_WIN32_WCE) || defined( &__WIN32__)) {
	unless(defined(&WIN32)) {
	    eval 'sub WIN32 () {1;}' unless defined(&WIN32);
	}
    }
    if((defined( &MSDOS) || defined( &OS2) || defined( &WINDOWS))  && !defined( &WIN32)) {
	if(!defined( &__GNUC__)  && !defined( &__FLAT__)  && !defined( &__386__)) {
	    unless(defined(&SYS16BIT)) {
		eval 'sub SYS16BIT () {1;}' unless defined(&SYS16BIT);
	    }
	}
    }
    if(defined(&SYS16BIT)) {
	eval 'sub MAXSEG_64K () {1;}' unless defined(&MAXSEG_64K);
    }
    if(defined(&MSDOS)) {
	eval 'sub UNALIGNED_OK () {1;}' unless defined(&UNALIGNED_OK);
    }
    if(defined(&__STDC_VERSION__)) {
	unless(defined(&STDC)) {
	    eval 'sub STDC () {1;}' unless defined(&STDC);
	}
	if((defined(&__STDC_VERSION__) ? &__STDC_VERSION__ : 0) >= 199901) {
	    unless(defined(&STDC99)) {
		eval 'sub STDC99 () {1;}' unless defined(&STDC99);
	    }
	}
    }
    if(!defined( &STDC)  && (defined( &__STDC__) || defined( &__cplusplus))) {
	eval 'sub STDC () {1;}' unless defined(&STDC);
    }
    if(!defined( &STDC)  && (defined( &__GNUC__) || defined( &__BORLANDC__))) {
	eval 'sub STDC () {1;}' unless defined(&STDC);
    }
    if(!defined( &STDC)  && (defined( &MSDOS) || defined( &WINDOWS) || defined( &WIN32))) {
	eval 'sub STDC () {1;}' unless defined(&STDC);
    }
    if(!defined( &STDC)  && (defined( &OS2) || defined( &__HOS_AIX__))) {
	eval 'sub STDC () {1;}' unless defined(&STDC);
    }
    if(defined( &__OS400__)  && !defined( &STDC) ) {
	eval 'sub STDC () {1;}' unless defined(&STDC);
    }
    unless(defined(&STDC)) {
	unless(defined(&const)) {
	    eval 'sub const () {1;}' unless defined(&const);
	}
    }
    if(defined( &__MWERKS__)||defined( &applec)||defined( &THINK_C)||defined( &__SC__)) {
	eval 'sub NO_DUMMY_DECL () {1;}' unless defined(&NO_DUMMY_DECL);
    }
    unless(defined(&MAX_MEM_LEVEL)) {
	if(defined(&MAXSEG_64K)) {
	    eval 'sub MAX_MEM_LEVEL () {8;}' unless defined(&MAX_MEM_LEVEL);
	} else {
	    eval 'sub MAX_MEM_LEVEL () {9;}' unless defined(&MAX_MEM_LEVEL);
	}
    }
    unless(defined(&MAX_WBITS)) {
	eval 'sub MAX_WBITS () {15;}' unless defined(&MAX_WBITS);
    }
    unless(defined(&OF)) {
	if(defined(&STDC)) {
	    eval 'sub OF {
	        my($args) = @_;
    		eval q($args);
	    }' unless defined(&OF);
	} else {
	    eval 'sub OF {
	        my($args) = @_;
    		eval q(());
	    }' unless defined(&OF);
	}
    }
    if(defined(&SYS16BIT)) {
	if(defined( &M_I86SM) || defined( &M_I86MM)) {
	    eval 'sub SMALL_MEDIUM () {1;}' unless defined(&SMALL_MEDIUM);
	    if(defined(&_MSC_VER)) {
		eval 'sub FAR () { &_far;}' unless defined(&FAR);
	    } else {
		eval 'sub FAR () { &far;}' unless defined(&FAR);
	    }
	}
	if((defined( &__SMALL__) || defined( &__MEDIUM__))) {
	    eval 'sub SMALL_MEDIUM () {1;}' unless defined(&SMALL_MEDIUM);
	    if(defined(&__BORLANDC__)) {
		eval 'sub FAR () { &_far;}' unless defined(&FAR);
	    } else {
		eval 'sub FAR () { &far;}' unless defined(&FAR);
	    }
	}
    }
    if(defined( &WINDOWS) || defined( &WIN32)) {
	if(defined(&ZLIB_DLL)) {
	    if(defined( &WIN32)  && (!defined( &__BORLANDC__) || ((defined(&__BORLANDC__) ? &__BORLANDC__ : 0) >= 0x500))) {
		if(defined(&ZLIB_INTERNAL)) {
		    eval 'sub ZEXTERN () { &extern  &__declspec( &dllexport);}' unless defined(&ZEXTERN);
		} else {
		    eval 'sub ZEXTERN () { &extern  &__declspec( &dllimport);}' unless defined(&ZEXTERN);
		}
	    }
	}
	if(defined(&ZLIB_WINAPI)) {
	    if(defined(&FAR)) {
		undef(&FAR) if defined(&FAR);
	    }
	    require 'windows.ph';
	    eval 'sub ZEXPORT () { &WINAPI;}' unless defined(&ZEXPORT);
	    if(defined(&WIN32)) {
		eval 'sub ZEXPORTVA () { &WINAPIV;}' unless defined(&ZEXPORTVA);
	    } else {
		eval 'sub ZEXPORTVA () { &FAR  &CDECL;}' unless defined(&ZEXPORTVA);
	    }
	}
    }
    if(defined ( &__BEOS__)) {
	if(defined(&ZLIB_DLL)) {
	    if(defined(&ZLIB_INTERNAL)) {
		eval 'sub ZEXPORT () { &__declspec( &dllexport);}' unless defined(&ZEXPORT);
		eval 'sub ZEXPORTVA () { &__declspec( &dllexport);}' unless defined(&ZEXPORTVA);
	    } else {
		eval 'sub ZEXPORT () { &__declspec( &dllimport);}' unless defined(&ZEXPORT);
		eval 'sub ZEXPORTVA () { &__declspec( &dllimport);}' unless defined(&ZEXPORTVA);
	    }
	}
    }
    unless(defined(&ZEXTERN)) {
	eval 'sub ZEXTERN () { &extern;}' unless defined(&ZEXTERN);
    }
    unless(defined(&ZEXPORT)) {
	eval 'sub ZEXPORT () {1;}' unless defined(&ZEXPORT);
    }
    unless(defined(&ZEXPORTVA)) {
	eval 'sub ZEXPORTVA () {1;}' unless defined(&ZEXPORTVA);
    }
    unless(defined(&FAR)) {
	eval 'sub FAR () {1;}' unless defined(&FAR);
    }
    if(!defined( &__MACTYPES__)) {
    }
    if(defined(&SMALL_MEDIUM)) {
	eval 'sub Bytef () { &Byte  &FAR;}' unless defined(&Bytef);
    } else {
    }
    if(defined(&STDC)) {
    } else {
    }
    require 'sys/types.ph';
    require 'unistd.ph';
    eval 'sub z_off_t () { &off_t;}' unless defined(&z_off_t);
    unless(defined(&SEEK_SET)) {
	eval 'sub SEEK_SET () {0;}' unless defined(&SEEK_SET);
	eval 'sub SEEK_CUR () {1;}' unless defined(&SEEK_CUR);
	eval 'sub SEEK_END () {2;}' unless defined(&SEEK_END);
    }
    if(defined( &__OS400__)) {
	eval 'sub NO_vsnprintf () {1;}' unless defined(&NO_vsnprintf);
    }
    if(defined( &__MVS__)) {
	eval 'sub NO_vsnprintf () {1;}' unless defined(&NO_vsnprintf);
	if(defined(&FAR)) {
	    undef(&FAR) if defined(&FAR);
	}
    }
    if(defined( &__MVS__)) {
    }
}
1;
