Bug #8495
closedinclude/ruby/win32.h assumes that __STRICT_ANSI__ isn’t set
Description
Hi!
include/ruby/win32.h assumes that STRICT_ANSI isn’t set when it uses _controlfp() in rb_w32_pow(). This isn’t the case if you give, for example, -std=c99 to gcc. If STRICT_ANSI is set, float.h won’t define _controlfp(), leading to compilation issues.
Updated by luislavena (Luis Lavena) over 11 years ago
- Status changed from Open to Feedback
Hello Nikolai,
Thanks for the report.
Can you provide us with a concrete example where this issue is happening?
Also, seems you've already dig into this to provide this feedback, any particular resolution suggestion?
Updated by Anonymous over 11 years ago
On Wed, Jun 5, 2013 at 11:20 AM, luislavena (Luis Lavena)
luislavena@gmail.com wrote:
Issue #8495 has been updated by luislavena (Luis Lavena).
Status changed from Open to Feedback
Hello Nikolai,
Thanks for the report.
Can you provide us with a concrete example where this issue is happening?
As I said, I add -std=c99 to CFLAGS, which defines STRICT_ANSI.
If you want a specific repository, its at http://github.com/now/u/.
Also, seems you've already dig into this to provide this feedback, any particular resolution suggestion?
Change line 793 to
#elif defined(__MINGW64_VERSION_MAJOR) && !defined(STRICT_ANSI)
perhaps?
Updated by luislavena (Luis Lavena) over 11 years ago
- Status changed from Feedback to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r41834.
Nikolai, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
win32: for strict ANSI
- thread_win32.c (w32_thread_start_func, thread_start_func_1),
(timer_thread_func): use __stdcall instead of _stdcall which is
unavailable in strict ANSI mode. [ruby-core:55312] [Bug #8495] - win32/win32.c (gettimeofday): use __cdecl instead of _cdecl.