From d7ddb41f4bdf8418d26cb9652190cb1bfddca701 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 21 Feb 2003 21:06:27 +0000 Subject: [PATCH] Add support for MacOS X. --- ChangeLog | 6 ++++++ src/base/random/cl_random_from.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fef17e6..ec0d901 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-02-21 Bruno Haible + + * src/base/random/cl_random_from.cc (random_state::random_state): Add + support for MacOS X. + Reported by Erann Gat . + 2002-08-03 Joerg Arndt * include/cln/config.h.in: Add support for x86_64 CPU. diff --git a/src/base/random/cl_random_from.cc b/src/base/random/cl_random_from.cc index 7e3eac5..185f402 100644 --- a/src/base/random/cl_random_from.cc +++ b/src/base/random/cl_random_from.cc @@ -80,7 +80,7 @@ random_state::random_state () { var uint32 seed_hi; var uint32 seed_lo; -#if defined(unix) || defined(__unix) || defined(_AIX) || defined(sinix) || (defined(_WIN32) && defined(__GNUC__)) || defined(__BEOS__) +#if defined(unix) || defined(__unix) || defined(_AIX) || defined(sinix) || (defined(__MACH__) && defined(__APPLE__)) || (defined(_WIN32) && defined(__GNUC__)) || defined(__BEOS__) 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