diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-02 21:19:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-02 21:19:33 +0000 |
commit | 35345f1c09b6e08e674fb7cbad3258cd1acdd91d (patch) | |
tree | 70c5bac31a19ecee31e34e1d66d37684b07a9013 /win32 | |
parent | d20440ab6fae8590d7eeb0da5614b86e3eaa5228 (diff) |
* win32/win32.c (signbig): defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile.sub | 1 | ||||
-rw-r--r-- | win32/win32.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 8f1d779207..bbca662bff 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -552,6 +552,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define HAVE_COSH 1 #define HAVE_SINH 1 #define HAVE_TANH 1 +#define HAVE_SIGNBIT 1 #define HAVE_TZNAME 1 #define HAVE_DAYLIGHT 1 #define SETPGRP_VOID 1 diff --git a/win32/win32.c b/win32/win32.c index 215752210d..54f0940250 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -5272,3 +5272,14 @@ _ftol2_sse(double d) return _ftol(d); } #endif + +int +signbit(double x) +{ +#ifdef _M_IX86 + int *ip = (int *)(&x + 1) - 1; + return *ip < 0; +#else +# error not supported +#endif +} |