filename | src/util.c |
changeset | 674:377d987db8f2 |
prev | 586:2a3ba82cf243 |
next | 736:a02d1475ccfd |
author | nkeynes |
date | Mon May 26 11:01:42 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | hange 64-bit configuration to use sizeof(void *) rather than the system id returned by config.guess - config.guess gets it wrong in some situations. |
file | annotate | diff | log | raw |
1.1 --- a/src/util.c Tue Jan 15 20:50:23 2008 +00001.2 +++ b/src/util.c Mon May 26 11:01:42 2008 +00001.3 @@ -88,7 +88,8 @@1.4 unsigned char *tmp = g_malloc0( csize );1.5 int status = compress( tmp, &csize, p, size );1.6 assert( status == Z_OK );1.7 - fwrite( &csize, sizeof(csize), 1, f );1.8 + uint32_t wsize = (uint32_t)csize;1.9 + fwrite( &wsize, sizeof(wsize), 1, f );1.10 fwrite( tmp, csize, 1, f );1.11 g_free(tmp);1.12 }1.13 @@ -96,7 +97,7 @@1.14 int fread_gzip( void *p, size_t sz, size_t count, FILE *f )1.15 {1.16 uLongf size = sz*count;1.17 - uLongf csize;1.18 + uint32_t csize;1.19 unsigned char *tmp;1.21 fread( &csize, sizeof(csize), 1, f );
.