Browse Source

* Add support for OpenBSD.

master
Richard Kreckel 19 years ago
parent
commit
497f359571
  1. 4
      ChangeLog
  2. 3
      src/base/random/cl_random_from.cc

4
ChangeLog

@ -1,3 +1,7 @@
2005-12-15 Dmitry V. Kustov <kustov@telex221.ru>
* src/base/random/cl_random_from.cc: Add support for OpenBSD.
2005-11-23 Richard B. Kreckel <kreckel@ginac.de> 2005-11-23 Richard B. Kreckel <kreckel@ginac.de>
* Version 1.1.11 released. * Version 1.1.11 released.

3
src/base/random/cl_random_from.cc

@ -68,6 +68,9 @@ random_state::random_state ()
seed_lo = ::get_seed(); seed_lo = ::get_seed();
seed_hi = (rand() // zufällige 31 Bit (bei UNIX_BSD) bzw. 16 Bit (bei UNIX_SYSV) 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 << 8) ^ (uintL)(getpid()); // ca. 8 Bit von der Process ID
#elif defined(__OpenBSD__)
seed_lo = arc4random();
seed_hi = arc4random();
#elif defined(__atarist) #elif defined(__atarist)
seed_lo = highlow32(GEMDOS_GetDate(),GEMDOS_GetTime()); // 16+16 zufällige Bits 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 seed_hi = XBIOS_Random(); // 24 Bit zufällig vom XBIOS, vorne 8 Nullbits

Loading…
Cancel
Save