Skip to content

Commit

Permalink
On linux, use the system ieee754.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Viral B. Shah committed Jul 3, 2011
1 parent 9c06dda commit f14cfbc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 8 additions & 0 deletions external/random/ieee754.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifndef __IEEE754_H_
#define __IEEE754_H_

#ifdef __linux

#include <ieee754.h>

#else

union ieee754_float {
float f;

Expand Down Expand Up @@ -64,4 +70,6 @@ union ieee854_long_double {

#define IEEE854_LONG_DOUBLE_BIAS 0x3fff

#endif // ifdef __APPLE__ ...

#endif
4 changes: 0 additions & 4 deletions external/random/jl_random.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
#include <math.h>
#include <sys/time.h>
#include <stdint.h>
#ifdef __APPLE__
#include "ieee754.h"
#else
#include <ieee754.h>
#endif

double rand_double();
float rand_float();
Expand Down
8 changes: 8 additions & 0 deletions src/support/ieee754.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifndef __IEEE754_H_
#define __IEEE754_H_

#ifdef __linux

#include <ieee754.h>

#else

union ieee754_float {
float f;

Expand Down Expand Up @@ -64,4 +70,6 @@ union ieee854_long_double {

#define IEEE854_LONG_DOUBLE_BIAS 0x3fff

#endif // ifdef __APPLE__ ...

#endif

0 comments on commit f14cfbc

Please sign in to comment.