@@ -416,7 +416,7 @@ compress_and_backup_page(pgFile *file, BlockNumber blknum,
416
416
blknum, header.compressed_size, write_buffer_size); */
417
417
418
418
/* Update CRC */
419
- COMP_CRC32C (* crc , write_buffer , write_buffer_size );
419
+ COMP_TRADITIONAL_CRC32 (* crc , write_buffer , write_buffer_size );
420
420
421
421
/* write data page */
422
422
if (fwrite (write_buffer , 1 , write_buffer_size , out ) != write_buffer_size )
@@ -476,13 +476,13 @@ backup_data_file(backup_files_arg* arguments,
476
476
/* reset size summary */
477
477
file -> read_size = 0 ;
478
478
file -> write_size = 0 ;
479
- INIT_CRC32C (file -> crc );
479
+ INIT_TRADITIONAL_CRC32 (file -> crc );
480
480
481
481
/* open backup mode file for read */
482
482
in = fopen (file -> path , PG_BINARY_R );
483
483
if (in == NULL )
484
484
{
485
- FIN_CRC32C (file -> crc );
485
+ FIN_TRADITIONAL_CRC32 (file -> crc );
486
486
487
487
/*
488
488
* If file is not found, this is not en error.
@@ -587,7 +587,7 @@ backup_data_file(backup_files_arg* arguments,
587
587
to_path , strerror (errno ));
588
588
fclose (in );
589
589
590
- FIN_CRC32C (file -> crc );
590
+ FIN_TRADITIONAL_CRC32 (file -> crc );
591
591
592
592
/*
593
593
* If we have pagemap then file in the backup can't be a zero size.
@@ -839,7 +839,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
839
839
struct stat st ;
840
840
pg_crc32 crc ;
841
841
842
- INIT_CRC32C (crc );
842
+ INIT_TRADITIONAL_CRC32 (crc );
843
843
844
844
/* reset size summary */
845
845
file -> read_size = 0 ;
@@ -849,7 +849,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
849
849
in = fopen (file -> path , PG_BINARY_R );
850
850
if (in == NULL )
851
851
{
852
- FIN_CRC32C (crc );
852
+ FIN_TRADITIONAL_CRC32 (crc );
853
853
file -> crc = crc ;
854
854
855
855
/* maybe deleted, it's not error */
@@ -898,7 +898,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
898
898
strerror (errno_tmp ));
899
899
}
900
900
/* update CRC */
901
- COMP_CRC32C (crc , buf , read_len );
901
+ COMP_TRADITIONAL_CRC32 (crc , buf , read_len );
902
902
903
903
file -> read_size += read_len ;
904
904
}
@@ -925,14 +925,14 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
925
925
strerror (errno_tmp ));
926
926
}
927
927
/* update CRC */
928
- COMP_CRC32C (crc , buf , read_len );
928
+ COMP_TRADITIONAL_CRC32 (crc , buf , read_len );
929
929
930
930
file -> read_size += read_len ;
931
931
}
932
932
933
933
file -> write_size = (int64 ) file -> read_size ;
934
934
/* finish CRC calculation and store into pgFile */
935
- FIN_CRC32C (crc );
935
+ FIN_TRADITIONAL_CRC32 (crc );
936
936
file -> crc = crc ;
937
937
938
938
/* update file permission */
@@ -1350,7 +1350,7 @@ calc_file_checksum(pgFile *file)
1350
1350
pg_crc32 crc ;
1351
1351
1352
1352
Assert (S_ISREG (file -> mode ));
1353
- INIT_CRC32C (crc );
1353
+ INIT_TRADITIONAL_CRC32 (crc );
1354
1354
1355
1355
/* reset size summary */
1356
1356
file -> read_size = 0 ;
@@ -1360,7 +1360,7 @@ calc_file_checksum(pgFile *file)
1360
1360
in = fopen (file -> path , PG_BINARY_R );
1361
1361
if (in == NULL )
1362
1362
{
1363
- FIN_CRC32C (crc );
1363
+ FIN_TRADITIONAL_CRC32 (crc );
1364
1364
file -> crc = crc ;
1365
1365
1366
1366
/* maybe deleted, it's not error */
@@ -1387,7 +1387,7 @@ calc_file_checksum(pgFile *file)
1387
1387
break ;
1388
1388
1389
1389
/* update CRC */
1390
- COMP_CRC32C (crc , buf , read_len );
1390
+ COMP_TRADITIONAL_CRC32 (crc , buf , read_len );
1391
1391
1392
1392
file -> write_size += read_len ;
1393
1393
file -> read_size += read_len ;
@@ -1402,7 +1402,7 @@ calc_file_checksum(pgFile *file)
1402
1402
}
1403
1403
1404
1404
/* finish CRC calculation and store into pgFile */
1405
- FIN_CRC32C (crc );
1405
+ FIN_TRADITIONAL_CRC32 (crc );
1406
1406
file -> crc = crc ;
1407
1407
1408
1408
fclose (in );
0 commit comments