Fix rndhw for 64-bit Windows build
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Wed, 29 Apr 2015 15:18:07 +0000 (18:18 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Fri, 1 May 2015 16:12:11 +0000 (19:12 +0300)
commitd5a7e00b6b222566a5650639ef29684b047c1909
tree6e21c8ae59cab2313e6dad8f97d0e70aee2130fb
parent0cdd24456b33defc7f8176fa82ab694fbc284385
Fix rndhw for 64-bit Windows build

* configure.ac: Add sizeof check for 'void *'.
* random/rndhw.c (poll_padlock): Check for SIZEOF_VOID_P == 8
instead of defined(__LP64__).
(RDRAND_LONG): Check for SIZEOF_UNSIGNED_LONG == 8 instead of
defined(__LP64__).
--

__LP64__ is not predefined for 64-bit mingw64-gcc, which caused wrong
assembly code selections. Do selection based on type sizes instead,
to support x86_64, x32 and win64 properly.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
configure.ac
random/rndhw.c