Skip to content

Commit

Permalink
Merge b36e75b into 5757fdb
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaeckel committed Feb 21, 2017
2 parents 5757fdb + b36e75b commit 53a0b6b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/prngs/rng_get_bytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,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(WINCE)
#if defined(CLOCKS_PER_SEC) && !defined(_WIN32_WCE)

#define ANSI_RNG

Expand Down Expand Up @@ -92,11 +92,11 @@ static unsigned long rng_ansic(unsigned char *buf, unsigned long len,
#endif

/* Try the Microsoft CSP */
#if defined(WIN32) || defined(_WIN32) || defined(WINCE)
#if defined(_WIN32) || defined(_WIN32_WCE)
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#ifdef WINCE
#ifdef _WIN32_WCE
#define UNDER_CE
#define ARM
#endif
Expand Down Expand Up @@ -141,11 +141,10 @@ unsigned long rng_get_bytes(unsigned char *out, unsigned long outlen,

LTC_ARGCHK(out != NULL);

#if defined(LTC_DEVRANDOM)
x = rng_nix(out, outlen, callback); if (x != 0) { return x; }
#endif
#if defined(WIN32) || defined(_WIN32) || defined(WINCE)
#if defined(_WIN32) || defined(_WIN32_WCE)
x = rng_win32(out, outlen, callback); if (x != 0) { return x; }
#elif defined(LTC_DEVRANDOM)
x = rng_nix(out, outlen, callback); if (x != 0) { return x; }
#endif
#ifdef ANSI_RNG
x = rng_ansic(out, outlen, callback); if (x != 0) { return x; }
Expand Down

0 comments on commit 53a0b6b

Please sign in to comment.