[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32605 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32605 - gnunet/src/util |
Date: |
Mon, 10 Mar 2014 11:36:59 +0100 |
Author: florian
Date: 2014-03-10 11:36:59 +0100 (Mon, 10 Mar 2014)
New Revision: 32605
Modified:
gnunet/src/util/crypto_crc.c
Log:
Rename uLong to GNUNET_uLong from crypto_crc so that it doesn't collide with
the different uLong from zconf of zlib
Modified: gnunet/src/util/crypto_crc.c
===================================================================
--- gnunet/src/util/crypto_crc.c 2014-03-10 10:36:14 UTC (rev 32604)
+++ gnunet/src/util/crypto_crc.c 2014-03-10 10:36:59 UTC (rev 32605)
@@ -34,9 +34,9 @@
/* Avoid wasting space on 8-byte longs. */
#if UINT_MAX >= 0xffffffff
-typedef unsigned int uLong;
+typedef unsigned int GNUNET_uLong;
#elif ULONG_MAX >= 0xffffffff
-typedef unsigned long uLong;
+typedef unsigned long GNUNET_uLong;
#else
#error This compiler is not ANSI-compliant!
#endif
@@ -44,8 +44,8 @@
#define Z_NULL 0
-#define POLYNOMIAL (uLong)0xedb88320
-static uLong crc_table[256];
+#define POLYNOMIAL (GNUNET_uLong)0xedb88320
+static GNUNET_uLong crc_table[256];
/*
* This routine writes each crc_table entry exactly once,
@@ -57,7 +57,7 @@
{
static int once;
unsigned int i, j;
- uLong h = 1;
+ GNUNET_uLong h = 1;
if (once)
return;
@@ -82,8 +82,8 @@
* to data in little-endian byte and bit order to preserve the
* property of detecting all burst errors of length 32 bits or less.
*/
-static uLong
-crc32 (uLong crc, const char *buf, size_t len)
+static GNUNET_uLong
+crc32 (GNUNET_uLong crc, const char *buf, size_t len)
{
crc_init ();
GNUNET_assert (crc_table[255] != 0);
@@ -104,7 +104,7 @@
int32_t
GNUNET_CRYPTO_crc32_n (const void *buf, size_t len)
{
- uLong crc;
+ GNUNET_uLong crc;
crc = crc32 (0L, Z_NULL, 0);
crc = crc32 (crc, (char *) buf, len);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32605 - gnunet/src/util,
gnunet <=