2d31b682d8
Signed-off-by: Gang Wei <gang.wei@intel.com>
43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
diff -r 7db3c64d7b75 lcptools/mlehash.c
|
|
--- a/lcptools/mlehash.c Wed Aug 22 11:49:46 2012 +0800
|
|
+++ b/lcptools/mlehash.c Wed Aug 22 12:14:03 2012 +0800
|
|
@@ -233,7 +233,7 @@
|
|
*/
|
|
static bool read_file(const char *filename, void **buffer, size_t *length)
|
|
{
|
|
- FILE *fcompressed = NULL;
|
|
+ gzFile fcompressed = NULL;
|
|
FILE *fdecompressed = NULL;
|
|
struct stat filestat;
|
|
char tmpbuffer[1024];
|
|
diff -r 7db3c64d7b75 tb_polgen/commands.c
|
|
--- a/tb_polgen/commands.c Wed Aug 22 11:49:46 2012 +0800
|
|
+++ b/tb_polgen/commands.c Wed Aug 22 12:14:03 2012 +0800
|
|
@@ -60,7 +60,7 @@
|
|
int read_cnt;
|
|
|
|
if ( unzip )
|
|
- f = gzopen(filename, "rb");
|
|
+ f = (FILE *)gzopen(filename, "rb");
|
|
else
|
|
f = fopen(filename, "rb");
|
|
|
|
@@ -73,7 +73,7 @@
|
|
EVP_DigestInit(&ctx, md);
|
|
do {
|
|
if ( unzip )
|
|
- read_cnt = gzread(f, buf, sizeof(buf));
|
|
+ read_cnt = gzread((gzFile)f, buf, sizeof(buf));
|
|
else
|
|
read_cnt = fread(buf, 1, sizeof(buf), f);
|
|
if ( read_cnt == 0 )
|
|
@@ -84,7 +84,7 @@
|
|
EVP_DigestFinal(&ctx, hash->sha1, NULL);
|
|
|
|
if ( unzip )
|
|
- gzclose(f);
|
|
+ gzclose((gzFile)f);
|
|
else
|
|
fclose(f);
|
|
|