diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:50:28 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:50:28 -0500 |
commit | 6d9d0c68b574ceba53fc36d34b83f7109e00b1d0 (patch) | |
tree | 8004fcb5879cd81d738bd750441fbc900208e049 /src/base/random.cc | |
parent | c215d54aac6925cf13079d8d8fe3691451a77ce1 (diff) | |
parent | fd8a4ff5a8a9ea65e227f0b4000dfcda06d4764f (diff) | |
download | gem5-6d9d0c68b574ceba53fc36d34b83f7109e00b1d0.tar.xz |
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.suncc
--HG--
extra : convert_revision : 1706f6218abec7eb575dcff3ad4aef83894f64ab
Diffstat (limited to 'src/base/random.cc')
-rw-r--r-- | src/base/random.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/base/random.cc b/src/base/random.cc index 82c9e3566..0ccedcb00 100644 --- a/src/base/random.cc +++ b/src/base/random.cc @@ -29,12 +29,17 @@ * Ali Saidi */ +#if defined(__sun) +#include <ieeefp.h> +#endif +#ifdef __SUNPRO_CC +#include <stdlib.h> +#include <math.h> +#endif + #include <cstdlib> #include <cmath> -#if defined(__sun__) -#include <ieeefp.h> -#endif #include "sim/param.hh" #include "base/random.hh" @@ -72,7 +77,7 @@ getLong() double m5round(double r) { -#if defined(__sun__) +#if defined(__sun) double val; fp_rnd oldrnd = fpsetround(FP_RN); val = rint(r); |