diff --git a/HISTORY b/HISTORY index b745b96..4af2eed 100644 --- a/HISTORY +++ b/HISTORY @@ -1,9 +1,10 @@ -Version 5.12 2018-05-23 +Version 5.12 2018-06-07 * code refine for rare case * replace print format OFF_PRINTF_FORMAT to PRId64 * php_ext fix zend_object_store_get_object call in php5.5 * make.sh uses macros define in /usr/include/fastcommon/_os_define.h + * correct CRC32, you must upgrade libfastcommon to V1.38 or later Version 5.11 2017-05-26 * bug fixed: file_offset has no effect when use trunk file diff --git a/client/fdfs_crc32.c b/client/fdfs_crc32.c index b460197..f8d7522 100644 --- a/client/fdfs_crc32.c +++ b/client/fdfs_crc32.c @@ -24,7 +24,7 @@ int main(int argc, char *argv[]) int fd; int read_bytes; int result; - int crc32; + int64_t crc32; char buff[512 * 1024]; if (argc < 2) @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) if (result == 0) { crc32 = CRC32_FINAL(crc32); - printf("%u\n", crc32); + printf("%x\n", (int)crc32); } return result; diff --git a/storage/storage_nio.h b/storage/storage_nio.h index 7a14458..632362c 100644 --- a/storage/storage_nio.h +++ b/storage/storage_nio.h @@ -91,7 +91,7 @@ typedef struct bool calc_file_hash; //if calculate file content hash code int open_flags; //open file flags int file_hash_codes[4]; //file hash code - int crc32; //file content crc32 signature + int64_t crc32; //file content crc32 signature MD5_CTX md5_context; union