--------------------- PatchSet 6552 Date: 2005/03/26 15:21:08 Author: serassio Branch: nt-2_5 Tag: (none) Log: Refined Windows lfs changes Members: src/fs/ufs/store_dir_ufs.c:1.21.6.1.4.18->1.21.6.1.4.19 src/fs/ufs/store_io_ufs.c:1.7.14.5->1.7.14.6 Index: squid/src/fs/ufs/store_dir_ufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/ufs/store_dir_ufs.c,v retrieving revision 1.21.6.1.4.18 retrieving revision 1.21.6.1.4.19 diff -u -r1.21.6.1.4.18 -r1.21.6.1.4.19 --- squid/src/fs/ufs/store_dir_ufs.c 26 Mar 2005 09:49:02 -0000 1.21.6.1.4.18 +++ squid/src/fs/ufs/store_dir_ufs.c 26 Mar 2005 15:21:08 -0000 1.21.6.1.4.19 @@ -516,9 +516,9 @@ tmpe.hash.key = key; /* check sizes */ if (tmpe.swap_file_sz == 0) { - tmpe.swap_file_sz = (size_t) sb.st_size; + tmpe.swap_file_sz = sb.st_size; } else if (tmpe.swap_file_sz == sb.st_size - swap_hdr_len) { - tmpe.swap_file_sz = (size_t) sb.st_size; + tmpe.swap_file_sz = sb.st_size; } else if (tmpe.swap_file_sz != sb.st_size) { debug(47, 1) ("storeUfsDirRebuildFromDirectory: SIZE MISMATCH %ld!=%ld\n", (long int) tmpe.swap_file_sz, (long int) sb.st_size); @@ -1160,7 +1160,7 @@ hd.hdr.op = SWAP_LOG_VERSION; hd.hdr.version = 1; hd.hdr.record_size = sizeof(storeSwapLogData); - if (write(fd, &hd, sizeof(hd)) != sizeof(hd)) { + if (FD_WRITE_METHOD(fd, (const char *)&hd, sizeof(hd)) != sizeof(hd)) { debug(50, 1) ("%s: %s\n", new_path, xstrerror()); fatal("storeDirOpenTmpSwapLog: Failed to write swap log header."); } @@ -1229,7 +1229,7 @@ hd.hdr.op = SWAP_LOG_VERSION; hd.hdr.version = 1; hd.hdr.record_size = sizeof(storeSwapLogData); - if (write(state->fd, &hd, sizeof(hd)) != sizeof(hd)) { + if (FD_WRITE_METHOD(state->fd, (const char *)&hd, sizeof(hd)) != sizeof(hd)) { debug(50, 1) ("%s: %s\n", state->new, xstrerror()); fatal("storeUfsDirWriteCleanStart: Failed to write swap log header."); } Index: squid/src/fs/ufs/store_io_ufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/ufs/store_io_ufs.c,v retrieving revision 1.7.14.5 retrieving revision 1.7.14.6 diff -u -r1.7.14.5 -r1.7.14.6 --- squid/src/fs/ufs/store_io_ufs.c 26 Mar 2005 09:49:02 -0000 1.7.14.5 +++ squid/src/fs/ufs/store_io_ufs.c 26 Mar 2005 15:21:08 -0000 1.7.14.6 @@ -79,7 +79,7 @@ ((ufsstate_t *) (sio->fsstate))->flags.reading = 0; ((ufsstate_t *) (sio->fsstate))->flags.close_request = 0; if (fstat(fd, &sb) == 0) - sio->st_size = (size_t) sb.st_size; + sio->st_size = sb.st_size; store_open_disk_fd++; ufsinfo->open_files++;