From ecb2402ba8d5f8f7fdacbbdf0e8e168d4c435ab5 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 23 Feb 2017 23:37:53 +0100 Subject: [PATCH] remove [X]CLOCKS_PER_SEC --- src/headers/tomcrypt_custom.h | 3 --- src/prngs/rng_get_bytes.c | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/headers/tomcrypt_custom.h b/src/headers/tomcrypt_custom.h index 074ab4e..33e4bc0 100644 --- a/src/headers/tomcrypt_custom.h +++ b/src/headers/tomcrypt_custom.h @@ -34,9 +34,6 @@ #ifndef XCLOCK #define XCLOCK clock #endif -#ifndef XCLOCKS_PER_SEC -#define XCLOCKS_PER_SEC CLOCKS_PER_SEC -#endif #ifndef XQSORT #define XQSORT qsort diff --git a/src/prngs/rng_get_bytes.c b/src/prngs/rng_get_bytes.c index 2a66367..19c8a78 100644 --- a/src/prngs/rng_get_bytes.c +++ b/src/prngs/rng_get_bytes.c @@ -54,8 +54,7 @@ static unsigned long rng_nix(unsigned char *buf, unsigned long len, #endif /* LTC_DEVRANDOM */ -/* on ANSI C platforms with 100 < CLOCKS_PER_SEC < 10000 */ -#if defined(CLOCKS_PER_SEC) && !defined(_WIN32_WCE) +#if !defined(_WIN32_WCE) #define ANSI_RNG @@ -65,10 +64,6 @@ static unsigned long rng_ansic(unsigned char *buf, unsigned long len, clock_t t1; int l, acc, bits, a, b; - if (XCLOCKS_PER_SEC < 100 || XCLOCKS_PER_SEC > 10000) { - return 0; - } - l = len; bits = 8; acc = a = b = 0;