mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/win32.h (frexp, modf): wrongly declared as pure in
mingw math.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f777225e09
commit
d986500059
2 changed files with 18 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
|||
Thu Apr 14 21:21:01 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu Apr 14 21:21:06 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/win32.h (frexp, modf): wrongly declared as pure in
|
||||
mingw math.h.
|
||||
|
||||
* include/ruby/win32.h (ftruncate, truncate): mingw64 misses
|
||||
prototypes.
|
||||
|
|
|
@ -692,6 +692,20 @@ uintptr_t rb_w32_asynchronize(asynchronous_func_t func, uintptr_t self, int argc
|
|||
#pragma GCC visibility pop
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW_ATTRIB_PURE
|
||||
/* get rid of bugs in math.h of mingw */
|
||||
#define frexp(_X, _Y) __extension__ ({\
|
||||
int *intptr_frexp_bug = (_Y);\
|
||||
*intptr_frexp_bug = *intptr_frexp_bug;\
|
||||
frexp((_X), intptr_frexp_bug);\
|
||||
})
|
||||
#define modf(_X, _Y) __extension__ ({\
|
||||
double *intptr_modf_bug = (_Y);\
|
||||
*intptr_modf_bug = *intptr_modf_bug;\
|
||||
modf((_X), intptr_modf_bug);\
|
||||
})
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#if 0
|
||||
{ /* satisfy cc-mode */
|
||||
|
|
Loading…
Reference in a new issue