summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-03-31 11:02:01 -0400
committerWolfgang Denk <wd@denx.de>2008-04-24 13:18:17 +0200
commit89cdab788f3716b335fefb60b836ebcf975aceab (patch)
tree8d315784366d9b3c5ce7ffd39913eb6fb3979a26 /include/common.h
parent58c5376ba67767ee684069d43e7f747a5d9ae8ed (diff)
crc32: use uint32_t rather than unsigned long
The envcrc.c does sizeof(unsigned long) when calculating the crc, but this is done with the build toolchain instead of the target tool chain, so if the build is a 64bit system but the target is 32bits, the size will obviously be wrong. This converts all unsigned long stuff related to crc32 to uint32_t types. Compile tested only: output of ./tools/envcrc when run on a 32bit build system matches that of a 64bit build system. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/common.h b/include/common.h
index 8630780e921..aea181e2ab3 100644
--- a/include/common.h
+++ b/include/common.h
@@ -604,8 +604,8 @@ int sprintf(char * buf, const char *fmt, ...);
int vsprintf(char *buf, const char *fmt, va_list args);
/* lib_generic/crc32.c */
-ulong crc32 (ulong, const unsigned char *, uint);
-ulong crc32_no_comp (ulong, const unsigned char *, uint);
+uint32_t crc32 (uint32_t, const unsigned char *, uint);
+uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint);
/* common/console.c */
int console_init_f(void); /* Before relocation; uses the serial stuff */