Fix build errors with zlib-1.2.6.

The problem relates to gzFile not being a typedef of voidp anymore in zlib-1.2.6.
Thanks to Tim Harder for the patch.


git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1091 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
bgk 2012-03-25 08:09:07 +00:00
parent 9c218871d4
commit a7c7f063c1
2 changed files with 6 additions and 6 deletions

View File

@ -732,11 +732,11 @@ static blargg_err_t convert_gz_error( gzFile file )
blargg_err_t Gzip_File_Reader::read_v( void* p, int s )
{
int result = gzread( file_, p, s );
int result = gzread( (gzFile)file_, p, s );
if ( result != s )
{
if ( result < 0 )
return convert_gz_error( file_ );
return convert_gz_error( (gzFile)file_ );
return blargg_err_file_corrupt;
}
@ -746,8 +746,8 @@ blargg_err_t Gzip_File_Reader::read_v( void* p, int s )
blargg_err_t Gzip_File_Reader::seek_v( int n )
{
if ( gzseek( file_, n, SEEK_SET ) < 0 )
return convert_gz_error( file_ );
if ( gzseek( (gzFile)file_, n, SEEK_SET ) < 0 )
return convert_gz_error( (gzFile)file_ );
return blargg_ok;
}
@ -756,7 +756,7 @@ void Gzip_File_Reader::close()
{
if ( file_ )
{
if ( gzclose( file_ ) )
if ( gzclose( (gzFile)file_ ) )
check( false );
file_ = NULL;
}

View File

@ -590,7 +590,7 @@ void utilWriteData(gzFile gzFile, variable_desc *data)
gzFile utilGzOpen(const char *file, const char *mode)
{
utilGzWriteFunc = (int (ZEXPORT *)(void *,void * const, unsigned int))gzwrite;
utilGzWriteFunc = (int (ZEXPORT *)(gzFile, void * const, unsigned int))gzwrite;
utilGzReadFunc = gzread;
utilGzCloseFunc = gzclose;
utilGzSeekFunc = gzseek;