Project

General

Profile

Actions

Bug #8495

closed

include/ruby/win32.h assumes that __STRICT_ANSI__ isn’t set

Added by now (Nikolai Weibull) about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
2.0.0
[ruby-core:<unknown>]

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.

Actions #1

Updated by luislavena (Luis Lavena) about 9 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 about 9 years ago

On Wed, Jun 5, 2013 at 11:20 AM, luislavena (Luis Lavena)
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?

Actions #3

Updated by luislavena (Luis Lavena) almost 9 years ago

  • Status changed from Feedback to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)
Actions #4

Updated by nobu (Nobuyoshi Nakada) almost 9 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.
Actions

Also available in: Atom PDF