From d63a81d8f060c7eb73f170cdb9a5e38549d957f9 Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 4 Sep 2002 18:14:08 +0000 Subject: [PATCH] Don't mess with uint32_t, breaks on 6.x. CVS patchset: 5706 CVS date: 2002/09/04 18:14:08 --- tools/utils.c | 8 ++++---- tools/utils.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/utils.c b/tools/utils.c index 2ae7df8..6453afa 100644 --- a/tools/utils.c +++ b/tools/utils.c @@ -90,7 +90,7 @@ string_has_prefix (char *string, char *prefix) } /* Table computed with Mark Adler's makecrc.c utility. */ -static const uint32_t crc32_table[256] = +static const unsigned int crc32_table[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, @@ -146,7 +146,7 @@ static const uint32_t crc32_table[256] = 0x2d02ef8d }; -uint32_t crc32 (uint32_t crc, unsigned char *buf, size_t len) +unsigned int crc32 (unsigned int crc, unsigned char *buf, size_t len) { unsigned char *end; @@ -156,10 +156,10 @@ uint32_t crc32 (uint32_t crc, unsigned char *buf, size_t len) return ~crc; } -uint32_t +unsigned int crc32_file (const char *filename) { - uint32_t crc = 0; + unsigned int crc = 0; int fd; char buffer[1024*8]; ssize_t count; diff --git a/tools/utils.h b/tools/utils.h index 0b2b3a3..3f1ebac 100644 --- a/tools/utils.h +++ b/tools/utils.h @@ -6,7 +6,7 @@ char *strconcat (const char *string1, ...); off_t align_up (off_t offset, size_t alignment); int string_has_prefix (char *string, char *prefix); -uint32_t crc32_file (const char *filename); +unsigned int crc32_file (const char *filename); char *path_basename (const char *filename); #endif /* UTILS_H */ -- 2.7.4