use #ifdef POCO_LONG_IS_64_BIT instead of if (sizeof(... to avoid warnings

This commit is contained in:
Guenter Obiltschnig
2016-10-10 14:14:50 +02:00
parent 59a78a55b5
commit cefab1f993

View File

@@ -739,11 +739,11 @@ generate_hash_secret_salt(XML_Parser parser)
platform_gather_time_entropy() ^ platform_getpid() ^ (unsigned long)parser; platform_gather_time_entropy() ^ platform_getpid() ^ (unsigned long)parser;
/* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */ /* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
if (sizeof(unsigned long) == 4) { #ifdef POCO_LONG_IS_64_BIT
return entropy * 2147483647; return entropy * 2305843009213693951ULL;
} else { #else
return entropy * 2305843009213693951ULL; return entropy * 2147483647;
} #endif
} }
static XML_Bool /* only valid for root parser */ static XML_Bool /* only valid for root parser */