@@ -416,7 +416,7 @@ compress_and_backup_page(pgFile *file, BlockNumber blknum,
416416 blknum, header.compressed_size, write_buffer_size); */
417417
418418 /* Update CRC */
419- COMP_CRC32C (* crc , write_buffer , write_buffer_size );
419+ COMP_TRADITIONAL_CRC32 (* crc , write_buffer , write_buffer_size );
420420
421421 /* write data page */
422422 if (fwrite (write_buffer , 1 , write_buffer_size , out ) != write_buffer_size )
@@ -476,13 +476,13 @@ backup_data_file(backup_files_arg* arguments,
476476 /* reset size summary */
477477 file -> read_size = 0 ;
478478 file -> write_size = 0 ;
479- INIT_CRC32C (file -> crc );
479+ INIT_TRADITIONAL_CRC32 (file -> crc );
480480
481481 /* open backup mode file for read */
482482 in = fopen (file -> path , PG_BINARY_R );
483483 if (in == NULL )
484484 {
485- FIN_CRC32C (file -> crc );
485+ FIN_TRADITIONAL_CRC32 (file -> crc );
486486
487487 /*
488488 * If file is not found, this is not en error.
@@ -587,7 +587,7 @@ backup_data_file(backup_files_arg* arguments,
587587 to_path , strerror (errno ));
588588 fclose (in );
589589
590- FIN_CRC32C (file -> crc );
590+ FIN_TRADITIONAL_CRC32 (file -> crc );
591591
592592 /*
593593 * 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)
839839 struct stat st ;
840840 pg_crc32 crc ;
841841
842- INIT_CRC32C (crc );
842+ INIT_TRADITIONAL_CRC32 (crc );
843843
844844 /* reset size summary */
845845 file -> read_size = 0 ;
@@ -849,7 +849,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
849849 in = fopen (file -> path , PG_BINARY_R );
850850 if (in == NULL )
851851 {
852- FIN_CRC32C (crc );
852+ FIN_TRADITIONAL_CRC32 (crc );
853853 file -> crc = crc ;
854854
855855 /* maybe deleted, it's not error */
@@ -898,7 +898,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
898898 strerror (errno_tmp ));
899899 }
900900 /* update CRC */
901- COMP_CRC32C (crc , buf , read_len );
901+ COMP_TRADITIONAL_CRC32 (crc , buf , read_len );
902902
903903 file -> read_size += read_len ;
904904 }
@@ -925,14 +925,14 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
925925 strerror (errno_tmp ));
926926 }
927927 /* update CRC */
928- COMP_CRC32C (crc , buf , read_len );
928+ COMP_TRADITIONAL_CRC32 (crc , buf , read_len );
929929
930930 file -> read_size += read_len ;
931931 }
932932
933933 file -> write_size = (int64 ) file -> read_size ;
934934 /* finish CRC calculation and store into pgFile */
935- FIN_CRC32C (crc );
935+ FIN_TRADITIONAL_CRC32 (crc );
936936 file -> crc = crc ;
937937
938938 /* update file permission */
@@ -1350,7 +1350,7 @@ calc_file_checksum(pgFile *file)
13501350 pg_crc32 crc ;
13511351
13521352 Assert (S_ISREG (file -> mode ));
1353- INIT_CRC32C (crc );
1353+ INIT_TRADITIONAL_CRC32 (crc );
13541354
13551355 /* reset size summary */
13561356 file -> read_size = 0 ;
@@ -1360,7 +1360,7 @@ calc_file_checksum(pgFile *file)
13601360 in = fopen (file -> path , PG_BINARY_R );
13611361 if (in == NULL )
13621362 {
1363- FIN_CRC32C (crc );
1363+ FIN_TRADITIONAL_CRC32 (crc );
13641364 file -> crc = crc ;
13651365
13661366 /* maybe deleted, it's not error */
@@ -1387,7 +1387,7 @@ calc_file_checksum(pgFile *file)
13871387 break ;
13881388
13891389 /* update CRC */
1390- COMP_CRC32C (crc , buf , read_len );
1390+ COMP_TRADITIONAL_CRC32 (crc , buf , read_len );
13911391
13921392 file -> write_size += read_len ;
13931393 file -> read_size += read_len ;
@@ -1402,7 +1402,7 @@ calc_file_checksum(pgFile *file)
14021402 }
14031403
14041404 /* finish CRC calculation and store into pgFile */
1405- FIN_CRC32C (crc );
1405+ FIN_TRADITIONAL_CRC32 (crc );
14061406 file -> crc = crc ;
14071407
14081408 fclose (in );
0 commit comments