repo.or.cz
/
mruby.git
/
commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
raw
|
patch
|
inline
|
side by side
(parent:
bbc2370
)
Fix MSVC warnings for numeric.c
author
kyab
<
[email protected]
>
Sun, 27 Apr 2014 18:07:28 +0000
(28
03:07
+0900)
committer
kyab
<
[email protected]
>
Sun, 27 Apr 2014 18:07:28 +0000
(28
03:07
+0900)
include/mruby/value.h
patch
|
blob
|
blame
|
history
diff --git
a/include/mruby/value.h
b/include/mruby/value.h
index
0bea027
..
9ba714c
100644
(file)
--- a/
include/mruby/value.h
+++ b/
include/mruby/value.h
@@
-75,7
+75,8
@@
typedef short mrb_sym;
# define PRIo64 "I64o"
# define PRIx64 "I64x"
# define PRIX64 "I64X"
-# define INFINITY ((float)(DBL_MAX * DBL_MAX))
+static unsigned int IEEE754_INFINITY_BITS_SINGLE = 0x7F800000;
+# define INFINITY (*(float *)&IEEE754_INFINITY_BITS_SINGLE)
# define NAN ((float)(INFINITY - INFINITY))
# else
# include <inttypes.h>