From 497f359571130e9a14e564f11e4d2eb71c2b144a Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 15 Dec 2005 23:54:03 +0000 Subject: [PATCH] * Add support for OpenBSD. --- ChangeLog | 4 ++++ src/base/random/cl_random_from.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0de1970..d90fa3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-12-15 Dmitry V. Kustov + + * src/base/random/cl_random_from.cc: Add support for OpenBSD. + 2005-11-23 Richard B. Kreckel * Version 1.1.11 released. diff --git a/src/base/random/cl_random_from.cc b/src/base/random/cl_random_from.cc index 1b2ad60..3e10b12 100644 --- a/src/base/random/cl_random_from.cc +++ b/src/base/random/cl_random_from.cc @@ -68,6 +68,9 @@ random_state::random_state () seed_lo = ::get_seed(); seed_hi = (rand() // zufällige 31 Bit (bei UNIX_BSD) bzw. 16 Bit (bei UNIX_SYSV) << 8) ^ (uintL)(getpid()); // ca. 8 Bit von der Process ID +#elif defined(__OpenBSD__) + seed_lo = arc4random(); + seed_hi = arc4random(); #elif defined(__atarist) seed_lo = highlow32(GEMDOS_GetDate(),GEMDOS_GetTime()); // 16+16 zufällige Bits seed_hi = XBIOS_Random(); // 24 Bit zufällig vom XBIOS, vorne 8 Nullbits