-/* We had a problem on some solaris platforms with the CRC32 library, some
- * 8.4.x jobs uses a bad crc32 algorithm. We just try one then the
- * other to not create false problems
- */
-uint32_t DCR::crc32(unsigned char *buf, int len, uint32_t expected_crc)
-{
-#if defined(HAVE_SUN_OS) && defined(HAVE_LITTLE_ENDIAN)
- uint32_t crc = 0;
- if (crc32_type) {
- crc = bcrc32_bad(buf, len);
-
- } else {
- crc = bcrc32(buf, len);
- }
- if (expected_crc != crc) {
- crc32_type = !crc32_type; /* Next time, do it well right away */
-
- if (crc32_type) {
- crc = bcrc32_bad(buf, len);
-
- } else {
- crc = bcrc32(buf, len);
- }
- }
- return crc;
-#else
- return bcrc32(buf, len);
-#endif
-}
-