Commit fc6b08f7 authored by Niels Möller's avatar Niels Möller

(ROL64): Use (uint64_t) 1 rather than 1L, for

systems. Needed for M$ w64.
(RSHIFT64): Likewise. Also added a missing parenthesis.

Rev: nettle/ChangeLog:1.236
Rev: nettle/serpent-internal.h:1.2
parent 17026aa8
2011-11-24 Niels Mller <nisse@lysator.liu.se> 2011-11-24 Niels Mller <nisse@lysator.liu.se>
* serpent-internal.h (ROL64): Use (uint64_t) 1 rather than 1L, for
systems. Needed for M$ w64.
(RSHIFT64): Likewise. Also added a missing parenthesis.
From Martin Storsj: From Martin Storsj:
* testsuite/symbols-test: Use $NM, falling back to nm if undefined. * testsuite/symbols-test: Use $NM, falling back to nm if undefined.
* testsuite/Makefile.in (check): Pass $(NM) in the environment of * testsuite/Makefile.in (check): Pass $(NM) in the environment of
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
#if HAVE_NATIVE_64_BIT #if HAVE_NATIVE_64_BIT
/* Operate independently on both halves of a 64-bit word. */ /* Operate independently on both halves of a 64-bit word. */
#define ROL64(x,n) \ #define ROL64(x,n) \
(((x) << (n) & ~(((1L << (n))-1) << 32)) \ (((x) << (n) & ~((((uint64_t) 1 << (n))-1) << 32)) \
|(((x) >> (32-(n))) & ~(((1L << (32-(n)))-1) << (n)))) |(((x) >> (32-(n))) & ~((((uint64_t) 1 << (32-(n)))-1) << (n))))
#define KEYXOR64(x0,x1,x2,x3, subkey) \ #define KEYXOR64(x0,x1,x2,x3, subkey) \
do { \ do { \
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
} while (0) } while (0)
#define RSHIFT64(x,n) \ #define RSHIFT64(x,n) \
( ((x) << (n)) & ~(((1L << n) - 1) << 32)) ( ((x) << (n)) & ~((((uint64_t) 1 << (n)) - 1) << 32))
#endif /* HAVE_NATIVE_64_BIT */ #endif /* HAVE_NATIVE_64_BIT */
#endif /* NETTLE_SERPENT_INTERNAL_H_INCLUDED */ #endif /* NETTLE_SERPENT_INTERNAL_H_INCLUDED */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment