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>
diff --git a/include/environment.h b/include/environment.h
index af605ab..c4f7c33 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -84,18 +84,23 @@
 # endif
 #endif /* CFG_ENV_IS_IN_NAND */
 
+#ifdef USE_HOSTCC
+# include <stdint.h>
+#else
+# include <linux/types.h>
+#endif
 
 #ifdef CFG_REDUNDAND_ENVIRONMENT
-# define ENV_HEADER_SIZE	(sizeof(unsigned long) + 1)
+# define ENV_HEADER_SIZE	(sizeof(uint32_t) + 1)
 #else
-# define ENV_HEADER_SIZE	(sizeof(unsigned long))
+# define ENV_HEADER_SIZE	(sizeof(uint32_t))
 #endif
 
 
 #define ENV_SIZE (CFG_ENV_SIZE - ENV_HEADER_SIZE)
 
 typedef	struct environment_s {
-	unsigned long	crc;		/* CRC32 over data bytes	*/
+	uint32_t	crc;		/* CRC32 over data bytes	*/
 #ifdef CFG_REDUNDAND_ENVIRONMENT
 	unsigned char	flags;		/* active/obsolete flags	*/
 #endif